aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/LootHandler.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-08-25 14:46:34 +0200
committerShauren <shauren.trinity@gmail.com>2022-08-25 14:46:34 +0200
commitba251da7c3615100cba60511a60cfa4f6b3bf0e2 (patch)
tree4e301fe0b144d1aab0f3cd4b2d114fe8ec60f213 /src/server/game/Handlers/LootHandler.cpp
parent605b75f6c06647345b44e9ef1975d01122ef129f (diff)
Core/Loot: Removed unneccessary field from Loot class and pass it as parameter everywhere
Diffstat (limited to 'src/server/game/Handlers/LootHandler.cpp')
-rw-r--r--src/server/game/Handlers/LootHandler.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index 4fbe3c96b63..615f574d08e 100644
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -123,7 +123,7 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPackets::Loot::LootItem& p
loot = &creature->loot;
}
- player->StoreLootItem(req.LootListID - 1, loot, aeResultPtr);
+ player->StoreLootItem(lguid, req.LootListID - 1, loot, aeResultPtr);
// If player is removing the last LootItem, delete the empty container.
if (loot->isLooted() && lguid.IsItem())
@@ -257,8 +257,8 @@ void WorldSession::HandleLootMoneyOpcode(WorldPackets::Loot::LootMoney& /*packet
loot->gold = 0;
// Delete the money loot record from the DB
- if (!loot->containerID.IsEmpty())
- sLootItemStorage->RemoveStoredMoneyForContainer(loot->containerID.GetCounter());
+ if (guid.IsItem() && loot->loot_type == LOOT_CORPSE)
+ sLootItemStorage->RemoveStoredMoneyForContainer(guid.GetCounter());
// Delete container if empty
if (loot->isLooted() && guid.IsItem())