comparison 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
comparison
equal deleted inserted replaced
1309:995d2f8ad71b 1310:0665a061132b
7891 } 7891 }
7892 if ( var_type == VAR_AutoNotes ) 7892 if ( var_type == VAR_AutoNotes )
7893 { 7893 {
7894 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_autonote_bits[((signed __int16)var_value - 1) >> 3]) 7894 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_autonote_bits[((signed __int16)var_value - 1) >> 3])
7895 //&& (&dword_723718_autonote_related)[8 * a3] ) 7895 //&& (&dword_723718_autonote_related)[8 * a3] )
7896 && pAutonoteTxt[var_value-1].pText ) 7896 && pAutonoteTxt[var_value].pText )
7897 { 7897 {
7898 v20 = pPlayers[currPlayerId + 1]; 7898 v20 = pPlayers[currPlayerId + 1];
7899 v20->PlaySound(SPEECH_96, 0); 7899 v20->PlaySound(SPEECH_96, 0);
7900 v21 = pAutonoteTxt[var_value-1].eType;// dword_72371C[2 * a3]; 7900 v21 = pAutonoteTxt[var_value].eType;// dword_72371C[2 * a3];
7901 bFlashAutonotesBook = 1; 7901 bFlashAutonotesBook = 1;
7902 _506568_autonote_type = v21; 7902 _506568_autonote_type = v21;
7903 DrawPlayerBuffAnimBasedOnCondition(currPlayerId); 7903 DrawPlayerBuffAnimBasedOnCondition(currPlayerId);
7904 } 7904 }
7905 _449B7E_toggle_bit(pParty->_autonote_bits, var_value, 1u); 7905 _449B7E_toggle_bit(pParty->_autonote_bits, var_value, 1u);
7996 this->uExperience = var_value; 7996 this->uExperience = var_value;
7997 goto LABEL_124; 7997 goto LABEL_124;
7998 case VAR_QBits_QuestsDone: 7998 case VAR_QBits_QuestsDone:
7999 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_quest_bits[((signed __int16)var_value - 1) >> 3]) 7999 if ( !((unsigned __int8)(0x80u >> ((signed __int16)var_value - 1) % 8) & pParty->_quest_bits[((signed __int16)var_value - 1) >> 3])
8000 // && (&dword_722F10)[4 * a3] ) 8000 // && (&dword_722F10)[4 * a3] )
8001 && pQuestTable[var_value-1] ) 8001 && pQuestTable[var_value] )
8002 { 8002 {
8003 v14 = pPlayers[currPlayerId + 1]; 8003 v14 = pPlayers[currPlayerId + 1];
8004 bFlashQuestBook = 1; 8004 bFlashQuestBook = 1;
8005 v14->PlaySound(SPEECH_93, 0); 8005 v14->PlaySound(SPEECH_93, 0);
8006 DrawPlayerBuffAnimBasedOnCondition(currPlayerId); 8006 DrawPlayerBuffAnimBasedOnCondition(currPlayerId);
8423 Dst->uExperience = 4000000000i64; 8423 Dst->uExperience = 4000000000i64;
8424 goto _play_anim_and_exit; 8424 goto _play_anim_and_exit;
8425 case VAR_QBits_QuestsDone: 8425 case VAR_QBits_QuestsDone:
8426 if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & pParty->_quest_bits[((signed __int16)val - 1) >> 3]) 8426 if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & pParty->_quest_bits[((signed __int16)val - 1) >> 3])
8427 //&& (&dword_722F10)[4 * val] ) 8427 //&& (&dword_722F10)[4 * val] )
8428 && pQuestTable[val-1] ) 8428 && pQuestTable[val] )
8429 { 8429 {
8430 //v17 = pPlayers[uPlayerIdx + 1]; 8430 //v17 = pPlayers[uPlayerIdx + 1];
8431 bFlashQuestBook = 1; 8431 bFlashQuestBook = 1;
8432 v34 = 1; 8432 v34 = 1;
8433 v3 = 1; 8433 v3 = 1;
8688 return; 8688 return;
8689 goto _play_sound; 8689 goto _play_sound;
8690 } 8690 }
8691 if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & pParty->_autonote_bits[((signed __int16)val - 1) >> 3]) 8691 if ( !((unsigned __int8)(0x80u >> ((signed __int16)val - 1) % 8) & pParty->_autonote_bits[((signed __int16)val - 1) >> 3])
8692 //&& (&dword_723718_autonote_related)[8 * val] ) 8692 //&& (&dword_723718_autonote_related)[8 * val] )
8693 && pAutonoteTxt[val-1].pText ) 8693 && pAutonoteTxt[val].pText )
8694 { 8694 {
8695 v23 = pPlayers[uPlayerIdx + 1]; 8695 v23 = pPlayers[uPlayerIdx + 1];
8696 v34 = 1; 8696 v34 = 1;
8697 v23->PlaySound(SPEECH_96, 0); 8697 v23->PlaySound(SPEECH_96, 0);
8698 v24 = pAutonoteTxt[val-1].eType;//dword_72371C[2 * val]; 8698 v24 = pAutonoteTxt[val].eType;//dword_72371C[2 * val];
8699 bFlashAutonotesBook = 1; 8699 bFlashAutonotesBook = 1;
8700 _506568_autonote_type = v24; 8700 _506568_autonote_type = v24;
8701 } 8701 }
8702 _449B7E_toggle_bit(pParty->_autonote_bits, val, 1u); 8702 _449B7E_toggle_bit(pParty->_autonote_bits, val, 1u);
8703 v3 = 1; 8703 v3 = 1;