aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Loot/Loot.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-12-30 15:45:37 +0100
committerfunjoker <funjoker109@gmail.com>2024-01-09 12:50:47 +0100
commit0c21c06e6e1857254757bd2669f2fcb26a0b6c59 (patch)
treeecce6bc11d5653be74704a2b871e9af9d400f2ed /src/server/game/Loot/Loot.cpp
parentdbf2f88e40c3e760b4508f0dafaedd065ba95479 (diff)
Core/Quests: Implemented QUEST_OBJECTIVE_FLAG_2_QUEST_BOUND_ITEM that makes required items not be stored in inventory
(cherry picked from commit 4dce6ab228c54319032b346d2d791262eac3d9cd)
Diffstat (limited to 'src/server/game/Loot/Loot.cpp')
-rw-r--r--src/server/game/Loot/Loot.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/server/game/Loot/Loot.cpp b/src/server/game/Loot/Loot.cpp
index 02e8024221b..c19a2a1c36c 100644
--- a/src/server/game/Loot/Loot.cpp
+++ b/src/server/game/Loot/Loot.cpp
@@ -886,9 +886,13 @@ bool Loot::AutoStore(Player* player, uint8 bag, uint8 slot, bool broadcast, bool
--unlootedCount;
- Item* pItem = player->StoreNewItem(dest, lootItem->itemid, true, lootItem->randomProperties, GuidSet(), lootItem->context);
- player->SendNewItem(pItem, lootItem->count, false, createdByPlayer, broadcast);
- player->ApplyItemLootedSpell(pItem, true);
+ if (Item* pItem = player->StoreNewItem(dest, lootItem->itemid, true, lootItem->randomProperties, GuidSet(), lootItem->context))
+ {
+ player->SendNewItem(pItem, lootItem->count, false, createdByPlayer, broadcast, GetDungeonEncounterId());
+ player->ApplyItemLootedSpell(pItem, true);
+ }
+ else
+ player->ApplyItemLootedSpell(sObjectMgr->GetItemTemplate(lootItem->itemid));
}
return allLooted;