diff options
author | click <none@none> | 2010-11-08 17:11:05 +0100 |
---|---|---|
committer | click <none@none> | 2010-11-08 17:11:05 +0100 |
commit | b1bf8ebfe62e18aa79195d1ae47f432d3a666d41 (patch) | |
tree | 001edbbb4b0c78b4c636fd0767cd8f495348201d /src | |
parent | 551d0cea4e9a50c3136e515b2fd7eec01bef4bbf (diff) |
Core/ItemHandler: Fix a logic error when checking for gem equipment limits. (Socketed gems cannot be destroyed, they can only be replaced and that would be the "new gem" case) - fix by leak
Closes issue 4698. Fixes issue 2495.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Server/Protocol/Handlers/ItemHandler.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp index b9e675066e0..c89f60b1abe 100755 --- a/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp +++ b/src/server/game/Server/Protocol/Handlers/ItemHandler.cpp @@ -1263,22 +1263,13 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recv_data) { if (Gems[j]) { - // destroyed gem - if (OldEnchants[j]) - { - if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(OldEnchants[j])) - if (ItemPrototype const* jProto = ObjectMgr::GetItemPrototype(enchantEntry->GemID)) - if (iGemProto->ItemLimitCategory == jProto->ItemLimitCategory) - --limit_newcount; - } - // new gem if (iGemProto->ItemLimitCategory == Gems[j]->GetProto()->ItemLimitCategory) ++limit_newcount; } - // existed gem else if (OldEnchants[j]) { + // existing gem if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(OldEnchants[j])) if (ItemPrototype const* jProto = ObjectMgr::GetItemPrototype(enchantEntry->GemID)) if (iGemProto->ItemLimitCategory == jProto->ItemLimitCategory) |