diff Player.cpp @ 1278:ce8ea73e7678

changed Player::_4B6FF9 to Player::IsPlayerHealableByTemple
author Grumpy7
date Sat, 15 Jun 2013 07:52:05 +0200
parents f11651288371
children 86a83e12d795
line wrap: on
line diff
--- a/Player.cpp	Sat Jun 15 07:50:08 2013 +0200
+++ b/Player.cpp	Sat Jun 15 07:52:05 2013 +0200
@@ -412,30 +412,27 @@
 
 
 //----- (004B6FF9) --------------------------------------------------------
-int Player::_4B6FF9()
-{
-  Player *v1; // esi@1
+int Player::IsPlayerHealableByTemple()
+{
   signed int v2; // eax@1
-  char v3; // zf@4
-
-  v1 = this;
   v2 = (signed int)window_SpeakInHouse->ptr_1C;
-  if ( (v2 == 78 || v2 > 80) && v2 <= 82 )
-  {
-    if ( GetMajorConditionIdx() == 18 )
-      goto LABEL_6;
-    v3 = GetMajorConditionIdx() == 17;
+
+  if ( this->sHealth < GetMaxHealth() || this->sMana < GetMaxMana() )
+  {
+    return 1;
+  }
+  else if (GetMajorConditionIdx() == 18)
+  {
+    return 0;
+  }
+  else if (GetMajorConditionIdx() == 17 && (v2 == 78 || v2 > 80) && v2 <= 82)
+  {
+    return 0;
   }
   else
   {
-    v3 = GetMajorConditionIdx() == 18;
-  }
-  if ( !v3 )
     return 1;
-LABEL_6:
-  if ( v1->sHealth < GetMaxHealth() || v1->sMana < GetMaxMana() )
-    return 1;
-  return 0;
+  }
 }