Mercurial > mm7
changeset 1348:3ed6dcf82912
Player::IsPlayerHealableByTemple final version
author | Grumpy7 |
---|---|
date | Sat, 13 Jul 2013 00:25:19 +0200 |
parents | 84db43e7db93 |
children | e721754db8ee |
files | Player.cpp Player.h |
diffstat | 2 files changed, 20 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/Player.cpp Fri Jul 12 23:08:35 2013 +0200 +++ b/Player.cpp Sat Jul 13 00:25:19 2013 +0200 @@ -415,33 +415,31 @@ //----- (004B6FF9) -------------------------------------------------------- -int Player::IsPlayerHealableByTemple() +bool Player::IsPlayerHealableByTemple() { signed int v2; // eax@1 v2 = (signed int)window_SpeakInHouse->ptr_1C; - - if ( this->sHealth < GetMaxHealth() || this->sMana < GetMaxMana() ) - { - return 1; - } - else if (GetMajorConditionIdx() == Condition_Zombie) - { - if ((v2 == 78 || v2 == 81 || v2 == 82)) - { - return 1; + if (this->sHealth >= GetMaxHealth() && this->sMana >= GetMaxMana() && GetMajorConditionIdx() == Condition_Good) + { + return false; + } + else + { + if (GetMajorConditionIdx() == Condition_Zombie) + { + if ((v2 == 78 || v2 == 81 || v2 == 82)) + { + return false; + } + else + { + return true; + } } else { - return 0; - } - } - else if (GetMajorConditionIdx() == Condition_Good) - { - return 0; - } - else - { - return 1; + return true; + } } }
--- a/Player.h Fri Jul 12 23:08:35 2013 +0200 +++ b/Player.h Sat Jul 13 00:25:19 2013 +0200 @@ -576,7 +576,7 @@ void PlayEmotion(CHARACTER_EXPRESSION_ID expression, int a3); void ItemsEnchant(int enchant_count); unsigned int GetItemIDAtInventoryIndex(int *a2); - int IsPlayerHealableByTemple(); + bool IsPlayerHealableByTemple(); int GetBaseIdentifyPrice(float a2); int GetBaseRepairPrice(int a2, float a3); int GetBaseBuyingPrice(int a2, float a3);