Core/Loot: Fix disenchant exploit

Fix exploit that allowed to disenchant the same item multiple times.
Fixes #12116
This commit is contained in:
jackpoz
2014-06-22 21:47:30 +02:00
parent ebc889dae6
commit ae80fdcb51
+2 -1
View File
@@ -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