Skip to content

Commit 0011c11

Browse files
committed
Core/Items: Destroy only one item from stack when inserting a gem, not entire stack
(cherry picked from commit 5dc3ccb)
1 parent 01132b1 commit 0011c11

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/server/game/Handlers/ItemHandler.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1092,9 +1092,10 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
10921092
{
10931093
if (GemEnchants[i])
10941094
{
1095+
uint32 gemCount = 1;
10951096
itemTarget->SetEnchantment(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i), GemEnchants[i], 0, 0, _player->GetGUID());
10961097
if (Item* guidItem = _player->GetItemByGuid(gem_guids[i]))
1097-
_player->DestroyItem(guidItem->GetBagSlot(), guidItem->GetSlot(), true);
1098+
_player->DestroyItemCount(guidItem, gemCount, true);
10981099
}
10991100
}
11001101

0 commit comments

Comments
 (0)