Skip to content

Commit cbe09eb

Browse files
Player: Readd back keyring code
Co-Authored-By: evil-at-wow <evil-at-wow@users.noreply.github.com>
1 parent 84e55d7 commit cbe09eb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/game/Entities/Player.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10394,6 +10394,19 @@ void Player::DestroyItemCount(uint32 item, uint32 count, bool update, bool unequ
1039410394
}
1039510395
}
1039610396

10397+
for (int i = KEYRING_SLOT_START; i < KEYRING_SLOT_END; ++i)
10398+
{
10399+
if (Item* item = GetItemByPos(INVENTORY_SLOT_BAG_0, i))
10400+
{
10401+
if (item->GetEntry() == itemEntry && !item->IsInTrade())
10402+
{
10403+
DestroyItemCount(*item, count, update);
10404+
if (count == 0)
10405+
return;
10406+
}
10407+
}
10408+
}
10409+
1039710410
// in inventory bags
1039810411
for (int i = INVENTORY_SLOT_BAG_START; i < INVENTORY_SLOT_BAG_END; ++i)
1039910412
{

0 commit comments

Comments
 (0)