comparison Player.cpp @ 1432:2489c8aeac90

.
author Nomad
date Fri, 02 Aug 2013 19:28:36 +0200
parents 5930342f092b
children a6d966e85611
comparison
equal deleted inserted replaced
1429:c7489dd19f88 1432:2489c8aeac90
7995 v27->uReputation += val; 7995 v27->uReputation += val;
7996 if ( v27->uReputation > 10000 ) 7996 if ( v27->uReputation > 10000 )
7997 v27->uReputation = 10000; 7997 v27->uReputation = 10000;
7998 } 7998 }
7999 } 7999 }
8000 // 506568: using guessed type int dword_506568;
8001 // 507948: using guessed type char bFlashHistoryBook;
8002 // 507949: using guessed type char bFlashAutonotesBook;
8003 // 50794A: using guessed type char bFlashQuestBook;
8004 // 72371C: using guessed type int dword_72371C[];
8005 // 723E80: using guessed type int dword_723E80_award_related[];
8006
8007
8008 8000
8009 8001
8010 //----- (0044B9C4) -------------------------------------------------------- 8002 //----- (0044B9C4) --------------------------------------------------------
8011 bool Player::SubtractVariable(enum VariableType VarNum, signed int pValue) 8003 bool Player::SubtractVariable(enum VariableType VarNum, signed int pValue)
8012 { 8004 {
8746 //{ 8738 //{
8747 //pPlayers = &::pPlayers[1]; 8739 //pPlayers = &::pPlayers[1];
8748 //v5 = 604; 8740 //v5 = 604;
8749 //while ( 1 ) 8741 //while ( 1 )
8750 assert ( a1 > 0 && a1 < 5 ); 8742 assert ( a1 > 0 && a1 < 5 );
8751 for ( uint i = 1; i < (signed int)&qword_A750D8; ++i ) 8743 for ( uint i = 1; i < 5; ++i )
8752 { 8744 {
8753 //item_flag = Player_has_item(604, *pPlayers, 0); 8745 //item_flag = Player_has_item(604, *pPlayers, 0);
8754 if ( !Player_has_item(604, ::pPlayers[i], 0) ) 8746 if ( !Player_has_item(604, ::pPlayers[i], 0) )
8755 return false; 8747 return false;
8756 //__debugbreak(); // player.cpp(8748): warning C4700: uninitialized local variable 'v6' used 8748 //__debugbreak(); // player.cpp(8748): warning C4700: uninitialized local variable 'v6' used
8757 //result = ::pPlayers[i]->pEquipment.uArmor; 8749 //result = ::pPlayers[i]->pEquipment.uArmor;
8758 if ( !::pPlayers[i]->pEquipment.uArmor ) 8750 if ( !::pPlayers[i]->pEquipment.uArmor )
8759 return false; 8751 return false;
8760 //result *= 9; 8752 //result *= 9;
8761 if ( *(int *)&::pPlayers[i]->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * 9 + 5] != 604 ) 8753 if (::pPlayers[i]->pEquippedItems[::pPlayers[i]->pEquipment.uArmor].uItemID != 604 )
8762 return false; 8754 return false;
8763 //++pPlayers; 8755 //++pPlayers;
8764 //if ( (signed int)pPlayers >= (signed int)&qword_A750D8 ) 8756 //if ( (signed int)pPlayers >= (signed int)&qword_A750D8 )
8765 //return true; 8757 //return true;
8766 } 8758 }
8767 return true; 8759 return true;
8768 } 8760 }
8769 //return false; 8761
8770 //}
8771 //result = Player_has_item(604u, ::pPlayers[a1], 0);
8772 //__debugbreak(); // player.cpp(8764): warning C4700: uninitialized local variable 'v2' used
8773 //__debugbreak(); // player.cpp(8764): warning C4700: uninitialized local variable 'v3' used
8774 //if ( !result
8775 // || (result = v2->pEquipment.uArmor) == 0
8776 // || (result *= 9, *(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v3) )
8777 //{
8778 //LABEL_6:
8779 //LOBYTE(result) = 0;
8780 // return false;
8781 //}
8782 //LABEL_13:
8783 //LOBYTE(result) = 1;
8784 //return true;
8785 //}
8786 //----- (0043EE15) -------------------------------------------------------- 8762 //----- (0043EE15) --------------------------------------------------------
8787 bool __fastcall Player_has_item(unsigned int uItemID, Player *pPlayer, char a3) 8763 bool __fastcall Player_has_item(unsigned int uItemID, Player *pPlayer, char a3)
8788 { 8764 {
8789 if ( !a3 || pParty->pPickedItem.uItemID != uItemID ) 8765 if ( !a3 || pParty->pPickedItem.uItemID != uItemID )
8790 { 8766 {