diff Player.cpp @ 1310:0665a061132b

autonotes and quest tables overflow fixed
author Gloval
date Mon, 24 Jun 2013 23:55:02 +0400
parents 5450af4f57ef
children 78f0f74eab1d
line wrap: on
line diff
--- a/Player.cpp	Mon Jun 24 21:05:10 2013 +0600
+++ b/Player.cpp	Mon Jun 24 23:55:02 2013 +0400
@@ -7893,11 +7893,11 @@
   {
     if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_autonote_bits[((signed __int16)var_value - 1) >> 3])
       //&& (&dword_723718_autonote_related)[8 * a3] )
-	  && pAutonoteTxt[var_value-1].pText )
+	  && pAutonoteTxt[var_value].pText )
     {
       v20 = pPlayers[currPlayerId + 1];
       v20->PlaySound(SPEECH_96, 0);
-	  v21 = pAutonoteTxt[var_value-1].eType;// dword_72371C[2 * a3];
+	  v21 = pAutonoteTxt[var_value].eType;// dword_72371C[2 * a3];
       bFlashAutonotesBook = 1;
       _506568_autonote_type = v21;
       DrawPlayerBuffAnimBasedOnCondition(currPlayerId);
@@ -7998,7 +7998,7 @@
       case VAR_QBits_QuestsDone:
         if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_quest_bits[((signed __int16)var_value - 1) >> 3])
           // && (&dword_722F10)[4 * a3] )
-		    && pQuestTable[var_value-1] )
+		    && pQuestTable[var_value] )
           {
           v14 = pPlayers[currPlayerId + 1];
           bFlashQuestBook = 1;
@@ -8425,7 +8425,7 @@
             case VAR_QBits_QuestsDone:
               if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & pParty->_quest_bits[((signed __int16)val - 1) >> 3])
                 //&& (&dword_722F10)[4 * val] )
-				&& pQuestTable[val-1] )
+				&& pQuestTable[val] )
               {
                 //v17 = pPlayers[uPlayerIdx + 1];
                 bFlashQuestBook = 1;
@@ -8690,12 +8690,12 @@
     }
     if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & pParty->_autonote_bits[((signed __int16)val - 1) >> 3])
       //&& (&dword_723718_autonote_related)[8 * val] )
-	  && pAutonoteTxt[val-1].pText )
+	  && pAutonoteTxt[val].pText )
     {
       v23 = pPlayers[uPlayerIdx + 1];
       v34 = 1;
       v23->PlaySound(SPEECH_96, 0);
-	  v24 = pAutonoteTxt[val-1].eType;//dword_72371C[2 * val];
+	  v24 = pAutonoteTxt[val].eType;//dword_72371C[2 * val];
       bFlashAutonotesBook = 1;
       _506568_autonote_type = v24;
     }