Mercurial > mm7
comparison Player.cpp @ 1424:5930342f092b
fall to the water
author | Ritor1 |
---|---|
date | Tue, 30 Jul 2013 15:14:46 +0600 |
parents | 2423bc2af692 |
children | 71a2cf416478 2489c8aeac90 |
comparison
equal
deleted
inserted
replaced
1423:350959f13283 | 1424:5930342f092b |
---|---|
8735 { | 8735 { |
8736 bool result; // eax@0 | 8736 bool result; // eax@0 |
8737 Player *v2; // edx@3 | 8737 Player *v2; // edx@3 |
8738 int v3; // ecx@3 | 8738 int v3; // ecx@3 |
8739 Player **pPlayers; // esi@8 | 8739 Player **pPlayers; // esi@8 |
8740 unsigned int v5; // ecx@8 | 8740 //bool item_flag; |
8741 Player *v6; // edx@9 | 8741 Player *v6; // edx@9 |
8742 | 8742 |
8743 if ( a1 < 1 || a1 > 4 ) | 8743 //if ( a1 < 1 || a1 > 4 ) |
8744 { | 8744 //{ |
8745 if ( !a1 ) | 8745 //if ( !a1 ) |
8746 { | 8746 //{ |
8747 pPlayers = &::pPlayers[1]; | 8747 //pPlayers = &::pPlayers[1]; |
8748 v5 = 604; | 8748 //v5 = 604; |
8749 while ( 1 ) | 8749 //while ( 1 ) |
8750 { | 8750 assert ( a1 > 0 && a1 < 5 ); |
8751 result = Player_has_item(v5, *pPlayers, 0); | 8751 for ( uint i = 1; i < (signed int)&qword_A750D8; ++i ) |
8752 if ( !result ) | 8752 { |
8753 break; | 8753 //item_flag = Player_has_item(604, *pPlayers, 0); |
8754 __debugbreak(); // player.cpp(8748): warning C4700: uninitialized local variable 'v6' used | 8754 if ( !Player_has_item(604, ::pPlayers[i], 0) ) |
8755 result = v6->pEquipment.uArmor; | 8755 return false; |
8756 if ( !result ) | 8756 //__debugbreak(); // player.cpp(8748): warning C4700: uninitialized local variable 'v6' used |
8757 break; | 8757 //result = ::pPlayers[i]->pEquipment.uArmor; |
8758 result *= 9; | 8758 if ( !::pPlayers[i]->pEquipment.uArmor ) |
8759 if ( *(int *)&v6->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v5 ) | 8759 return false; |
8760 break; | 8760 //result *= 9; |
8761 ++pPlayers; | 8761 if ( *(int *)&::pPlayers[i]->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * 9 + 5] != 604 ) |
8762 if ( (signed int)pPlayers >= (signed int)&qword_A750D8 ) | 8762 return false; |
8763 goto LABEL_13; | 8763 //++pPlayers; |
8764 } | 8764 //if ( (signed int)pPlayers >= (signed int)&qword_A750D8 ) |
8765 } | 8765 //return true; |
8766 goto LABEL_6; | 8766 } |
8767 } | 8767 return true; |
8768 result = Player_has_item(604u, ::pPlayers[a1], 0); | 8768 } |
8769 __debugbreak(); // player.cpp(8764): warning C4700: uninitialized local variable 'v2' used | 8769 //return false; |
8770 __debugbreak(); // player.cpp(8764): warning C4700: uninitialized local variable 'v3' used | 8770 //} |
8771 if ( !result | 8771 //result = Player_has_item(604u, ::pPlayers[a1], 0); |
8772 || (result = v2->pEquipment.uArmor) == 0 | 8772 //__debugbreak(); // player.cpp(8764): warning C4700: uninitialized local variable 'v2' used |
8773 || (result *= 9, *(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v3) ) | 8773 //__debugbreak(); // player.cpp(8764): warning C4700: uninitialized local variable 'v3' used |
8774 { | 8774 //if ( !result |
8775 LABEL_6: | 8775 // || (result = v2->pEquipment.uArmor) == 0 |
8776 LOBYTE(result) = 0; | 8776 // || (result *= 9, *(int *)&v2->spellbook.pDarkSpellbook.bIsSpellAvailable[4 * result + 5] != v3) ) |
8777 return result; | 8777 //{ |
8778 } | 8778 //LABEL_6: |
8779 LABEL_13: | 8779 //LOBYTE(result) = 0; |
8780 LOBYTE(result) = 1; | 8780 // return false; |
8781 return result; | 8781 //} |
8782 } | 8782 //LABEL_13: |
8783 //LOBYTE(result) = 1; | |
8784 //return true; | |
8785 //} | |
8783 //----- (0043EE15) -------------------------------------------------------- | 8786 //----- (0043EE15) -------------------------------------------------------- |
8784 bool __fastcall Player_has_item(unsigned int uItemID, Player *pPlayer, char a3) | 8787 bool __fastcall Player_has_item(unsigned int uItemID, Player *pPlayer, char a3) |
8785 { | 8788 { |
8786 if ( !a3 || pParty->pPickedItem.uItemID != uItemID ) | 8789 if ( !a3 || pParty->pPickedItem.uItemID != uItemID ) |
8787 { | 8790 { |