changeset 109:01ab35c85832

9.02.13
author Ritor1
date Sat, 09 Feb 2013 01:56:58 +0600
parents 2baff1256844
children aa9b34eb3da4
files Party.cpp mm7_5.cpp
diffstat 2 files changed, 27 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Party.cpp	Fri Feb 08 23:05:14 2013 +0600
+++ b/Party.cpp	Sat Feb 09 01:56:58 2013 +0600
@@ -763,7 +763,7 @@
 
   memcpy(pNPCStats->pNewNPCData, pNPCStats->pNPCData, 0x94BCu);
   memcpy(pNPCStats->pGroups_copy, pNPCStats->pGroups, 0x66u);
-  pNPCStats->pNewNPCData[3].uFlags |= 0x80u;
+  pNPCStats->pNewNPCData[3].uFlags = 128;//|= 0x80u; Lady Margaret
   _494035_timed_effects__water_walking_damage__etc();
   pEventTimer->Pause();
   return 0;
--- a/mm7_5.cpp	Fri Feb 08 23:05:14 2013 +0600
+++ b/mm7_5.cpp	Sat Feb 09 01:56:58 2013 +0600
@@ -68,7 +68,7 @@
   unsigned int v2; // edx@7
   Actor *pActor; // ecx@13
   int v4; // ecx@18
-  NPCData *pNPCData; // eax@18
+  NPCData *pNPCData0; // eax@18
   int v6; // edx@20
   int v7; // ecx@29
   unsigned int v8; // edx@59
@@ -341,18 +341,18 @@
             uAction = 0;
             uNumSeconds = uMessage - 134;
             v4 = 0;
-            pNPCData = pParty->pHirelings;
+            pNPCData0 = pParty->pHirelings;
             do
             {
-              if ( pNPCData->pName )
+              if ( pNPCData0->pName )
               {
                 v6 = uAction++;
                 pTmpBuf[v6] = v4;
               }
-              ++pNPCData;
+              ++pNPCData0;
               ++v4;
             }
-            while ( (signed int)pNPCData < (signed int)&pParty->pPickedItem );
+            while ( (signed int)pNPCData0 < (signed int)&pParty->pPickedItem );
             _this = 0;
             if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
             {
@@ -15999,7 +15999,7 @@
 
 
 //----- (00416B01) --------------------------------------------------------
-void __thiscall sub_416B01(void *_this)
+void __thiscall sub_416B01(void *_this)//PopupWindowForBenefitAndJoinText
 {
   int v1; // edi@2
   int v2; // ecx@2
@@ -16026,18 +16026,23 @@
     v1 = 0;
     v2 = 0;
     v3 = pParty->pHirelings;
-    do
+    /*do
     {
       if ( v3->pName )
         pTmpBuf[v1++] = v2;
       ++v3;
       ++v2;
     }
-    while ( (signed int)v3 < (signed int)&pParty->pPickedItem );
+    while ( (signed int)v3 < (signed int)&pParty->pPickedItem );*/
+    for (int i = 0; i < 2; ++i)
+    {
+     if (pParty->pHirelings[i].pName)
+        pTmpBuf[v1++] = i;
+    }
     lpsz = 0;
     if ( (signed int)pNPCStats->uNumNewNPCs > 0 )
     {
-      v4 = pNPCStats->pNewNPCData;
+      /*v4 = pNPCStats->pNewNPCData;
       do
       {
         if ( v4->uFlags & 0x80
@@ -16047,7 +16052,18 @@
         ++lpsz;
         ++v4;
       }
-      while ( (signed int)lpsz < (signed int)pNPCStats->uNumNewNPCs );
+      while ( (signed int)lpsz < (signed int)pNPCStats->uNumNewNPCs );*/
+      for (int i = 0; i < pNPCStats->uNumNewNPCs; ++i)
+      {
+        if (pNPCStats->pNewNPCData[i].uFlags & 0x80)
+        {
+          if (!pParty->pHirelings[0].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[0].pName))
+          {
+            if (!pParty->pHirelings[1].pName || strcmp((char *)pNPCStats->pNewNPCData[i].pName, (char *)pParty->pHirelings[1].pName))
+              pTmpBuf[v1++] = i + 2;
+          }
+        }
+      }
     }
     if ( (signed int)((char *)v17 + (unsigned __int8)pParty->field_709) < v1 )
     {