comparison Actor.cpp @ 2300:4c3f91554be8

stru319::GetMagicalResistance renamed to stru319::DoesDmgTypeDoDamage
author Grumpy7
date Sun, 16 Mar 2014 19:58:02 +0100
parents b0f10ef66e00
children df24d11208df
comparison
equal deleted inserted replaced
2294:815d9ecf9881 2300:4c3f91554be8
3641 } 3641 }
3642 if ( pMonster->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime > 0 3642 if ( pMonster->pActorBuffs[ACTOR_BUFF_PAIN_REFLECTION].uExpireTime > 0
3643 && uDamageAmount != 0 ) 3643 && uDamageAmount != 0 )
3644 player->ReceiveDamage(uDamageAmount, attackElement); 3644 player->ReceiveDamage(uDamageAmount, attackElement);
3645 int knockbackValue = 20 * v61 / (signed int)pMonster->pMonsterInfo.uHP; 3645 int knockbackValue = 20 * v61 / (signed int)pMonster->pMonsterInfo.uHP;
3646 if ( (player->GetSpecialItemBonus(24) || hit_will_stun) && stru_50C198.GetMagicalResistance(pMonster, DMGT_EARTH) ) 3646 if ( (player->GetSpecialItemBonus(24) || hit_will_stun) && stru_50C198.DoesDmgTypeDoDamage(pMonster, DMGT_EARTH) )
3647 { 3647 {
3648 extraRecoveryTime = 20; 3648 extraRecoveryTime = 20;
3649 knockbackValue = 10; 3649 knockbackValue = 10;
3650 if ( !pParty->bTurnBasedModeOn ) 3650 if ( !pParty->bTurnBasedModeOn )
3651 extraRecoveryTime = (int)(flt_6BE3A8_debug_recmod2 * 42.66666666666666); 3651 extraRecoveryTime = (int)(flt_6BE3A8_debug_recmod2 * 42.66666666666666);
3655 pMonsterName = player->pName; // "%s stuns %s" 3655 pMonsterName = player->pName; // "%s stuns %s"
3656 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[635], player->pName, pMonster); 3656 sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[635], player->pName, pMonster);
3657 ShowStatusBarString(pTmpBuf.data(), 2u); 3657 ShowStatusBarString(pTmpBuf.data(), 2u);
3658 } 3658 }
3659 } 3659 }
3660 if ( hit_will_paralyze && pMonster->CanAct() && stru_50C198.GetMagicalResistance(pMonster, DMGT_EARTH)) 3660 if ( hit_will_paralyze && pMonster->CanAct() && stru_50C198.DoesDmgTypeDoDamage(pMonster, DMGT_EARTH))
3661 { 3661 {
3662 v43 = player->GetActualSkillLevel(PLAYER_SKILL_MACE); 3662 v43 = player->GetActualSkillLevel(PLAYER_SKILL_MACE);
3663 v45 = SkillToMastery(v43); 3663 v45 = SkillToMastery(v43);
3664 v46 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)(7680 * (v43 & 0x3F)) * 0.033333335); 3664 v46 = pParty->uTimePlayed + (signed int)(signed __int64)((double)(signed int)(7680 * (v43 & 0x3F)) * 0.033333335);
3665 pMonster->pActorBuffs[ACTOR_BUFF_PARALYZED].Apply(v46, v45, 0, 0, 0); 3665 pMonster->pActorBuffs[ACTOR_BUFF_PARALYZED].Apply(v46, v45, 0, 0, 0);