Mercurial > mm7
comparison Player.cpp @ 1355:af2fc30d765f
Player::CanAct, Player::CanSteal shortened a bit
author | Grumpy7 |
---|---|
date | Sat, 13 Jul 2013 13:14:05 +0200 |
parents | 05becb008006 |
children | 301e227439e7 |
comparison
equal
deleted
inserted
replaced
1354:05becb008006 | 1355:af2fc30d765f |
---|---|
626 expression = new_expression; | 626 expression = new_expression; |
627 viewparams->bRedrawGameUI = 1; | 627 viewparams->bRedrawGameUI = 1; |
628 } | 628 } |
629 | 629 |
630 //----- (0049327B) -------------------------------------------------------- | 630 //----- (0049327B) -------------------------------------------------------- |
631 bool Player::GetProfessionOrGuildFlags( unsigned int uClass, int a3 ) | 631 bool Player::ProfessionOrGuildFlagsCorrect( unsigned int uClass, int a3 ) |
632 { | 632 { |
633 if ( this->classType == uClass ) | 633 if ( this->classType == uClass ) |
634 { | 634 { |
635 return true; | 635 return true; |
636 } | 636 } |
661 | 661 |
662 | 662 |
663 //----- (00492C0B) -------------------------------------------------------- | 663 //----- (00492C0B) -------------------------------------------------------- |
664 bool Player::CanAct() | 664 bool Player::CanAct() |
665 { | 665 { |
666 bool result; // eax@2 | |
667 | |
668 if ( this->pConditions[Condition_Sleep] || this->pConditions[Condition_Paralyzed] || | 666 if ( this->pConditions[Condition_Sleep] || this->pConditions[Condition_Paralyzed] || |
669 this->pConditions[Condition_Unconcious] || this->pConditions[Condition_Dead] || | 667 this->pConditions[Condition_Unconcious] || this->pConditions[Condition_Dead] || |
670 this->pConditions[Condition_Pertified] || this->pConditions[Condition_Eradicated] ) | 668 this->pConditions[Condition_Pertified] || this->pConditions[Condition_Eradicated] ) |
671 result = false; | 669 return false; |
672 else | 670 else |
673 result = true; | 671 return true; |
674 return result; | |
675 } | 672 } |
676 | 673 |
677 //----- (00492C40) -------------------------------------------------------- | 674 //----- (00492C40) -------------------------------------------------------- |
678 bool Player::CanSteal() | 675 bool Player::CanSteal() |
679 { | 676 { |
680 int v1; // eax@1 | 677 return GetActualSkillLevel(PLAYER_SKILL_STEALING) != 0; |
681 | |
682 LOBYTE(v1) = GetActualSkillLevel(PLAYER_SKILL_STEALING); | |
683 return v1 != 0; | |
684 } | 678 } |
685 | 679 |
686 //----- (00492C4E) -------------------------------------------------------- | 680 //----- (00492C4E) -------------------------------------------------------- |
687 bool Player::CanEquip_RaceAndAlignmentCheck(unsigned int uItemID) | 681 bool Player::CanEquip_RaceAndAlignmentCheck(unsigned int uItemID) |
688 { | 682 { |