diff UI/Books/UINotesBooks.cpp @ 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 75fafd8ced59
children d28d3c006077
line wrap: on
line diff
--- 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);