Mercurial > mm7
comparison Actor.cpp @ 1876:2070d01ccfae
Actor::_43B3E0_CalcDamage changed to non-static
author | Grumpy7 |
---|---|
date | Thu, 17 Oct 2013 09:00:11 +0200 |
parents | 1d9e4b50bc7c |
children | bed4532cfe59 |
comparison
equal
deleted
inserted
replaced
1875:1d9e4b50bc7c | 1876:2070d01ccfae |
---|---|
1391 } | 1391 } |
1392 return; | 1392 return; |
1393 } | 1393 } |
1394 | 1394 |
1395 //----- (0043B3E0) -------------------------------------------------------- | 1395 //----- (0043B3E0) -------------------------------------------------------- |
1396 int Actor::_43B3E0_CalcDamage(Actor *a1, signed int dmgSource) | 1396 int Actor::_43B3E0_CalcDamage( signed int dmgSource ) |
1397 { | 1397 { |
1398 signed int v2; // ebp@1 | 1398 signed int v2; // ebp@1 |
1399 int v3; // eax@9 | 1399 int v3; // eax@9 |
1400 signed int v4; // edi@9 | 1400 signed int v4; // edi@9 |
1401 int v5; // esi@9 | 1401 int v5; // esi@9 |
1408 v11 = 0; | 1408 v11 = 0; |
1409 | 1409 |
1410 switch( dmgSource ) | 1410 switch( dmgSource ) |
1411 { | 1411 { |
1412 case 0: | 1412 case 0: |
1413 if ( a1->pActorBuffs[14].uExpireTime > 0 ) | 1413 if ( this->pActorBuffs[14].uExpireTime > 0 ) |
1414 v2 = a1->pActorBuffs[14].uPower; | 1414 v2 = this->pActorBuffs[14].uPower; |
1415 if ( a1->pActorBuffs[18].uExpireTime > 0 && a1->pActorBuffs[18].uPower > v2 ) | 1415 if ( this->pActorBuffs[18].uExpireTime > 0 && this->pActorBuffs[18].uPower > v2 ) |
1416 v2 = a1->pActorBuffs[18].uPower; | 1416 v2 = this->pActorBuffs[18].uPower; |
1417 if ( a1->pActorBuffs[21].uExpireTime > 0 ) | 1417 if ( this->pActorBuffs[21].uExpireTime > 0 ) |
1418 v2 += a1->pActorBuffs[21].uPower; | 1418 v2 += this->pActorBuffs[21].uPower; |
1419 v3 = a1->pMonsterInfo.uAttack1DamageDiceRolls; | 1419 v3 = this->pMonsterInfo.uAttack1DamageDiceRolls; |
1420 v4 = a1->pMonsterInfo.uAttack1DamageDiceSides; | 1420 v4 = this->pMonsterInfo.uAttack1DamageDiceSides; |
1421 v5 = a1->pMonsterInfo.uAttack1DamageBonus; | 1421 v5 = this->pMonsterInfo.uAttack1DamageBonus; |
1422 break; | 1422 break; |
1423 case 1: | 1423 case 1: |
1424 v3 = a1->pMonsterInfo.uAttack2DamageDiceRolls; | 1424 v3 = this->pMonsterInfo.uAttack2DamageDiceRolls; |
1425 v4 = a1->pMonsterInfo.uAttack2DamageDiceSides; | 1425 v4 = this->pMonsterInfo.uAttack2DamageDiceSides; |
1426 v5 = a1->pMonsterInfo.uAttack2DamageBonus; | 1426 v5 = this->pMonsterInfo.uAttack2DamageBonus; |
1427 break; | 1427 break; |
1428 case 2: | 1428 case 2: |
1429 v8 = a1->pMonsterInfo.uSpellSkillAndMastery1; | 1429 v8 = this->pMonsterInfo.uSpellSkillAndMastery1; |
1430 v9 = a1->pMonsterInfo.uSpell1ID; | 1430 v9 = this->pMonsterInfo.uSpell1ID; |
1431 v10 = SkillToMastery(v8); | 1431 v10 = SkillToMastery(v8); |
1432 return _43AFE3_calc_spell_damage(v9, v8 & 0x3F, v10, 0); | 1432 return _43AFE3_calc_spell_damage(v9, v8 & 0x3F, v10, 0); |
1433 break; | 1433 break; |
1434 case 3: | 1434 case 3: |
1435 v8 = a1->pMonsterInfo.uSpellSkillAndMastery2; | 1435 v8 = this->pMonsterInfo.uSpellSkillAndMastery2; |
1436 v9 = a1->pMonsterInfo.uSpell2ID; | 1436 v9 = this->pMonsterInfo.uSpell2ID; |
1437 v10 = SkillToMastery(v8); | 1437 v10 = SkillToMastery(v8); |
1438 return _43AFE3_calc_spell_damage(v9, v8 & 0x3F, v10, 0); | 1438 return _43AFE3_calc_spell_damage(v9, v8 & 0x3F, v10, 0); |
1439 break; | 1439 break; |
1440 case 4: | 1440 case 4: |
1441 v3 = a1->pMonsterInfo.uSpecialAbilityDamageDiceRolls; | 1441 v3 = this->pMonsterInfo.uSpecialAbilityDamageDiceRolls; |
1442 v4 = a1->pMonsterInfo.uSpecialAbilityDamageDiceSides; | 1442 v4 = this->pMonsterInfo.uSpecialAbilityDamageDiceSides; |
1443 v5 = a1->pMonsterInfo.uSpecialAbilityDamageDiceBonus; | 1443 v5 = this->pMonsterInfo.uSpecialAbilityDamageDiceBonus; |
1444 default: | 1444 default: |
1445 return 0; | 1445 return 0; |
1446 } | 1446 } |
1447 for ( int i = 0; i < v3; i++) | 1447 for ( int i = 0; i < v3; i++) |
1448 { | 1448 { |