# HG changeset patch # User Grumpy7 # Date 1373714045 -7200 # Node ID af2fc30d765f4a585044277f1fe98c901da87b10 # Parent 05becb008006377e3621852cbd7267d925c76305 Player::CanAct, Player::CanSteal shortened a bit diff -r 05becb008006 -r af2fc30d765f Player.cpp --- a/Player.cpp Sat Jul 13 13:12:21 2013 +0200 +++ b/Player.cpp Sat Jul 13 13:14:05 2013 +0200 @@ -628,7 +628,7 @@ } //----- (0049327B) -------------------------------------------------------- -bool Player::GetProfessionOrGuildFlags( unsigned int uClass, int a3 ) +bool Player::ProfessionOrGuildFlagsCorrect( unsigned int uClass, int a3 ) { if ( this->classType == uClass ) { @@ -663,24 +663,18 @@ //----- (00492C0B) -------------------------------------------------------- bool Player::CanAct() { - bool result; // eax@2 - if ( this->pConditions[Condition_Sleep] || this->pConditions[Condition_Paralyzed] || this->pConditions[Condition_Unconcious] || this->pConditions[Condition_Dead] || this->pConditions[Condition_Pertified] || this->pConditions[Condition_Eradicated] ) - result = false; + return false; else - result = true; - return result; + return true; } //----- (00492C40) -------------------------------------------------------- bool Player::CanSteal() { - int v1; // eax@1 - - LOBYTE(v1) = GetActualSkillLevel(PLAYER_SKILL_STEALING); - return v1 != 0; + return GetActualSkillLevel(PLAYER_SKILL_STEALING) != 0; } //----- (00492C4E) -------------------------------------------------------- diff -r 05becb008006 -r af2fc30d765f Player.h --- a/Player.h Sat Jul 13 13:12:21 2013 +0200 +++ b/Player.h Sat Jul 13 13:14:05 2013 +0200 @@ -571,7 +571,7 @@ bool CanSteal(); bool CanEquip_RaceAndAlignmentCheck(unsigned int uItemID); int SetCondition(unsigned int uConditionIdx, int a3); - bool GetProfessionOrGuildFlags(unsigned int uClass, int a3); + bool ProfessionOrGuildFlagsCorrect(unsigned int uClass, int a3); void PlaySound(PlayerSpeech speech, int a3); void PlayEmotion(CHARACTER_EXPRESSION_ID expression, int a3); void ItemsEnchant(int enchant_count); diff -r 05becb008006 -r af2fc30d765f mm7_4.cpp --- a/mm7_4.cpp Sat Jul 13 13:12:21 2013 +0200 +++ b/mm7_4.cpp Sat Jul 13 13:14:05 2013 +0200 @@ -5497,13 +5497,13 @@ switch ( dword_F8B1AC_award_bit_number ) { case 19: - if ( pPlayers[uActiveCharacter]->GetProfessionOrGuildFlags(0x22u, 1) == 1 ) + if ( pPlayers[uActiveCharacter]->ProfessionOrGuildFlagsCorrect(0x22u, 1) == 1 ) { if ( !gold_transaction_amount ) goto LABEL_79; goto LABEL_42; } - if ( pPlayers[uActiveCharacter]->GetProfessionOrGuildFlags(0x1Au, 1) == 1 ) + if ( pPlayers[uActiveCharacter]->ProfessionOrGuildFlagsCorrect(0x1Au, 1) == 1 ) { if ( !gold_transaction_amount ) goto LABEL_79; @@ -5511,13 +5511,13 @@ } return v35; case 20: - if ( pPlayers[uActiveCharacter]->GetProfessionOrGuildFlags(0x23u, 1) == 1 ) + if ( pPlayers[uActiveCharacter]->ProfessionOrGuildFlagsCorrect(0x23u, 1) == 1 ) { if ( !gold_transaction_amount ) goto LABEL_79; goto LABEL_42; } - if ( pPlayers[uActiveCharacter]->GetProfessionOrGuildFlags(0x1Bu, 1) == 1 ) + if ( pPlayers[uActiveCharacter]->ProfessionOrGuildFlagsCorrect(0x1Bu, 1) == 1 ) { if ( !gold_transaction_amount ) goto LABEL_79;