comparison Player.cpp @ 1949:2f45768fcb7a

pActorBuffs[3] to pActorBuffs[ACTOR_BUFF_SHRINK]
author Grumpy7
date Fri, 25 Oct 2013 11:11:31 -0700
parents 140ca8123384
children 998e1babff31
comparison
equal deleted inserted replaced
1948:7fd4bfa175fd 1949:2f45768fcb7a
7297 default: Error("Unexpected sound value"); 7297 default: Error("Unexpected sound value");
7298 } 7298 }
7299 } 7299 }
7300 pAudioPlayer->PlaySound(soundToPlay, PID(OBJECT_Player,a4 + 80), 0, -1, 0, 0, 0, 0); 7300 pAudioPlayer->PlaySound(soundToPlay, PID(OBJECT_Player,a4 + 80), 0, -1, 0, 0, 0, 0);
7301 int dmgToReceive = actorPtr->_43B3E0_CalcDamage(dmgSource); 7301 int dmgToReceive = actorPtr->_43B3E0_CalcDamage(dmgSource);
7302 if ( actorPtr->pActorBuffs[3].uExpireTime > 0 ) 7302 if ( actorPtr->pActorBuffs[ACTOR_BUFF_SHRINK].uExpireTime > 0 )
7303 { 7303 {
7304 __int16 spellPower = actorPtr->pActorBuffs[3].uPower; 7304 __int16 spellPower = actorPtr->pActorBuffs[ACTOR_BUFF_SHRINK].uPower;
7305 if ( spellPower ) 7305 if ( spellPower )
7306 dmgToReceive /= (signed int)spellPower; 7306 dmgToReceive /= (signed int)spellPower;
7307 } 7307 }
7308 int damageType; 7308 int damageType;
7309 switch (dmgSource) 7309 switch (dmgSource)
7484 ItemGen* offHandItem = playerPtr->GetOffHandItem(); 7484 ItemGen* offHandItem = playerPtr->GetOffHandItem();
7485 if ( offHandItem->uItemID == ITEM_RELIC_KELEBRIM || offHandItem->uItemID == ITEM_ARTIFACT_ELFBANE || (offHandItem->GetItemEquipType() == EQUIP_SHIELD && SkillToMastery(playerPtr->pActiveSkills[PLAYER_SKILL_SHIELD]) == 4)) 7485 if ( offHandItem->uItemID == ITEM_RELIC_KELEBRIM || offHandItem->uItemID == ITEM_ARTIFACT_ELFBANE || (offHandItem->GetItemEquipType() == EQUIP_SHIELD && SkillToMastery(playerPtr->pActiveSkills[PLAYER_SKILL_SHIELD]) == 4))
7486 dmgToReceive >>= 1; 7486 dmgToReceive >>= 1;
7487 } 7487 }
7488 } 7488 }
7489 if ( actorPtr->pActorBuffs[3].uExpireTime > 0 ) 7489 if ( actorPtr->pActorBuffs[ACTOR_BUFF_SHRINK].uExpireTime > 0 )
7490 { 7490 {
7491 int spellPower = actorPtr->pActorBuffs[3].uPower; 7491 int spellPower = actorPtr->pActorBuffs[ACTOR_BUFF_SHRINK].uPower;
7492 if ( spellPower ) 7492 if ( spellPower )
7493 dmgToReceive /= (signed int)spellPower; 7493 dmgToReceive /= (signed int)spellPower;
7494 } 7494 }
7495 int damageType; 7495 int damageType;
7496 switch(dmgSource) 7496 switch(dmgSource)