diff options
Diffstat (limited to 'src/server/game/Handlers/LootHandler.cpp')
-rw-r--r-- | src/server/game/Handlers/LootHandler.cpp | 6 |
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; |