# HG changeset patch # User Grumpy7 # Date 1379207292 -7200 # Node ID 511cd6dd10488168fe57e51beade08695b4d285e # Parent 25d3f9e43634c52ee5bd24b93157ce670225b131 _43ED6F_check_party_races to IsDwarfPresentInParty diff -r 25d3f9e43634 -r 511cd6dd1048 Player.cpp --- 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) { diff -r 25d3f9e43634 -r 511cd6dd1048 UI/UICharacter.cpp --- a/UI/UICharacter.cpp Sun Sep 15 02:21:26 2013 +0200 +++ b/UI/UICharacter.cpp Sun Sep 15 03:08:12 2013 +0200 @@ -1810,7 +1810,7 @@ paperdoll_helm_texture[i][14] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); GetItemTextureFilename(pContainer, 544, i + 1, 0); paperdoll_helm_texture[i][15] = pIcons_LOD->LoadTexture(pContainer, TEXTURE_16BIT_PALETTE); - if ( _43ED6F_check_party_races(true) ) + if ( IsDwarfPresentInParty(true) ) //the phynaxian helm uses a slightly different graphic for dwarves papredoll_dbrds[11] = pIcons_LOD->LoadTexture("item092v3", TEXTURE_16BIT_PALETTE); } //v43 = 0; diff -r 25d3f9e43634 -r 511cd6dd1048 mm7_data.h --- a/mm7_data.h Sun Sep 15 02:21:26 2013 +0200 +++ b/mm7_data.h Sun Sep 15 03:08:12 2013 +0200 @@ -1142,7 +1142,7 @@ void sub_43B1B0(signed int a1, unsigned int a2, struct Vec3_int_ *pVelocity, signed int a4); void CharacterUI_LoadPaperdollTextures(); int __fastcall GetItemTextureFilename(char *pOut, signed int item_id, int index, int shoulder); -bool _43ED6F_check_party_races(bool b); +bool IsDwarfPresentInParty(bool b); bool ShouldLoadTexturesForRaceAndGender(unsigned int _this); void WetsuitOn(unsigned int uPlayerID); // idb void WetsuitOff(unsigned int uPlayerID);