Core/Loot: Removed unneccessary field from Loot class and pass it as parameter everywhere

Port From (https://github.com/TrinityCore/TrinityCore/commit/ba251da7c3615100cba60511a60cfa4f6b3bf0e2)
This commit is contained in:
hondacrx
2022-08-25 13:58:35 -04:00
parent 8407227e63
commit e3323e5640
4 changed files with 15 additions and 21 deletions
+3 -3
View File
@@ -92,7 +92,7 @@ namespace Game
loot = creature.loot;
}
player.StoreLootItem((byte)(req.LootListID - 1), loot, aeResult);
player.StoreLootItem(lguid, (byte)(req.LootListID - 1), loot, aeResult);
// If player is removing the last LootItem, delete the empty container.
if (loot.IsLooted() && lguid.IsItem())
@@ -230,8 +230,8 @@ namespace Game
loot.gold = 0;
// Delete the money loot record from the DB
if (!loot.containerID.IsEmpty())
Global.LootItemStorage.RemoveStoredMoneyForContainer(loot.containerID.GetCounter());
if (guid.IsItem() && loot.loot_type == LootType.Corpse)
Global.LootItemStorage.RemoveStoredMoneyForContainer(guid.GetCounter());
// Delete container if empty
if (loot.IsLooted() && guid.IsItem())