changeset 1747:cecb080929c4

Party_stru0 renamed to PartyTimeStruct, fixed its members, renamed Party::field_3C to Party::PartyTimes, started Player::SetVariable refactoring start
author Grumpy7
date Mon, 30 Sep 2013 05:48:32 +0200
parents ef86fc6d6a80
children 19684d4bbe9a
files Events.h GUIWindow.cpp Party.cpp Party.h Player.cpp UI/Books/UINotesBooks.cpp UI/UIGuilds.cpp UI/UIHouses.cpp UI/UIShops.cpp mm7_2.cpp mm7_4.cpp
diffstat 11 files changed, 52 insertions(+), 62 deletions(-) [+]
line wrap: on
line diff
--- a/Events.h	Fri Sep 27 10:08:01 2013 +0200
+++ b/Events.h	Mon Sep 30 05:48:32 2013 +0200
@@ -285,6 +285,8 @@
   VAR_Counter8 = 0xFC,
   VAR_Counter9 = 0xFD,
   VAR_Counter10 = 0xFE,
+  VAR_UnknownTimeEvent0 = 0xFF,
+  VAR_UnknownTimeEvent19 = 0x112,
   VAR_ReputationInCurrentLocation = 0x113,
   VAR_History_0 = 0x114,
   VAR_History_28 = 0x130,
