diff options
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) |
