Mercurial > mm7
changeset 533:f0eff7c35a2b
m
author | Ritor1 |
---|---|
date | Fri, 01 Mar 2013 22:03:57 +0600 |
parents | 968f4053da7f |
children | 69ef7c749e18 |
files | Events.cpp |
diffstat | 1 files changed, 55 insertions(+), 67 deletions(-) [+] |
line wrap: on
line diff
--- a/Events.cpp Fri Mar 01 20:38:43 2013 +0600 +++ b/Events.cpp Fri Mar 01 22:03:57 2013 +0600 @@ -888,9 +888,6 @@ pMouse->RemoveHoldingItem(); ++curr_seq_num; v4 = v124; - - //v6 = v123; - //v7 = ""; break; } v65 = 0; @@ -903,78 +900,69 @@ v66->RemoveItemAtInventoryIndex(v65); ++curr_seq_num; v4 = v124; - - //v6 = v123; - //v7 = ""; break; } ++v65; v67 += 4; } while ( (signed int)v65 < 126 ); - v68 = 0; - v69 = (int)&v66->pEquipment; - do + v68 = 0; + v69 = (int)&v66->pEquipment; + do + { + if ( *(int *)v69 && (int)&v66->pInventoryItems[v69] == pValue ) { - if ( *(int *)v69 && (int)&v66->pInventoryItems[v69] == pValue ) + *(&v66->pEquipment.uOffHand + v68) = 0; + ++curr_seq_num; + v4 = v124; + break; + } + ++v68; + v69 += 4; + } + while ( v68 < 16 ); + pPlayer = pPlayers[1]; + while ( 1 ) + { + v70 = pPlayer; + if ( !v64 ) + { + v71 = 0; + v72 = (int)v70->pInventoryIndices; + do { - *(&v66->pEquipment.uOffHand + v68) = 0; - ++curr_seq_num; - v4 = v124; - - //v6 = v123; - //v7 = ""; - break; - } - ++v68; - v69 += 4; - } - while ( v68 < 16 ); - pPlayer = pPlayers[1]; - while ( 1 ) - { - v70 = pPlayer; - if ( !v64 ) + if ( (int)&v70->pInventoryItems[v72] == pValue ) { - v71 = 0; - v72 = (int)v70->pInventoryIndices; - do - { - if ( (int)&v70->pInventoryItems[v72] == pValue ) - { - v70->RemoveItemAtInventoryIndex(v71); - goto LABEL_169; - } - ++v71; - v72 += 4; - } - while ( (signed int)v71 < 126 ); - v73 = 0; - v74 = (int)&v70->pEquipment; - while ( !*(int *)v74 || (int)&v70->pInventoryItems[v74] != pValue ) - { - ++v73; - v74 += 4; - if ( v73 >= 16 ) - goto LABEL_170; - } - *(&v70->pEquipment.uOffHand + v73) = 0; + v70->RemoveItemAtInventoryIndex(v71); + goto LABEL_169; + } + ++v71; + v72 += 4; + } + while ( (signed int)v71 < 126 ); + v73 = 0; + v74 = (int)&v70->pEquipment; + while ( !*(int *)v74 || (int)&v70->pInventoryItems[v74] != pValue ) + { + ++v73; + v74 += 4; + if ( v73 >= 16 ) + goto LABEL_170; + } + *(&v70->pEquipment.uOffHand + v73) = 0; LABEL_169: - v64 = 1; - } + v64 = 1; + } LABEL_170: - pPlayer += 4; - if ( pPlayer > pPlayers[4] ) - { - //++curr_seq_num; - v4 = v124; - - //v6 = v123; - //v7 = ""; - break; - } - } + pPlayer += 4; + if ( pPlayer > pPlayers[4] ) + { + //++curr_seq_num; + v4 = v124; + break; + } } + } if ( player_choose <= 3 ) { pPlayer = &pParty->pPlayers[player_choose]; @@ -1142,12 +1130,12 @@ + (_evt->v10 != 0))); goto LABEL_131; case EVENT_ReceiveDamage: - v85 = _evt->v7 + ((_evt->v8 + ((_evt->v9 + ((uint)_evt->v10 << 8)) << 8)) << 8); + v85 = EVT_DWORD(_evt->v7); v86 = _evt->v5; if ( (unsigned __int8)v86 <= 3u ) { v119 = _evt->v6; - v115 = _evt->v7 + ((_evt->v8 + ((_evt->v9 + ((uint)_evt->v10 << 8)) << 8)) << 8); + v115 = EVT_DWORD(_evt->v7); v89 = (unsigned __int8)v86; goto LABEL_233; } @@ -1164,13 +1152,13 @@ } v119 = _evt->v6; v88 = pPlayers[uActiveCharacter]; - v115 = _evt->v7 + ((_evt->v8 + ((_evt->v9 + ((uint)_evt->v10 << 8)) << 8)) << 8); + v115 = EVT_DWORD(_evt->v7); goto LABEL_234; } if ( v86 != 5 ) { v119 = _evt->v6; - v115 = _evt->v7 + ((_evt->v8 + ((_evt->v9 + ((uint)_evt->v10<< 8)) << 8)) << 8); + v115 = EVT_DWORD(_evt->v7); v89 = rand() % 4; LABEL_233: v88 = &pParty->pPlayers[v89];