--- a/GUIWindow.cpp	Fri Sep 27 10:08:01 2013 +0200
+++ b/GUIWindow.cpp	Mon Sep 30 05:48:32 2013 +0200
@@ -621,11 +621,11 @@
       {
         for ( int i = books_primary_item_per_page; i < books_primary_item_per_page + 31; i++ )
         {
-          if ( pParty->field_3C.field_4F0[2 * i] > 0 )
+          if ( pParty->PartyTimes.HistoryEventTimes[i] > 0 )
           {
             if ( pStorylineText->StoreLine[i + 1].pText )
             {
-              pString = BuildDialogueString(pStorylineText->StoreLine[i + 1].pText, uActiveCharacter - 1, 0, 0, 0, (__int64 *)&pParty->field_3C.field_4F0[2 * i]);
+              pString = BuildDialogueString(pStorylineText->StoreLine[i + 1].pText, uActiveCharacter - 1, 0, 0, 0, &pParty->PartyTimes.HistoryEventTimes[i]);
               pTextHeight = pAutonoteFont->CalcTextHeight(pString, &journal_window, 1, 0);
               page_count = ((pTextHeight - (pAutonoteFont->uFontHeight - 3)) / (signed int)journal_window.uFrameHeight) + 1;
               memset32((char *)&achieved_awards[num_achieved_awards] , i + 1, page_count);
@@ -1940,11 +1940,11 @@
           continue;
         if ( window_SpeakInHouse->par1C >= 53 )
           continue;
-        if ( pParty->field_3C._shop_ban_times[window_SpeakInHouse->par1C] <=pParty->uTimePlayed )
+        if ( pParty->PartyTimes._shop_ban_times[window_SpeakInHouse->par1C] <=pParty->uTimePlayed )
         {
           if ( window_SpeakInHouse->par1C < 53 )
           {
-            pParty->field_3C._shop_ban_times[window_SpeakInHouse->par1C] = 0;
+            pParty->PartyTimes._shop_ban_times[window_SpeakInHouse->par1C] = 0;
           }
           continue;
         }
--- a/Party.cpp	Fri Sep 27 10:08:01 2013 +0200
+++ b/Party.cpp	Mon Sep 30 05:48:32 2013 +0200
@@ -826,7 +826,7 @@
   _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_LUTE_ACTIVE, 1);
   _449B7E_toggle_bit(_quest_bits, PARTY_QUEST_EMERALD_HAT_ACTIVE, 1);
 
-  memset(field_3C._shop_ban_times,0,53*sizeof(__int64));
+  memset(PartyTimes._shop_ban_times,0,53*sizeof(__int64));
 
   memcpy(pNPCStats->pNewNPCData, pNPCStats->pNPCData, 0x94BCu);
   memcpy(pNPCStats->pGroups_copy, pNPCStats->pGroups, 0x66u);
--- a/Party.h	Fri Sep 27 10:08:01 2013 +0200
+++ b/Party.h	Mon Sep 30 05:48:32 2013 +0200
@@ -148,20 +148,16 @@
 
 /*  208 */
 #pragma pack(push, 1)
-struct Party_stru0
+struct PartyTimeStruct
 {
   //__int64 field_0[10];
   __int64 bountyHunting_next_generation_time[10];
  // int field_50[170];
   __int64 Shops_next_generation_time[85];//field_50
-  __int64 _shop_ban_times[53];
-  unsigned __int64 CounterEventValues[10];
-  int field_4F0[38];
-  char field_588[2];
-  __int64 _s_times[21]; //5d8 440h+8*51
-  __int64 field_632[8];
-  char field_672[6];
- // char pIsArtifactFound[8];
+  __int64 _shop_ban_times[53];      
+  unsigned __int64 CounterEventValues[10];  // (0xACD314h in Silvo's binary)
+  __int64 HistoryEventTimes[29];   // (0xACD364h in Silvo's binary)
+  unsigned __int64 _s_times[20]; //5d8 440h+8*51     //(0xACD44Ch in Silvo's binary)
 };
 #pragma pack(pop)
 
@@ -227,7 +223,7 @@
   int field_28;
   unsigned __int64 uTimePlayed;
   __int64 uLastRegenerationTime;
-  Party_stru0 field_3C;
+  PartyTimeStruct PartyTimes;
   Vec3_int_ vPosition;
   int sRotationY;
   int sRotationX;
--- a/Player.cpp	Fri Sep 27 10:08:01 2013 +0200
+++ b/Player.cpp	Mon Sep 30 05:48:32 2013 +0200
@@ -5094,9 +5094,9 @@
       case VAR_Counter8:
       case VAR_Counter9:
       case VAR_Counter10:
-        if (pParty->field_3C.CounterEventValues[VarNum - VAR_Counter1])         //originally (signed __int64)(__PAIR__(*(int *)&stru_AA1058[3].pSounds[8 * VarNum + 44304], *(int *)&stru_AA1058[3].pSounds[8 * VarNum + 44300])
+        if (pParty->PartyTimes.CounterEventValues[VarNum - VAR_Counter1])         //originally (signed __int64)(__PAIR__(*(int *)&stru_AA1058[3].pSounds[8 * VarNum + 44304], *(int *)&stru_AA1058[3].pSounds[8 * VarNum + 44300])
         {
-          return (pParty->field_3C.CounterEventValues[VarNum - VAR_Counter1] + 460800 * pValue * 0.033333335) <= pParty->uTimePlayed ;
+          return (pParty->PartyTimes.CounterEventValues[VarNum - VAR_Counter1] + 460800 * pValue * 0.033333335) <= pParty->uTimePlayed ;
         }
       case VAR_ReputationInCurrentLocation:
         v19 = &pOutdoor->ddm;
@@ -5467,24 +5467,20 @@
         pParty->uNumGoldInBank = var_value;
         return;
       }
-      if ( var_type <= VAR_Counter8 )
+      if ( var_type <= VAR_Counter10 )
       {
         if ( (signed int)var_type >= 0xF5 )
         {
-          __debugbreak(); //how do I get here?
-          *(int *)&stru_AA1058[3].pSounds[8 * var_type + 44300] = LODWORD(pParty->uTimePlayed);
-          *(int *)&stru_AA1058[3].pSounds[8 * var_type + 44304] = HIDWORD(pParty->uTimePlayed);
+          pParty->PartyTimes.CounterEventValues[var_type - VAR_Counter1] = pParty->uTimePlayed; //           *(int *)&stru_AA1058[3].pSounds[8 * var_type + 44300] = LODWORD(pParty->uTimePlayed);*(int *)&stru_AA1058[3].pSounds[8 * var_type + 44304] = HIDWORD(pParty->uTimePlayed);
         }
         else
         {
           switch ( var_type )
           {
             case VAR_PlayerBits:
-              __debugbreak(); //how do I get here?
               _449B7E_toggle_bit((unsigned char *)field_1A50, var_value, 1u);
               break;
             case VAR_NPCs2:
-              __debugbreak(); //how do I get here?
               pParty->field_709 = 0;
               LOBYTE(pNPCStats->pNewNPCData[var_value].uFlags) |= 0x80u;
               pParty->CountHirelings();
@@ -5497,13 +5493,11 @@
         }
         return;
       }
-      if ( var_type < VAR_Counter9 )
+      if ( var_type <= VAR_Counter10 )
         return;
-      if ( (signed int)var_type <= 0x112 )
+      if ( (signed int)var_type <= VAR_UnknownTimeEvent19 )
       {
-        __debugbreak(); //how do I get here?
-        *(int *)&stru_AA1058[3].pSounds[8 * var_type + 44532] = LODWORD(pParty->uTimePlayed);
-        *(int *)&stru_AA1058[3].pSounds[8 * var_type + 44536] = HIDWORD(pParty->uTimePlayed);
+        pParty->PartyTimes._s_times[var_type - VAR_UnknownTimeEvent0] = pParty->uTimePlayed;    //*(int *)&stru_AA1058[3].pSounds[8 * var_type + 44532] = LODWORD(pParty->uTimePlayed);, *(int *)&stru_AA1058[3].pSounds[8 * var_type + 44536] = HIDWORD(pParty->uTimePlayed);
       }
       else
       {
@@ -5519,12 +5513,10 @@
         }
         if ( var_type <= VAR_ReputationInCurrentLocation
           || var_type > VAR_History_28
-          || (v22 = var_type - 276, pParty->field_3C.field_4F0[2 * v22 + 1] | pParty->field_3C.field_4F0[2 * v22])
-          || (pParty->field_3C.field_4F0[2 * (var_type - 276)] = LODWORD(pParty->uTimePlayed),
+          || (v22 = var_type - VAR_History_0, pParty->PartyTimes.HistoryEventTimes[v22])
+          || (pParty->PartyTimes.HistoryEventTimes[v22] = pParty->uTimePlayed,
               v23 = pStorylineText->StoreLine[v22].pText == 0,//*(&pStorylineText->field_0 + 3 * v22) == 0,
-              pParty->field_3C.field_4F0[2 * (var_type - 276) + 1] = HIDWORD(pParty->uTimePlayed),
               v23) )
-              __debugbreak(); //how do I get here?
           return;
         bFlashHistoryBook = 1;
       }
@@ -6486,10 +6478,9 @@
     {
       if ( var_type <= VAR_ReputationInCurrentLocation
         || var_type > VAR_History_28
-        || (v25 = var_type - 276, pParty->field_3C.field_4F0[2 * v25 + 1] | pParty->field_3C.field_4F0[2 * v25])
-        || (pParty->field_3C.field_4F0[2 * (var_type - 276)] = LODWORD(pParty->uTimePlayed),
+        || (v25 = var_type - 276, pParty->PartyTimes.HistoryEventTimes[v25])
+        || (pParty->PartyTimes.HistoryEventTimes[var_type - 276] = pParty->uTimePlayed,
             v26 = pStorylineText->StoreLine[v25].pText==0,//*(&pStorylineText->field_0 + 3 * v25) == 0,
-            pParty->field_3C.field_4F0[2 * (var_type - 276) + 1] = HIDWORD(pParty->uTimePlayed),
             v26) )
         return;
       bFlashHistoryBook = 1;
--- a/UI/Books/UINotesBooks.cpp	Fri Sep 27 10:08:01 2013 +0200
+++ b/UI/Books/UINotesBooks.cpp	Mon Sep 30 05:48:32 2013 +0200
@@ -437,10 +437,11 @@
   BtnDown_flag = 0;
   BtnUp_flag = 0;
   num_achieved_awards = 0;
-  pDialogueString = BuildDialogueString(pStorylineText->StoreLine[ achieved_awards[books_primary_item_per_page]].pText, uActiveCharacter - 1,
-                                        0, 0, 0, (__int64 *)&pParty->field_3C._s_times[achieved_awards[books_primary_item_per_page] + 21]);
   if ( achieved_awards[books_primary_item_per_page] )
   {
+    int index = ((int)achieved_awards[books_primary_item_per_page] - 1);
+    pDialogueString = BuildDialogueString(pStorylineText->StoreLine[ achieved_awards[books_primary_item_per_page]].pText, uActiveCharacter - 1,
+                                          0, 0, 0, &pParty->PartyTimes.HistoryEventTimes[index]);
     pStringOnPage = pAutonoteFont->GetPageTop(pDialogueString, &journal_window, 1, (unsigned __int8)Journal_limitation_factor[books_primary_item_per_page]);
     journal_window.DrawText(pAutonoteFont, 1, 0, ui_book_journal_text_color, (const char *)pStringOnPage, 0,
                             journal_window.uFrameY + journal_window.uFrameHeight, ui_book_journal_text_shadow);
--- a/UI/UIGuilds.cpp	Fri Sep 27 10:08:01 2013 +0200
+++ b/UI/UIGuilds.cpp	Mon Sep 30 05:48:32 2013 +0200
@@ -223,7 +223,7 @@
       DrawTextAtStatusBar(statusbar_string, 0);
       if ( !v8 )
       {
-        working_window.DrawCurrentTime(pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C] - pParty->uTimePlayed);//"Приходите через 14 дней"
+        working_window.DrawCurrentTime(pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C] - pParty->uTimePlayed);//"Приходите через 14 дней"
         return;
       }
       v12 = pMouse->GetCursorPos(&v51);
--- a/UI/UIHouses.cpp	Fri Sep 27 10:08:01 2013 +0200
+++ b/UI/UIHouses.cpp	Mon Sep 30 05:48:32 2013 +0200
@@ -833,10 +833,10 @@
 		//v10 = uHouseID;
 		if ( (signed int)uHouseID < 53 ) //entering shops and guilds
 			{
-			if ( !(pParty->field_3C._shop_ban_times[uHouseID])
-				||  (pParty->field_3C._shop_ban_times[uHouseID] <= pParty->uTimePlayed) )
+			if ( !(pParty->PartyTimes._shop_ban_times[uHouseID])
+				||  (pParty->PartyTimes._shop_ban_times[uHouseID] <= pParty->uTimePlayed) )
 				{
-				pParty->field_3C._shop_ban_times[uHouseID] = 0;
+				pParty->PartyTimes._shop_ban_times[uHouseID] = 0;
 				}
 			else
 				{
@@ -1091,7 +1091,7 @@
     case BuildingType_SelfGuild:
     case BuildingType_16:
     {
-      if ( pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C] >= (signed __int64)pParty->uTimePlayed )
+      if ( pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C] >= (signed __int64)pParty->uTimePlayed )
       {
         for ( uint i = 0; i < 12; ++i )
         {
@@ -1106,7 +1106,7 @@
       else//generation new books
       {
         SpellBookGenerator();
-        pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C] = pParty->uTimePlayed + (signed __int64)((double)(0xA8C000
+        pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C] = pParty->uTimePlayed + (signed __int64)((double)(0xA8C000
                                   * (signed int)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].field_1C) * 0.033333335);
       }
       break;
@@ -1115,10 +1115,10 @@
     {
       if ( uMessageParam == HOUSE_DIALOGUE_TOWNHALL_MESSAGE )
       {
-        if ( pParty->field_3C.bountyHunting_next_generation_time[(int)((char *)v8->ptr_1C - 102)] < (signed __int64)pParty->uTimePlayed )//new generation
+        if ( pParty->PartyTimes.bountyHunting_next_generation_time[(int)((char *)v8->ptr_1C - 102)] < (signed __int64)pParty->uTimePlayed )//new generation
         {
           pParty->monster_for_hunting_killed[(int)((char *)v8->ptr_1C - 102)] = false;
-          pParty->field_3C.bountyHunting_next_generation_time[(int)((char *)v8->ptr_1C - 102)] = (signed __int64)((double)(309657600 * (pParty->uCurrentMonth + 12i64 * pParty->uCurrentYear - 14015)) * 0.033333335);
+          pParty->PartyTimes.bountyHunting_next_generation_time[(int)((char *)v8->ptr_1C - 102)] = (signed __int64)((double)(309657600 * (pParty->uCurrentMonth + 12i64 * pParty->uCurrentYear - 14015)) * 0.033333335);
           pParty->monster_id_for_hunting[(int)((char *)v8->ptr_1C - 102)] = rand() % 258 + 1;
           v16 = (int)((char *)window_SpeakInHouse->ptr_1C - 102);
           if ( !v16 )
@@ -1603,11 +1603,11 @@
     case HOUSE_DIALOGUE_SHOP_BUY_STANDARD:
     case HOUSE_DIALOGUE_SHOP_BUY_SPECIAL:
     {
-      if ( pParty->field_3C.Shops_next_generation_time[(unsigned int)v8->ptr_1C] < (signed __int64)pParty->uTimePlayed )
+      if ( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)v8->ptr_1C] < (signed __int64)pParty->uTimePlayed )
       {
         GenerateStandartShopItems();
         GenerateSpecialShopItems();
-        pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C] = pParty->uTimePlayed + (signed __int64)((double)(11059200 * (signed int)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].field_1C) * 0.033333335);
+        pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C] = pParty->uTimePlayed + (signed __int64)((double)(11059200 * (signed int)p2DEvents[(unsigned int)window_SpeakInHouse->ptr_1C - 1].field_1C) * 0.033333335);
       }
       if ( uMessageParam == HOUSE_DIALOGUE_SHOP_BUY_STANDARD )
       {
--- a/UI/UIShops.cpp	Fri Sep 27 10:08:01 2013 +0200
+++ b/UI/UIShops.cpp	Mon Sep 30 05:48:32 2013 +0200
@@ -248,7 +248,7 @@
         }
         else
         {
-          dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);//Приходите через 7 дней
+          dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);//Приходите через 7 дней
           pNumActiveItem = 0; //added
         }
       }
@@ -437,7 +437,7 @@
         }
         else
         {
-          dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C]  - pParty->uTimePlayed);
+          dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C]  - pParty->uTimePlayed);
           pNumActiveItem = 0; //added
         }
       }
