Skip to content

Commit

Permalink
Core/Items: Destroy only one item from stack when inserting a gem, no…
Browse files Browse the repository at this point in the history
…t entire stack
  • Loading branch information
Shauren committed Aug 20, 2012
1 parent 9c3c3cd commit 5dc3ccb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/game/Handlers/ItemHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1357,9 +1357,10 @@ void WorldSession::HandleSocketOpcode(WorldPacket& recvData)
{
if (GemEnchants[i])
{
uint32 gemCount = 1;
itemTarget->SetEnchantment(EnchantmentSlot(SOCK_ENCHANTMENT_SLOT+i), GemEnchants[i], 0, 0);
if (Item* guidItem = _player->GetItemByGuid(gem_guids[i]))
_player->DestroyItem(guidItem->GetBagSlot(), guidItem->GetSlot(), true);
_player->DestroyItemCount(guidItem, gemCount, true);
}
}

Expand Down

0 comments on commit 5dc3ccb

Please sign in to comment.