diff --git a/code/ryzom/client/src/item_group_manager.cpp b/code/ryzom/client/src/item_group_manager.cpp index b987420c8..e69cbdfd4 100644 --- a/code/ryzom/client/src/item_group_manager.cpp +++ b/code/ryzom/client/src/item_group_manager.cpp @@ -118,8 +118,8 @@ void CItemGroup::readFrom(xmlNodePtr node) ptrName = (char*) xmlGetProp(curNode, (xmlChar*)"slot"); if (ptrName) NLMISC::fromString((const char*)ptrName, slot); slot = NLMISC::toUpper(slot); - if(SLOTTYPE::stringToSlotType(slot) != SLOTTYPE::UNDEFINED) - removeBeforeEquip.push_back(SLOTTYPE::stringToSlotType(slot)); + if(SLOT_EQUIPMENT::stringToSlotEquipment(slot) != SLOT_EQUIPMENT::UNDEFINED) + removeBeforeEquip.push_back(SLOT_EQUIPMENT::stringToSlotEquipment(slot)); } curNode = curNode->next; @@ -338,14 +338,13 @@ bool CItemGroupManager::equipGroup(std::string name, bool pullBefore) //Start by unequipping all slot that user wants to unequip for(int i=0; i < group->removeBeforeEquip.size(); i++) { - SLOTTYPE::TSlotType slot = group->removeBeforeEquip[i]; + SLOT_EQUIPMENT::TSlotEquipment slot = group->removeBeforeEquip[i]; std::string dbPath; - if(slot > SLOTTYPE::RIGHT_HAND) + if(slot == SLOT_EQUIPMENT::HANDL || slot == SLOT_EQUIPMENT::HANDR) dbPath = "LOCAL:INVENTORY:HAND:"; else dbPath = "LOCAL:INVENTORY:EQUIP:"; - //offset by 1 : TSlotType begins at 1 for actual items (because of UNDEFINED), whereas dbPath start at 0 - dbPath += NLMISC::toString((uint8)slot - 1); + dbPath += NLMISC::toString((uint8)slot); CInventoryManager::getInstance()->unequip(dbPath); } diff --git a/code/ryzom/client/src/item_group_manager.h b/code/ryzom/client/src/item_group_manager.h index c9278d1f2..533071cc4 100644 --- a/code/ryzom/client/src/item_group_manager.h +++ b/code/ryzom/client/src/item_group_manager.h @@ -21,7 +21,7 @@ #include "interface_v3/inventory_manager.h" #include "interface_v3/dbctrl_sheet.h" #include "game_share/inventories.h" -#include "game_share/slot_types.h" +#include "game_share/slot_equipment.h" struct CInventoryItem { public: @@ -62,7 +62,7 @@ public: std::string name; std::vector Items; - std::vector removeBeforeEquip; + std::vector removeBeforeEquip; }; class CItemGroupManager {