@@ -767,7 +767,7 @@
         dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3);
         return;
       }
-      dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed);
+      dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed);
       return;
     }
     break;
@@ -839,7 +839,7 @@
         dialog_window.DrawTitleText(pFontArrus, 0, v115, pWhiteColor, v36, 3);
         return;
       }
-      dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed);
+      dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C]- pParty->uTimePlayed);
       return;
     }
     break;
@@ -1016,7 +1016,7 @@
         while ( v104 < 8 );
         return;
       }
-      dialog_window.DrawCurrentTime(pParty->field_3C.Shops_next_generation_time[window_SpeakInHouse->par1C]-  pParty->uTimePlayed);
+      dialog_window.DrawCurrentTime(pParty->PartyTimes.Shops_next_generation_time[window_SpeakInHouse->par1C]-  pParty->uTimePlayed);
       return;
     }
     break;
@@ -1349,7 +1349,7 @@
         DrawTextAtStatusBar(v65, 0);
         if ( !v109 )
         {
-          dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
+          dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
           return;
         }
         pMouse->GetCursorPos(&v98);
@@ -1549,7 +1549,7 @@
         DrawTextAtStatusBar(v65, 0);
         if ( !v109 )
         {
-          dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
+          dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[ (unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
           return;
         }
         v66 = pMouse->GetCursorPos(&v98);
@@ -1930,7 +1930,7 @@
       DrawTextAtStatusBar(v69, 0);
       if ( !v117 )
       {
-        dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
+        dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
         return;
       }
       v70 = pMouse->GetCursorPos(&v102);
@@ -2061,7 +2061,7 @@
       DrawTextAtStatusBar(v69, 0);
       if ( !v117 )
       {
-        dialog_window.DrawCurrentTime( pParty->field_3C.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
+        dialog_window.DrawCurrentTime( pParty->PartyTimes.Shops_next_generation_time[(unsigned int)window_SpeakInHouse->ptr_1C] - pParty->uTimePlayed);
         return;
       }
       v70 = pMouse->GetCursorPos(&v102);
@@ -2667,7 +2667,7 @@
       PlayHouseSound((unsigned int)window_SpeakInHouse->ptr_1C, HouseSound_Greeting_2);
       return;
     }
-    if ( (signed __int64)pParty->field_3C._shop_ban_times[(unsigned int)window_SpeakInHouse->ptr_1C]<= (signed __int64)pParty->uTimePlayed )
+    if ( (signed __int64)pParty->PartyTimes._shop_ban_times[(unsigned int)window_SpeakInHouse->ptr_1C]<= (signed __int64)pParty->uTimePlayed )
     {
       if ( pParty->uNumGold <= 10000 )
       {
--- a/mm7_2.cpp	Fri Sep 27 10:08:01 2013 +0200
+++ b/mm7_2.cpp	Mon Sep 30 05:48:32 2013 +0200
@@ -230,10 +230,10 @@
   pDialogueWindow->_41D08F_set_keyboard_control_group(1, 1, 0, 2);
   dialog_menu_id = HOUSE_DIALOGUE_OTHER;
   //get new monster for hunting
-  if ( pParty->field_3C.bountyHunting_next_generation_time[(int)((char *)window_SpeakInHouse->ptr_1C - 102)] < (signed __int64)pParty->uTimePlayed )
+  if ( pParty->PartyTimes.bountyHunting_next_generation_time[(int)((char *)window_SpeakInHouse->ptr_1C - 102)] < (signed __int64)pParty->uTimePlayed )
   {
     pParty->monster_for_hunting_killed[(int)((char *)window_SpeakInHouse->ptr_1C - 102)] = false;
-    pParty->field_3C.bountyHunting_next_generation_time[(int)((char *)window_SpeakInHouse->ptr_1C - 102)] = (signed __int64)((double)(0x12750000 * (pParty->uCurrentMonth + 12i64 * pParty->uCurrentYear - 14015)) * 0.033333335);
+    pParty->PartyTimes.bountyHunting_next_generation_time[(int)((char *)window_SpeakInHouse->ptr_1C - 102)] = (signed __int64)((double)(0x12750000 * (pParty->uCurrentMonth + 12i64 * pParty->uCurrentYear - 14015)) * 0.033333335);
     for ( i = rand(); ; i = rand() )
     {
       rand_monster_id = i % 258 + 1;
@@ -5073,7 +5073,7 @@
   assert(sizeof(RenderD3D) == 0x148);
 //  assert(sizeof(Render) == 0x129844);
   assert(sizeof(Player) == 0x1B3C);
-  assert(sizeof(Party_stru0) == 0x678);
+  assert(sizeof(PartyTimeStruct) == 0x678);
   assert(sizeof(Party) == 0x16238);
   assert(sizeof(GUIButton) == 0xBC);
   assert(sizeof(GUIWindow) == 0x54);
--- a/mm7_4.cpp	Fri Sep 27 10:08:01 2013 +0200
+++ b/mm7_4.cpp	Mon Sep 30 05:48:32 2013 +0200
@@ -2120,7 +2120,7 @@
               i += 2;
               break;
             }
-            init_summoned_item(&v56, pParty->field_3C._s_times[v17-51]);
+            init_summoned_item(&v56, pParty->PartyTimes._s_times[v17-51]);
             sprintfex(a1, pGlobalTXT_LocalizationStrings[378], aMonthNames[v56.field_14_exprie_month], v56.field_C_expire_day + 1, v56.field_18_expire_year);
             strcat(pTmpBuf2.data(), a1);
             dst = strlen(pTmpBuf2.data());
@@ -2755,7 +2755,7 @@
       pParty->uFine = 4000000;
   }
 
-  pParty->field_3C._shop_ban_times[a1] = pParty->uTimePlayed + 368640;
+  pParty->PartyTimes._shop_ban_times[a1] = pParty->uTimePlayed + 368640;
  
 LABEL_13:
   pParty->InTheShopFlags[a1] = 1;