Mercurial > mm7
diff 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 |
line wrap: on
line diff
--- a/Player.cpp Sun Sep 15 02:21:26 2013 +0200 +++ b/Player.cpp Sun Sep 15 03:08:12 2013 +0200 @@ -7450,27 +7450,20 @@ return false; } //----- (0043ED6F) -------------------------------------------------------- -bool _43ED6F_check_party_races(bool a1) -{ - bool v6; // zf@5 - +bool IsDwarfPresentInParty(bool a1) +{ for (uint i = 0; i < 4; ++i) { - auto player = pParty->pPlayers + i; - auto race = player->GetRace(); - - if (race != CHARACTER_RACE_HUMAN && - race != CHARACTER_RACE_ELF && - race != CHARACTER_RACE_GOBLIN) - v6 = a1 == 1; - else - v6 = !a1; - - if (v6) + CHARACTER_RACE race = pParty->pPlayers[i].GetRace(); + + if (race == CHARACTER_RACE_DWARF && a1) + return true; + else if (race != CHARACTER_RACE_DWARF && !a1) return true; } return false; } + //----- (00439FCB) -------------------------------------------------------- void __fastcall DamagePlayerFromMonster(unsigned int uObjID, int a2, Vec3_int_ *pPos, unsigned int a4) {