aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/ItemHandler.cpp
diff options
context:
space:
mode:
authorPeter Keresztes Schmidt <carbenium@outlook.com>2020-07-12 15:36:55 +0200
committerGitHub <noreply@github.com>2020-07-12 15:36:55 +0200
commitc92950b3e1f6366d85d707365a8ad2caddafeecc (patch)
tree9c034dc61e7b8dc5d480bfd476a6631b8d9dd592 /src/server/game/Handlers/ItemHandler.cpp
parent352944266822f8c8d3bfdd6078c6f82d3555dd85 (diff)
Core/DataStores: Update DBC field names to generated ones (#24999)
Diffstat (limited to 'src/server/game/Handlers/ItemHandler.cpp')
-rw-r--r--src/server/game/Handlers/ItemHandler.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/server/game/Handlers/ItemHandler.cpp b/src/server/game/Handlers/ItemHandler.cpp
index f0b2c072a53..b813798b219 100644
--- a/src/server/game/Handlers/ItemHandler.cpp
+++ b/src/server/game/Handlers/ItemHandler.cpp
@@ -991,11 +991,11 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
}
// tried to put normal gem in meta socket
- if (itemProto->Socket[i].Color == SOCKET_COLOR_META && GemProps[i]->color != SOCKET_COLOR_META)
+ if (itemProto->Socket[i].Color == SOCKET_COLOR_META && GemProps[i]->Type != SOCKET_COLOR_META)
return;
// tried to put meta gem in normal socket
- if (itemProto->Socket[i].Color != SOCKET_COLOR_META && GemProps[i]->color == SOCKET_COLOR_META)
+ if (itemProto->Socket[i].Color != SOCKET_COLOR_META && GemProps[i]->Type == SOCKET_COLOR_META)
return;
}
@@ -1003,7 +1003,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
uint32 OldEnchants[MAX_GEM_SOCKETS];
for (int i = 0; i < MAX_GEM_SOCKETS; ++i) //get new and old enchantments
{
- GemEnchants[i] = (GemProps[i]) ? GemProps[i]->spellitemenchantement : 0;
+ GemEnchants[i] = (GemProps[i]) ? GemProps[i]->EnchantID : 0;
OldEnchants[i] = itemTarget->GetEnchantmentId(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i));
}
@@ -1036,7 +1036,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
{
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(OldEnchants[j]))
{
- if (iGemProto->ItemId == enchantEntry->GemID)
+ if (iGemProto->ItemId == enchantEntry->SrcItemID)
{
_player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, nullptr);
return;
@@ -1052,7 +1052,7 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
{
if (ItemLimitCategoryEntry const* limitEntry = sItemLimitCategoryStore.LookupEntry(iGemProto->ItemLimitCategory))
{
- // NOTE: limitEntry->mode is not checked because if item has limit then it is applied in equip case
+ // NOTE: limitEntry->Flags is not checked because if item has limit then it is applied in equip case
for (int j = 0; j < MAX_GEM_SOCKETS; ++j)
{
if (Gems[j])
@@ -1065,13 +1065,13 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
{
// existing gem
if (SpellItemEnchantmentEntry const* enchantEntry = sSpellItemEnchantmentStore.LookupEntry(OldEnchants[j]))
- if (ItemTemplate const* jProto = sObjectMgr->GetItemTemplate(enchantEntry->GemID))
+ if (ItemTemplate const* jProto = sObjectMgr->GetItemTemplate(enchantEntry->SrcItemID))
if (iGemProto->ItemLimitCategory == jProto->ItemLimitCategory)
++limit_newcount;
}
}
- if (limit_newcount > 0 && uint32(limit_newcount) > limitEntry->maxCount)
+ if (limit_newcount > 0 && uint32(limit_newcount) > limitEntry->Quantity)
{
_player->SendEquipError(EQUIP_ERR_ITEM_UNIQUE_EQUIPPABLE_SOCKETED, itemTarget, nullptr);
return;