Mercurial > mm7
comparison Player.cpp @ 1348:3ed6dcf82912
Player::IsPlayerHealableByTemple final version
author | Grumpy7 |
---|---|
date | Sat, 13 Jul 2013 00:25:19 +0200 |
parents | 84db43e7db93 |
children | e721754db8ee |
comparison
equal
deleted
inserted
replaced
1347:84db43e7db93 | 1348:3ed6dcf82912 |
---|---|
413 | 413 |
414 | 414 |
415 | 415 |
416 | 416 |
417 //----- (004B6FF9) -------------------------------------------------------- | 417 //----- (004B6FF9) -------------------------------------------------------- |
418 int Player::IsPlayerHealableByTemple() | 418 bool Player::IsPlayerHealableByTemple() |
419 { | 419 { |
420 signed int v2; // eax@1 | 420 signed int v2; // eax@1 |
421 v2 = (signed int)window_SpeakInHouse->ptr_1C; | 421 v2 = (signed int)window_SpeakInHouse->ptr_1C; |
422 | 422 if (this->sHealth >= GetMaxHealth() && this->sMana >= GetMaxMana() && GetMajorConditionIdx() == Condition_Good) |
423 if ( this->sHealth < GetMaxHealth() || this->sMana < GetMaxMana() ) | 423 { |
424 { | 424 return false; |
425 return 1; | 425 } |
426 } | 426 else |
427 else if (GetMajorConditionIdx() == Condition_Zombie) | 427 { |
428 { | 428 if (GetMajorConditionIdx() == Condition_Zombie) |
429 if ((v2 == 78 || v2 == 81 || v2 == 82)) | 429 { |
430 { | 430 if ((v2 == 78 || v2 == 81 || v2 == 82)) |
431 return 1; | 431 { |
432 return false; | |
433 } | |
434 else | |
435 { | |
436 return true; | |
437 } | |
432 } | 438 } |
433 else | 439 else |
434 { | 440 { |
435 return 0; | 441 return true; |
436 } | 442 } |
437 } | |
438 else if (GetMajorConditionIdx() == Condition_Good) | |
439 { | |
440 return 0; | |
441 } | |
442 else | |
443 { | |
444 return 1; | |
445 } | 443 } |
446 } | 444 } |
447 | 445 |
448 | 446 |
449 | 447 |