Mercurial > mm7
diff Conditions.cpp @ 2264:47b87aea14ba
m
author | Ritor1 |
---|---|
date | Sat, 08 Mar 2014 22:23:20 +0600 |
parents | aff7a7b072b7 |
children | f4af3b203f65 |
line wrap: on
line diff
--- a/Conditions.cpp Thu Mar 06 00:41:04 2014 +0100 +++ b/Conditions.cpp Sat Mar 08 22:23:20 2014 +0600 @@ -28,16 +28,14 @@ bool ConditionProcessor::IsPlayerAffected( Player* inPlayer, int condToCheck, int blockable) { if ( !blockable ) - { return true; - } ConditionProcessor* thisProc = &conditionArray[condToCheck]; if (thisProc->m_IsBlockedByProtFromMagic && pParty->pPartyBuffs[PARTY_BUFF_PROTECTION_FROM_MAGIC].uExpireTime > 0) { if (!(thisProc->m_DoesNeedGmProtFromMagic && pParty->pPartyBuffs[PARTY_BUFF_PROTECTION_FROM_MAGIC].uSkill < 4)) { --pParty->pPartyBuffs[PARTY_BUFF_PROTECTION_FROM_MAGIC].uPower; - if ( pParty->pPartyBuffs[PARTY_BUFF_PROTECTION_FROM_MAGIC].uPower < 1u ) + if ( pParty->pPartyBuffs[PARTY_BUFF_PROTECTION_FROM_MAGIC].uPower < 1 ) pParty->pPartyBuffs[PARTY_BUFF_PROTECTION_FROM_MAGIC].Reset(); return false; } @@ -50,24 +48,18 @@ for (unsigned int i = 0; i < thisProc->m_equipmentPairs.size() / 2; i++) { if (thisProc->m_equipmentPairs[i * 2].m_ItemId == (ITEM_TYPE)0) - { return true; - } ITEM_TYPE itemId = thisProc->m_equipmentPairs[i * 2].m_ItemId; ITEM_EQUIP_TYPE slot = thisProc->m_equipmentPairs[i * 2 + 1].m_EquipSlot; if (slot == EQIUP_ANY) { if (inPlayer->WearsItemAnyWhere(itemId)) - { return false; - } } else { if (inPlayer->WearsItem(itemId, slot)) - { return false; - } } } return true;