comparison Player.cpp @ 1647:511cd6dd1048

_43ED6F_check_party_races to IsDwarfPresentInParty
author Grumpy7
date Sun, 15 Sep 2013 03:08:12 +0200
parents 61ea994a1812
children a4390cef284c
comparison
equal deleted inserted replaced
1621:25d3f9e43634 1647:511cd6dd1048
7448 } 7448 }
7449 } 7449 }
7450 return false; 7450 return false;
7451 } 7451 }
7452 //----- (0043ED6F) -------------------------------------------------------- 7452 //----- (0043ED6F) --------------------------------------------------------
7453 bool _43ED6F_check_party_races(bool a1) 7453 bool IsDwarfPresentInParty(bool a1)
7454 { 7454 {
7455 bool v6; // zf@5
7456
7457 for (uint i = 0; i < 4; ++i) 7455 for (uint i = 0; i < 4; ++i)
7458 { 7456 {
7459 auto player = pParty->pPlayers + i; 7457 CHARACTER_RACE race = pParty->pPlayers[i].GetRace();
7460 auto race = player->GetRace(); 7458
7461 7459 if (race == CHARACTER_RACE_DWARF && a1)
7462 if (race != CHARACTER_RACE_HUMAN &&
7463 race != CHARACTER_RACE_ELF &&
7464 race != CHARACTER_RACE_GOBLIN)
7465 v6 = a1 == 1;
7466 else
7467 v6 = !a1;
7468
7469 if (v6)
7470 return true; 7460 return true;
7461 else if (race != CHARACTER_RACE_DWARF && !a1)
7462 return true;
7471 } 7463 }
7472 return false; 7464 return false;
7473 } 7465 }
7466
7474 //----- (00439FCB) -------------------------------------------------------- 7467 //----- (00439FCB) --------------------------------------------------------
7475 void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, Vec3_int_ *pPos, unsigned int a4) 7468 void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, Vec3_int_ *pPos, unsigned int a4)
7476 { 7469 {
7477 signed int v4; // esi@1 7470 signed int v4; // esi@1
7478 unsigned int v5; // ecx@1 7471 unsigned int v5; // ecx@1