mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 08:00:48 +01:00
Core/Handlers: Fixed equipament manager with empty slots. Yes kids, dont use drugs !
Followup: 42be04898c
This commit is contained in:
@@ -1567,7 +1567,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket& recvData)
|
||||
InventoryResult msg = _player->CanStoreItem(NULL_BAG, NULL_SLOT, sDest, uItem, false);
|
||||
if (msg == EQUIP_ERR_OK)
|
||||
{
|
||||
if (_player->CanEquipItem(NULL_SLOT, dstpos, uItem, false) != EQUIP_ERR_OK)
|
||||
if (_player->CanUnequipItem(dstpos, true) != EQUIP_ERR_OK)
|
||||
continue;
|
||||
|
||||
_player->RemoveItem(INVENTORY_SLOT_BAG_0, i, true);
|
||||
@@ -1582,7 +1582,7 @@ void WorldSession::HandleEquipmentSetUse(WorldPacket& recvData)
|
||||
if (item->GetPos() == dstpos)
|
||||
continue;
|
||||
|
||||
if (_player->CanUnequipItem(dstpos, true) != EQUIP_ERR_OK)
|
||||
if (_player->CanEquipItem(NULL_SLOT, dstpos, item, false) != EQUIP_ERR_OK)
|
||||
continue;
|
||||
|
||||
_player->SwapItem(item->GetPos(), dstpos);
|
||||
|
||||
Reference in New Issue
Block a user