Mercurial > mm7
diff Conditions.cpp @ 1563:0311debb684c
splitting Player::WearsItem into two functions
author | Grumpy7 |
---|---|
date | Sun, 08 Sep 2013 02:41:10 +0200 |
parents | b3ac17fd12de |
children | 9856c2f8f918 |
line wrap: on
line diff
--- a/Conditions.cpp Sun Sep 08 01:23:37 2013 +0200 +++ b/Conditions.cpp Sun Sep 08 02:41:10 2013 +0200 @@ -54,9 +54,19 @@ } ITEM_TYPE itemId = thisProc->m_equipmentPairs[i * 2].m_ItemId; ITEM_EQUIP_TYPE slot = thisProc->m_equipmentPairs[i * 2 + 1].m_EquipSlot; - if (inPlayer->WearsItem(itemId, slot)) + if (slot == EQIUP_ANY) { - return false; + if (inPlayer->WearsItemAnyWhere(itemId)) + { + return false; + } + } + else + { + if (inPlayer->WearsItem(itemId, slot)) + { + return false; + } } } return true;