# HG changeset patch
# User Ritor1
# Date 1362314375 -21600
# Node ID 0193f10fecbf4109bc97838e155cabd4a4a8a2ab
# Parent dde1083df4b7a07128f665a9fa92c13e20746fef# Parent a4fe569c0d63e395878488891d7ce0be8c19d753
Слияние
diff -r a4fe569c0d63 -r 0193f10fecbf Chest.cpp
diff -r a4fe569c0d63 -r 0193f10fecbf Chest.h
diff -r a4fe569c0d63 -r 0193f10fecbf Events.cpp
--- a/Events.cpp Sun Mar 03 12:22:14 2013 +0000
+++ b/Events.cpp Sun Mar 03 18:39:35 2013 +0600
@@ -849,99 +849,62 @@
pValue = EVT_DWORD(_evt->v7);
if ( EVT_WORD(_evt->v5) == VAR_PlayerItemInHands )
{
- v64 = 0;
- if ( pParty->pPickedItem.uItemID == pValue )
+ if ( pParty->pPickedItem.uItemID == pValue )//In hand
{
pMouse->RemoveHoldingItem();
++curr_seq_num;
v4 = v124;
-
- //v6 = v123;
- //v7 = "";
break;
}
- v65 = 0;
- v66 = pPlayers[uActiveCharacter];
- v67 = (int)v66->pInventoryIndices;
- do
+ v67 = (int)pPlayers[uActiveCharacter]->pInventoryIndices;
+ for ( v65 = 0; v65 < 126; ++v65 )
{
- if ( (int)&v66->pInventoryItems[v67] == pValue )
+ if ( (int)&pPlayers[uActiveCharacter]->pInventoryItems[v67] == pValue )
{
- v66->RemoveItemAtInventoryIndex(v65);
+ pPlayers[uActiveCharacter]->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
+ v69 = (int)&pPlayers[uActiveCharacter]->pEquipment;
+ for ( v68 = 0; v68 < 16; ++v68 )
+ {
+ if ( *(int *)v69 && (int)&pPlayers[uActiveCharacter]->pInventoryItems[v69] == pValue )
{
- if ( *(int *)v69 && (int)&v66->pInventoryItems[v69] == pValue )
+ *(&pPlayers[uActiveCharacter]->pEquipment.uOffHand + v68) = 0;
+ ++curr_seq_num;
+ v4 = v124;
+ break;
+ }
+ v69 += 4;
+ }
+ for (int i = 1; i < 5; i++)
+ {
+ v72 = (int)pPlayers[i]->pInventoryIndices;
+ for ( int v71 = 0; v71 < 126; ++v71 )
+ {
+ if ( (int)&pPlayers[i]->pInventoryItems[v72] == pValue )
{
- *(&v66->pEquipment.uOffHand + v68) = 0;
- ++curr_seq_num;
- v4 = v124;
-
- //v6 = v123;
- //v7 = "";
+ pPlayers[i]->RemoveItemAtInventoryIndex(v71);
break;
}
- ++v68;
- v69 += 4;
+ v72 += 4;
}
- while ( v68 < 16 );
- pPlayer = pPlayers[1];
- while ( 1 )
- {
- v70 = pPlayer;
- if ( !v64 )
- {
- 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;
-LABEL_169:
- v64 = 1;
- }
-LABEL_170:
- pPlayer += 4;
- if ( pPlayer > pPlayers[4] )
- {
- //++curr_seq_num;
- v4 = v124;
-
- //v6 = v123;
- //v7 = "";
- break;
- }
- }
+ v73 = 0;
+ v74 = (int)&pPlayers[i]->pEquipment;
+ while ( !*(int *)v74 || (int)&pPlayer->pInventoryItems[v74] != pValue )
+ {
+ ++v73;
+ v74 += 4;
+ if ( v73 >= 16 )
+ break;
+ }
+ *(&pPlayers[i]->pEquipment.uOffHand + v73) = 0;
}
+ }
if ( player_choose <= 3 )
{
pPlayer = &pParty->pPlayers[player_choose];
@@ -961,10 +924,7 @@
for(int i = 0; i < 4; ++i)
{
if ( pPlayers[i]->SubtractVariable((enum VariableType)EVT_WORD(_evt->v5), pValue) )
- {
- ++curr_seq_num;
break;
- }
}
++v130;
}
@@ -974,9 +934,9 @@
pPlayer = &pParty->pPlayers[player_choose];
pPlayer->SubtractVariable((enum VariableType)EVT_WORD(_evt->v5), pValue);
}
- ++curr_seq_num;
- v4 = v124;
- break;
+ ++curr_seq_num;
+ v4 = v124;
+ break;
case EVENT_Set:
pValue = EVT_DWORD(_evt->v7);
if ( player_choose <= 3 )
diff -r a4fe569c0d63 -r 0193f10fecbf MM7.vcxproj.filters
--- a/MM7.vcxproj.filters Sun Mar 03 12:22:14 2013 +0000
+++ b/MM7.vcxproj.filters Sun Mar 03 18:39:35 2013 +0600
@@ -127,7 +127,6 @@
-
@@ -202,6 +201,7 @@
+
@@ -258,7 +258,6 @@
-
@@ -321,6 +320,7 @@
+
diff -r a4fe569c0d63 -r 0193f10fecbf mm7_2.cpp
diff -r a4fe569c0d63 -r 0193f10fecbf mm7_5.cpp
--- a/mm7_5.cpp Sun Mar 03 12:22:14 2013 +0000
+++ b/mm7_5.cpp Sun Mar 03 18:39:35 2013 +0600
@@ -15518,10 +15518,7 @@
{
if ( (signed int)v10 < 53 )
{
-
-
pParty->field_3C._shop_ban_times[(signed int)v10] = 0;
-
}
continue;
}