diff mm7_4.cpp @ 467:5d2667144526

m
author Ritor1
date Mon, 25 Feb 2013 11:09:55 +0600
parents 62ca9e2e1432
children 8822405efad2
line wrap: on
line diff
--- a/mm7_4.cpp	Mon Feb 25 09:09:08 2013 +0600
+++ b/mm7_4.cpp	Mon Feb 25 11:09:55 2013 +0600
@@ -9382,32 +9382,30 @@
   NPCData *pCurrentNPCInfo; // ebp@1
   int pEventNumber; // ecx@8
   Player *v4; // esi@20
-  int v5; // eax@28
-  int v6; // eax@31
-  int v7; // eax@34
-  int v8; // eax@37
-  int v9; // eax@40
-  unsigned int v10; // eax@43
-  unsigned int v11; // eax@48
+  //int v5; // eax@28
+  //int v6; // eax@31
+  //int v7; // eax@34
+  //int v8; // eax@37
+  //int v9; // eax@40
+  //unsigned int v10; // eax@43
   char *v12; // eax@53
   char *v13; // eax@56
   char *v14; // eax@57
   char *v15; // eax@58
-  unsigned int v16; // ebp@62
+  //unsigned int v16; // ebp@62
   char *v17; // ecx@63
   char *v18; // eax@65
   const char *v19; // ecx@68
   //unsigned int v20; // eax@69
-  unsigned int v21; // ecx@70
+  signed int pPrice; // ecx@70
   char *v22; // [sp-Ch] [bp-18h]@73
-  int v23; // [sp-8h] [bp-14h]@49
+  //int v23; // [sp-8h] [bp-14h]@49
   char *v24; // [sp-8h] [bp-14h]@73
-  int v25; // [sp-4h] [bp-10h]@49
-
-  //v1 = a1;
+  //int v25; // [sp-4h] [bp-10h]@49
+
   uDialogueType = uMessageParam + 1;
   pCurrentNPCInfo = HouseNPCData[(unsigned int)((char *)pDialogueNPCCount + -(dword_591080 != 0) - 1)];
-  if ( uMessageParam <= 23 )
+  if ( uMessageParam <= 24 )
   {
   switch ( uMessageParam )
   {
@@ -9436,8 +9434,17 @@
       pEventNumber = pCurrentNPCInfo->evt_F;
       break;
     default:
-        goto _return;
-  }
+      goto _return;
+  }
+  /*switch ( pEventNumber )
+  {
+    case 139:
+      sub_4B1ECE();
+      goto _return;
+    case 311:
+      sub_4BBA85_bounties();
+    goto _return;
+  }*/
   if ( pEventNumber < 200 || pEventNumber > 310 )
     {
       if ( pEventNumber < 400 || pEventNumber > 410 )
@@ -9477,7 +9484,7 @@
   {
     if ( uMessageParam == 77 )
     {
-      v16 = pCurrentNPCInfo->uProfession;
+      //v16 = pCurrentNPCInfo->uProfession;
       if (dialogue_show_profession_details)
         v17 = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession - 1].pJoinText;
       else
@@ -9540,37 +9547,34 @@
           switch ( dword_F8B1D8 )
           {
             case 19:
-              v10 = pCurrentNPCInfo->evt_A;
-              if ( (signed int)v10 >= 400 && (signed int)v10 <= 416 )
+              pEventNumber = pCurrentNPCInfo->evt_A;
+              if ( pEventNumber >= 400 && pEventNumber <= 416 )
                 pCurrentNPCInfo->evt_A = 0;
               break;
             case 20:
-              v9 = pCurrentNPCInfo->evt_B;
-              if ( v9 >= 400 && v9 <= 416 )
+              pEventNumber = pCurrentNPCInfo->evt_B;
+              if ( pEventNumber >= 400 && pEventNumber <= 416 )
                 pCurrentNPCInfo->evt_B = 0;
               break;
             case 21:
-              v8 = pCurrentNPCInfo->evt_C;
-              if ( v8 >= 400 && v8 <= 416 )
+              pEventNumber = pCurrentNPCInfo->evt_C;
+              if ( pEventNumber >= 400 && pEventNumber <= 416 )
                 pCurrentNPCInfo->evt_C = 0;
               break;
             case 22:
-              v7 = pCurrentNPCInfo->evt_D;
-              if ( v7 >= 400 && v7 <= 416 )
+              pEventNumber = pCurrentNPCInfo->evt_D;
+              if ( pEventNumber >= 400 && pEventNumber <= 416 )
                 pCurrentNPCInfo->evt_D = 0;
               break;
             case 23:
-              v6 = pCurrentNPCInfo->evt_E;
-              if ( v6 >= 400 && v6 <= 416 )
+              pEventNumber = pCurrentNPCInfo->evt_E;
+              if ( pEventNumber >= 400 && pEventNumber <= 416 )
                 pCurrentNPCInfo->evt_E = 0;
               break;
             case 24:
-              v5 = pCurrentNPCInfo->evt_F;
-              if ( v5 >= 400 )
-              {
-                if ( v5 <= 416 )
-                  pCurrentNPCInfo->evt_F = 0;
-              }
+              pEventNumber = pCurrentNPCInfo->evt_F;
+              if ( pEventNumber >= 400 && pEventNumber <= 416)
+                pCurrentNPCInfo->evt_F = 0;
               break;
           }
           pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
@@ -9581,13 +9585,10 @@
             *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
             ++pMessageQueue_50CBD0->uNumMessages;
           }*/
-          v11 = uActiveCharacter;
+          //v11 = uActiveCharacter;
           if ( uActiveCharacter )
           {
-            v25 = 0;
-            v23 = SPEECH_86;
-LABEL_50:
-            pPlayers[v11]->PlaySound((PlayerSpeech)v23, v25);
+            pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)SPEECH_86, 0);
             goto _return;
           }
         }
