changeset 659:c10163a6d946

NPC hiring fixed
author zipi
date Tue, 12 Mar 2013 23:11:11 +0000
parents cec42951eda0
children 92bc2544249d
files NPC.cpp Party.cpp Player.cpp mm7_3.cpp mm7_4.cpp mm7_5.cpp mm7_data.h
diffstat 7 files changed, 20 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/NPC.cpp	Wed Mar 13 01:30:53 2013 +0200
+++ b/NPC.cpp	Tue Mar 12 23:11:11 2013 +0000
@@ -676,6 +676,12 @@
 		pNPCDataBuff->Location2D = uLocation2D;
 		pNPCDataBuff->field_24 = 1;
 		pNPCDataBuff->joins = 1;
+		pNPCDataBuff->evt_A = 0;
+		pNPCDataBuff->evt_B = 0;
+		pNPCDataBuff->evt_C = 0;
+		pNPCDataBuff->evt_D = 0;
+		pNPCDataBuff->evt_E = 0;
+		pNPCDataBuff->evt_F = 0;
 	}
 
 //----- (00476387) --------------------------------------------------------
--- a/Party.cpp	Wed Mar 13 01:30:53 2013 +0200
+++ b/Party.cpp	Tue Mar 12 23:11:11 2013 +0000
@@ -974,7 +974,7 @@
       memset(hireling, 0, sizeof(*hireling));
 
       pParty->field_709 = 0;
-      sub_44A56A();
+      Party__CountHirelings();
       viewparams->bRedrawGameUI = 1;
     }
   }
--- a/Player.cpp	Wed Mar 13 01:30:53 2013 +0200
+++ b/Player.cpp	Tue Mar 12 23:11:11 2013 +0000
@@ -8304,7 +8304,7 @@
             case VAR_NPCs2:
               pParty->field_709 = 0;
               LOBYTE(pNPCStats->pNewNPCData[var_value].uFlags) |= 0x80u;
-              sub_44A56A();
+              Party__CountHirelings();
               viewparams->bRedrawGameUI = 1;
               break;
             case VAR_NumSkillPoints:
@@ -9261,7 +9261,7 @@
           case VAR_NPCs2:
             pParty->field_709 = 0;
             LOBYTE(pNPCStats->pNewNPCData[val].uFlags) |= 0x80u;
-            sub_44A56A();
+            Party__CountHirelings();
             viewparams->bRedrawGameUI = 1;
             break;
           case VAR_NumSkillPoints:
@@ -9377,7 +9377,7 @@
               {
                 pParty->field_709 = 0;
                 LOBYTE(pNPCStats->pNewNPCData[(int)pValue].uFlags) &= 0x7Fu;
-                sub_44A56A();
+                Party__CountHirelings();
                 viewparams->bRedrawGameUI = 1;
               }
               break;
@@ -9404,7 +9404,7 @@
               if ( pParty->pHirelings[1].uProfession == pValue )
                 memset(&pParty->pHirelings[1], 0, 0x4Cu);
               pParty->field_709 = 0;
-              sub_44A56A();
+              Party__CountHirelings();
               break;
             case 243:
               v17 = (char *)&this->uSkillPoints;
--- a/mm7_3.cpp	Wed Mar 13 01:30:53 2013 +0200
+++ b/mm7_3.cpp	Tue Mar 12 23:11:11 2013 +0000
@@ -16256,7 +16256,7 @@
 
 
 //----- (0044A56A) --------------------------------------------------------
-void __cdecl sub_44A56A()
+void __cdecl Party__CountHirelings()
 {
   pParty->field_70A = 0;
 
--- a/mm7_4.cpp	Wed Mar 13 01:30:53 2013 +0200
+++ b/mm7_4.cpp	Tue Mar 12 23:11:11 2013 +0000
@@ -9590,7 +9590,7 @@
   //LOBYTE(v2->uFlags) |= 0x80u;
   pCurrentNPCInfo->uFlags |= 128;
   pParty->field_709 = 0;
-  sub_44A56A();
+  Party__CountHirelings();
   if ( pParty->pHirelings[0].pName )
   {
     memcpy(&pParty->pHirelings[1], pCurrentNPCInfo, sizeof(pParty->pHirelings[1]));
@@ -9605,7 +9605,7 @@
   }
   strcpy(v22, v24);
   pParty->field_709 = 0;
-  sub_44A56A();
+  Party__CountHirelings();
   PrepareHouse((HOUSE_ID)(int)window_SpeakInHouse->ptr_1C);
   dialog_menu_id = 1;
 
@@ -10870,7 +10870,7 @@
 				memset(v11, 0, sizeof(NPCData));
 			}
 			pParty->field_709 = 0;
-			sub_44A56A();
+			Party__CountHirelings();
 			dword_591084 = 0;
 			pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
 			dword_7241C8 = 0;
@@ -10918,7 +10918,7 @@
 			}
 			strcpy(v13, v15);
 			pParty->field_709 = 0;
-			sub_44A56A();
+			Party__CountHirelings();
 
 			pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
 
@@ -10981,7 +10981,7 @@
 				memset(v11, 0, sizeof(NPCData));
 			}
 			pParty->field_709 = 0;
-			sub_44A56A();
+			Party__CountHirelings();
 			dword_591084 = 0;
 			pMessageQueue_50CBD0->AddMessage(UIMSG_Escape, 1, 0);
 			dword_7241C8 = 0;
--- a/mm7_5.cpp	Wed Mar 13 01:30:53 2013 +0200
+++ b/mm7_5.cpp	Tue Mar 12 23:11:11 2013 +0000
@@ -1367,7 +1367,7 @@
                       {
                         pParty->field_709 = 0;
                         LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu;
-                        sub_44A56A();
+                        Party__CountHirelings();
                         viewparams->bRedrawGameUI = v0;
                         dword_5B65CC = 0;
                       }
@@ -1377,7 +1377,7 @@
                       {
                         pParty->field_709 = 0;
                         LOBYTE(pNPCStats->pNewNPCData[dword_5B65CC].uFlags) &= 0x7Fu;
-                        sub_44A56A();
+                        Party__CountHirelings();
                         viewparams->bRedrawGameUI = v0;
                         dword_5B65CC = 0;
                       }
--- a/mm7_data.h	Wed Mar 13 01:30:53 2013 +0200
+++ b/mm7_data.h	Tue Mar 12 23:11:11 2013 +0000
@@ -2044,7 +2044,7 @@
 __int16 __fastcall sub_449A49_door_switch_animation(unsigned int uDoorID, int a2); // idb
 bool _449B57_test_bit(unsigned __int8 *a1, __int16 a2);
 void _449B7E_toggle_bit(unsigned char *pArray, __int16 a2, unsigned __int16 bToggle); // idb
-void __cdecl sub_44A56A();
+void __cdecl Party__CountHirelings();
 void __fastcall ShowStatusBarString(const char *pString, unsigned int uNumSeconds);
 void __cdecl ShowNothingHereStatus();
 signed int __cdecl const_2();