Use correct comparison between enum
Was previously (badly) relying on int as boolean behaviour Solves a bug where remove slot was not working with headdress (value 0 in enum TSlotEquipment) --HG-- branch : develop
This commit is contained in:
parent
cdf648fd4f
commit
63138ba784
1 changed files with 2 additions and 2 deletions
|
@ -94,8 +94,8 @@ void CItemGroup::addItem(sint32 createTime, sint32 serial, SLOT_EQUIPMENT::TSlot
|
||||||
void CItemGroup::addRemove(std::string slotName)
|
void CItemGroup::addRemove(std::string slotName)
|
||||||
{
|
{
|
||||||
SLOT_EQUIPMENT::TSlotEquipment slot = SLOT_EQUIPMENT::stringToSlotEquipment(NLMISC::toUpper(slotName));
|
SLOT_EQUIPMENT::TSlotEquipment slot = SLOT_EQUIPMENT::stringToSlotEquipment(NLMISC::toUpper(slotName));
|
||||||
if(slot)
|
if(slot != SLOT_EQUIPMENT::UNDEFINED)
|
||||||
removeBeforeEquip.push_back(slot);
|
addRemove(slot);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CItemGroup::addRemove(SLOT_EQUIPMENT::TSlotEquipment slot)
|
void CItemGroup::addRemove(SLOT_EQUIPMENT::TSlotEquipment slot)
|
||||||
|
|
Loading…
Reference in a new issue