diff mm7_5.cpp @ 1704:cc1d68c17e19

Слияние
author Ritor1
date Mon, 23 Sep 2013 09:34:23 +0600
parents 7d99124bccd8
children 8251e59fd7c1
line wrap: on
line diff
--- a/mm7_5.cpp	Mon Sep 23 09:33:13 2013 +0600
+++ b/mm7_5.cpp	Mon Sep 23 09:34:23 2013 +0600
@@ -1004,7 +1004,7 @@
                       pGUIWindow_Settings = 0;
                       pMouse->SetCursorBitmap("MICON1");
                       GameUI_Footer_TimeLeft = 0;
-                      unk_50C9A0 = 0;
+                      _50C9A0_IsEnchantingInProgress = 0;
                       back_to_game();
                     }
                   }
@@ -1036,15 +1036,15 @@
                         some_active_character = 0;
                         if ( pParty->bTurnBasedModeOn )
                           pTurnEngine->ApplyPlayerAction();
-                        dword_50C9D0 = 0;
-                        dword_50C9D4 = 0;
-                        dword_50C9D8 = 0;
+                        _50C9D0_AfterEnchClickEventId = 0;
+                        _50C9D4_AfterEnchClickEventSecondParam = 0;
+                        _50C9D8_AfterEnchClickEventTimeout = 0;
                       }
-                      if ( ptr_50C9A4 && ptr_50C9A4->uItemID )
+                      if ( ptr_50C9A4_ItemToEnchant && ptr_50C9A4_ItemToEnchant->uItemID )
                       {
-                        LOBYTE(ptr_50C9A4->uAttributes) &= 0xFu;
+                        LOBYTE(ptr_50C9A4_ItemToEnchant->uAttributes) &= 0xFu;
                         _50C9A8_item_enchantment_timer = 0;
-                        ptr_50C9A4 = 0;
+                        ptr_50C9A4_ItemToEnchant = 0;
                       }
                       if ( pGUIWindow_Settings )
                       {
@@ -1058,7 +1058,7 @@
                          pGUIWindow_Settings = 0;
                          pMouse->SetCursorBitmap("MICON1");
                          GameUI_Footer_TimeLeft = 0;
-                         unk_50C9A0 = 0;
+                         _50C9A0_IsEnchantingInProgress = 0;
                          back_to_game();
                         }
                        }
@@ -1090,7 +1090,7 @@
                          pGUIWindow_Settings = 0;
                          pMouse->SetCursorBitmap("MICON1");
                          GameUI_Footer_TimeLeft = 0;
-                         unk_50C9A0 = 0;
+                         _50C9A0_IsEnchantingInProgress = 0;
                          back_to_game();
                         }
                       }
@@ -1274,7 +1274,7 @@
                           pGUIWindow_Settings = 0;
                           pMouse->SetCursorBitmap("MICON1");
                           GameUI_Footer_TimeLeft = 0;
-                          unk_50C9A0 = 0;
+                          _50C9A0_IsEnchantingInProgress = 0;
                           back_to_game();
                          }
                       }
@@ -1324,7 +1324,7 @@
                           pGUIWindow_Settings = 0;
                           pMouse->SetCursorBitmap("MICON1");
                           GameUI_Footer_TimeLeft = 0;
-                          unk_50C9A0 = 0;
+                          _50C9A0_IsEnchantingInProgress = 0;
                           back_to_game();
                         }
                       }
@@ -1408,7 +1408,7 @@
                           pGUIWindow_Settings = 0;
                           pMouse->SetCursorBitmap("MICON1");
                           GameUI_Footer_TimeLeft = 0;
-                          unk_50C9A0 = 0;
+                          _50C9A0_IsEnchantingInProgress = 0;
                           back_to_game();
                         }
                       }
@@ -1436,7 +1436,7 @@
                           pGUIWindow_Settings = 0;
                           pMouse->SetCursorBitmap("MICON1");
                           GameUI_Footer_TimeLeft = 0;
-                          unk_50C9A0 = 0;
+                          _50C9A0_IsEnchantingInProgress = 0;
                           back_to_game();
                         }
                       }
@@ -1464,7 +1464,7 @@
                       pGUIWindow_Settings = 0;
                       pMouse->SetCursorBitmap("MICON1");
                       GameUI_Footer_TimeLeft = 0;
-                      unk_50C9A0 = 0;
+                      _50C9A0_IsEnchantingInProgress = 0;
                       back_to_game();
                     }
                   }
@@ -1496,7 +1496,7 @@
                   pGUIWindow_Settings = 0;
                   pMouse->SetCursorBitmap("MICON1");
                   GameUI_Footer_TimeLeft = 0;
-                  unk_50C9A0 = 0;
+                  _50C9A0_IsEnchantingInProgress = 0;
                   back_to_game();
                 }
               }
@@ -1563,7 +1563,7 @@
             pGUIWindow_Settings = 0;
             pMouse->SetCursorBitmap("MICON1");
             GameUI_Footer_TimeLeft = 0;
-            unk_50C9A0 = 0;
+            _50C9A0_IsEnchantingInProgress = 0;
             back_to_game();
             continue;
           }
