diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-06-22 21:47:30 +0200 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-06-22 21:47:30 +0200 |
commit | ae80fdcb51ccd0d2266669140673cc9671826999 (patch) | |
tree | c2a92d14f2632f7d95695b80cd21b02cc710a032 /src | |
parent | ebc889dae65f2276b0acc18c1fef4baabdb4f3a1 (diff) |
Core/Loot: Fix disenchant exploit
Fix exploit that allowed to disenchant the same item multiple times.
Fixes #12116
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Handlers/LootHandler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/game/Handlers/LootHandler.cpp b/src/server/game/Handlers/LootHandler.cpp index f92c6e08e31..61f0b9afce2 100644 --- a/src/server/game/Handlers/LootHandler.cpp +++ b/src/server/game/Handlers/LootHandler.cpp @@ -338,7 +338,8 @@ void WorldSession::DoLootRelease(uint64 lguid) } else { - if (pItem->loot.isLooted()) // Only delete item if no loot or money (unlooted loot is saved to db) + // Only delete item if no loot or money (unlooted loot is saved to db) or if it isn't an openable item + if (pItem->loot.isLooted() || !(proto->Flags & ITEM_PROTO_FLAG_OPENABLE)) player->DestroyItem(pItem->GetBagSlot(), pItem->GetSlot(), true); } return; // item can be looted only single player |