@@ -9597,28 +9598,25 @@
   }
   if ( pParty->pHirelings[0].pName && pParty->pHirelings[1].pName )
   {
-    v19 = pGlobalTXT_LocalizationStrings[533];  // ""I cannot join you, you're party is full""
-LABEL_77:
-    ShowStatusBarString(v19, 2u);
+    ShowStatusBarString(pGlobalTXT_LocalizationStrings[533], 2);// ""I cannot join you, you're party is full""
     goto _return;
   }
-  //v20 = v2->uProfession;
   if ( pCurrentNPCInfo->uProfession != 51 )
   {
-    v21 = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession - 1].uHirePrice;
-    if ( pParty->uNumGold < v21 )
-    {
-      ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2u);
+    pPrice = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession - 1].uHirePrice;
+    if ( pParty->uNumGold < pPrice )
+    {
+      ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);
       dialogue_show_profession_details = false;
       uDialogueType = 13;
       ptr_F8B1E8 = pNPCStats->pProfessions[pCurrentNPCInfo->uProfession - 1].pJoinText;
       ptr_F8B1E8 = BuilDialogueString((char *)ptr_F8B1E8, uActiveCharacter - 1, 0, 0, 0, 0);
       if ( uActiveCharacter )
         pPlayers[uActiveCharacter]->PlaySound(SPEECH_NotEnoughGold, 0);
-      v19 = pGlobalTXT_LocalizationStrings[155];
-      goto LABEL_77;
-    }
-    Party::TakeGold(v21);
+      ShowStatusBarString(pGlobalTXT_LocalizationStrings[155], 2);
+      goto _return;
+    }
+    Party::TakeGold(pPrice);
   }
   //LOBYTE(v2->uFlags) |= 0x80u;
   pCurrentNPCInfo->uFlags = 128;
@@ -9650,13 +9648,8 @@
     *(&pMessageQueue_50CBD0->uNumMessages + 3 * pMessageQueue_50CBD0->uNumMessages + 3) = 0;
     ++pMessageQueue_50CBD0->uNumMessages;
   }*/
-  v11 = uActiveCharacter;
   if ( uActiveCharacter )
-  {
-    v25 = 0;
-    v23 = 61;
-    goto LABEL_50;
-  }
+    pPlayers[uActiveCharacter]->PlaySound((PlayerSpeech)61, 0);
 _return:
   pVideoPlayer->_4BF5B2();//HouseVideo
 }
@@ -11045,7 +11038,7 @@
 //----- (004B3EF0) --------------------------------------------------------
 void __fastcall DrawJoinGuildWindow(int pEventNumber)
 {
-  uDialogueType = 81;
+  uDialogueType = 81;//enum JoinGuildDialog
   ptr_F8B1E8 = (char *)pNPCTopics[pEventNumber + 99].pText;
   ContractSelectText(pEventNumber);
   pDialogueWindow->Release();