From 378e5d75bcf545436c55308302f28f40f97b0b7e Mon Sep 17 00:00:00 2001 From: collett Date: Sun, 12 Sep 2021 00:18:04 +0900 Subject: [PATCH] fix wrong value used to determine armory container for swapped out equipment. --- src/world/Actor/PlayerInventory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/world/Actor/PlayerInventory.cpp b/src/world/Actor/PlayerInventory.cpp index f342ea00..81de4add 100644 --- a/src/world/Actor/PlayerInventory.cpp +++ b/src/world/Actor/PlayerInventory.cpp @@ -862,7 +862,9 @@ void Sapphire::Entity::Player::swapItem( uint16_t fromInventoryId, uint8_t fromS && !World::Manager::ItemMgr::isArmory( fromInventoryId ) ) { updateContainer( fromInventoryId, fromSlotId, nullptr ); - fromInventoryId = World::Manager::ItemMgr::getCharaEquipSlotCategoryToArmoryId( static_cast< Common::EquipSlotCategory >( toSlot ) ); + auto& exdData = Common::Service< Data::ExdDataGenerated >::ref(); + auto itemInfo = exdData.get< Sapphire::Data::Item >( toItem->getId() ); + fromInventoryId = World::Manager::ItemMgr::getCharaEquipSlotCategoryToArmoryId( static_cast< Common::EquipSlotCategory >( itemInfo->equipSlotCategory ) ); fromSlotId = static_cast < uint8_t >( m_storageMap[ fromInventoryId ]->getFreeSlot() ); }