mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 01:09:50 +00:00
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)
|
||||
{
|
||||
SLOT_EQUIPMENT::TSlotEquipment slot = SLOT_EQUIPMENT::stringToSlotEquipment(NLMISC::toUpper(slotName));
|
||||
if(slot)
|
||||
removeBeforeEquip.push_back(slot);
|
||||
if(slot != SLOT_EQUIPMENT::UNDEFINED)
|
||||
addRemove(slot);
|
||||
}
|
||||
|
||||
void CItemGroup::addRemove(SLOT_EQUIPMENT::TSlotEquipment slot)
|
||||
|
|
Loading…
Reference in a new issue