Mercurial > mm7
changeset 1647:511cd6dd1048
_43ED6F_check_party_races to IsDwarfPresentInParty
author | Grumpy7 |
---|---|
date | Sun, 15 Sep 2013 03:08:12 +0200 |
parents | 25d3f9e43634 |
children | a4390cef284c |
files | Player.cpp UI/UICharacter.cpp mm7_data.h |
diffstat | 3 files changed, 10 insertions(+), 17 deletions(-) [+] |
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) {
--- 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;
--- 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);