diff options
| author | funjoker <funjoker109@gmail.com> | 2023-11-16 23:22:55 +0100 |
|---|---|---|
| committer | funjoker <funjoker109@gmail.com> | 2023-11-16 23:24:21 +0100 |
| commit | f54b0aad52fc7fef63fda030412cd224697575c2 (patch) | |
| tree | 281d93118d148ac8d8530317675146dd6cf0db1e /src/server/game/Handlers/BankHandler.cpp | |
| parent | bbc5539928f4a9084d19be46516fd4bfcee8674d (diff) | |
Core/Player: Fix Inventory
Diffstat (limited to 'src/server/game/Handlers/BankHandler.cpp')
| -rw-r--r-- | src/server/game/Handlers/BankHandler.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/server/game/Handlers/BankHandler.cpp b/src/server/game/Handlers/BankHandler.cpp index b403c4bbfc1..065c8b0c72a 100644 --- a/src/server/game/Handlers/BankHandler.cpp +++ b/src/server/game/Handlers/BankHandler.cpp @@ -269,18 +269,16 @@ void WorldSession::HandleAutoStoreBankReagentOpcode(WorldPackets::Bank::AutoStor if (!pItem) return; + ItemPosCountVec dest; + InventoryResult msg = _player->CanBankItem(NULL_BAG, NULL_SLOT, dest, pItem, false, true); + if (msg != EQUIP_ERR_OK) { - ItemPosCountVec dest; - InventoryResult msg = _player->CanBankItem(NULL_BAG, NULL_SLOT, dest, pItem, false, true); - if (msg != EQUIP_ERR_OK) - { - _player->SendEquipError(msg, pItem, nullptr); - return; - } - - _player->RemoveItem(autoStoreBankReagent.Slot, autoStoreBankReagent.PackSlot, true); - _player->BankItem(dest, pItem, true); + _player->SendEquipError(msg, pItem, nullptr); + return; } + + _player->RemoveItem(autoStoreBankReagent.Slot, autoStoreBankReagent.PackSlot, true); + _player->BankItem(dest, pItem, true); } void WorldSession::SendShowBank(ObjectGuid guid) |
