aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/LootHandler.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-12-30 15:45:37 +0100
committerShauren <shauren.trinity@gmail.com>2023-12-30 15:45:37 +0100
commit4dce6ab228c54319032b346d2d791262eac3d9cd (patch)
tree27049cf934572481a3f661461ee2add586313df2 /src/server/game/Handlers/LootHandler.cpp
parentf26a93a8c1bd0a7c3c3c3362f29ec809fb96a68b (diff)
Core/Quests: Implemented QUEST_OBJECTIVE_FLAG_2_QUEST_BOUND_ITEM that makes required items not be stored in inventory
Diffstat (limited to 'src/server/game/Handlers/LootHandler.cpp')
-rw-r--r--src/server/game/Handlers/LootHandler.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp
index 223ee9a84a3..fe2b6f73510 100644
--- a/src/server/game/Handlers/LootHandler.cpp
+++ b/src/server/game/Handlers/LootHandler.cpp
@@ -458,8 +458,10 @@ void WorldSession::HandleLootMasterGiveOpcode(WorldPackets::Loot::MasterLootItem
}
// now move item from loot to target inventory
- Item* newitem = target->StoreNewItem(dest, item.itemid, true, item.randomBonusListId, item.GetAllowedLooters(), item.context, &item.BonusListIDs);
- aeResult.Add(newitem, item.count, loot->loot_type, loot->GetDungeonEncounterId());
+ if (Item* newitem = target->StoreNewItem(dest, item.itemid, true, item.randomBonusListId, item.GetAllowedLooters(), item.context, &item.BonusListIDs))
+ aeResult.Add(newitem, item.count, loot->loot_type, loot->GetDungeonEncounterId());
+ else
+ target->ApplyItemLootedSpell(sObjectMgr->GetItemTemplate(item.itemid));
// mark as looted
item.count = 0;