@@ -1802,7 +1802,7 @@
             pGUIWindow_Settings = 0;
             pMouse->SetCursorBitmap("MICON1");
             GameUI_Footer_TimeLeft = 0;
-            unk_50C9A0 = 0;
+            _50C9A0_IsEnchantingInProgress = 0;
             back_to_game();
             continue;
           }
@@ -1820,7 +1820,7 @@
             pGUIWindow_Settings = 0;
             pMouse->SetCursorBitmap("MICON1");
             GameUI_Footer_TimeLeft = 0;
-            unk_50C9A0 = 0;
+            _50C9A0_IsEnchantingInProgress = 0;
             back_to_game();
             continue;
           }
@@ -1847,7 +1847,7 @@
               pGUIWindow_Settings = 0;
               pMouse->SetCursorBitmap("MICON1");
               GameUI_Footer_TimeLeft = 0;
-              unk_50C9A0 = 0;
+              _50C9A0_IsEnchantingInProgress = 0;
               back_to_game();
               continue;
             }
@@ -1867,7 +1867,7 @@
           pGUIWindow_Settings = 0;
           pMouse->SetCursorBitmap("MICON1");
           GameUI_Footer_TimeLeft = 0;
-          unk_50C9A0 = 0;
+          _50C9A0_IsEnchantingInProgress = 0;
           back_to_game();
           continue;
         case UIMSG_CastSpell_Character_Big_Improvement://Preservation and blessing, treatment paralysis, hand hammers(individual upgrade)
@@ -1875,7 +1875,7 @@
         case UIMSG_HiredNPC_CastSpell:
           if ( pMessageQueue_50CBD0->uNumMessages )
             pMessageQueue_50CBD0->uNumMessages = pMessageQueue_50CBD0->pMessages[0].field_8 != 0;
-          if ( unk_50C9A0 )
+          if ( _50C9A0_IsEnchantingInProgress )
           {
             uActiveCharacter = uMessageParam;
             viewparams->bRedrawGameUI = 1;
@@ -1904,7 +1904,7 @@
               pEventTimer->Resume();
               pMouse->SetCursorBitmap("MICON1");
               GameUI_Footer_TimeLeft = 0;
-              unk_50C9A0 = 0;
+              _50C9A0_IsEnchantingInProgress = 0;
             }
           }
           continue;
@@ -2388,7 +2388,7 @@
           pGUIWindow_Settings = 0;
           pMouse->SetCursorBitmap("MICON1");
           GameUI_Footer_TimeLeft = 0;
-          unk_50C9A0 = 0;
+          _50C9A0_IsEnchantingInProgress = 0;
           back_to_game();
           continue;
         case UIMSG_1C:
@@ -2399,8 +2399,7 @@
           pCurrentScreen = SCREEN_19;
           pEventTimer->Pause();
           continue;
-        case UIMSG_1B:
-			__debugbreak();
+        case UIMSG_STEALFROMACTOR:
           if ( !uActiveCharacter )
             continue;
           if ( pParty->bTurnBasedModeOn != 1 )
@@ -3046,13 +3045,13 @@
         case UIMSG_CHEST_ClickItem:
           if ( pCurrentScreen == SCREEN_CHEST_INVENTORY )
           {
-            OnInventoryLeftClick();
+            pPlayers[uActiveCharacter]->OnInventoryLeftClick();
             continue;
           }
           OnChestLeftClick();
           continue;
         case UIMSG_InventoryLeftClick:
-          OnInventoryLeftClick();
+          pPlayers[uActiveCharacter]->OnInventoryLeftClick();
           continue;
         case UIMSG_MouseLeftClickInGame:
           if ( !pRenderer->pRenderD3D )
@@ -3218,10 +3217,10 @@
   }
   else
   {
-    if ( dword_50C9D0 > 0 )
+    if ( _50C9D0_AfterEnchClickEventId > 0 )
     {
-      dword_50C9D8 -= pEventTimer->uTimeElapsed;
-      if ( dword_50C9D8 <= 0 )
+      _50C9D8_AfterEnchClickEventTimeout -= pEventTimer->uTimeElapsed;
+      if ( _50C9D8_AfterEnchClickEventTimeout <= 0 )
       {
         /*if ( (signed int)pMessageQueue_50CBD0->uNumMessages < 40 )
         {
@@ -3230,10 +3229,10 @@
           *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
           ++pMessageQueue_50CBD0->uNumMessages;
         }*/
-        pMessageQueue_50CBD0->AddMessage((UIMessageType)dword_50C9D0, dword_50C9D4, 0);
-        dword_50C9D0 = 0;
-        dword_50C9D4 = 0;
-        dword_50C9D8 = 0;
+        pMessageQueue_50CBD0->AddMessage((UIMessageType)_50C9D0_AfterEnchClickEventId, _50C9D4_AfterEnchClickEventSecondParam, 0);
+        _50C9D0_AfterEnchClickEventId = 0;
+        _50C9D4_AfterEnchClickEventSecondParam = 0;
+        _50C9D8_AfterEnchClickEventTimeout = 0;
       }
     }
   }