# HG changeset patch # User Grumpy7 # Date 1380613532 -7200 # Node ID c0b32e8a82c80fbc5f1f9f7fb082c3c676cc10bf # Parent 6c1823e19c2e1487d99a83ac01b0c3e71558100b Player::SetVariable restoring and fixing LABEL_51 diff -r 6c1823e19c2e -r c0b32e8a82c8 Player.cpp --- a/Player.cpp Tue Oct 01 07:36:27 2013 +0200 +++ b/Player.cpp Tue Oct 01 09:45:32 2013 +0200 @@ -5669,21 +5669,23 @@ _449B7E_toggle_bit((unsigned char *)v4->_achieved_awards_bits, var_value, 1u); if ( v30 != 1 ) { - if ( v31 != 1 ) + if ( v31 == 1 ) + { + v5 = 0; + v25 = 8 * currPlayerId + 400; + LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); + pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); return; + } + } + pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); + if ( v31 == 1 ) + { v5 = 0; v25 = 8 * currPlayerId + 400; LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); - return; } - pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); - if ( v31 != 1 ) - return; - v5 = 0; - v25 = 8 * currPlayerId + 400; - LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); - pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); return; case VAR_Experience: this->uExperience = var_value; @@ -5699,19 +5701,27 @@ v31 = 1; v14->PlaySound(SPEECH_93, 0); } - v13 = (char *)pParty->_quest_bits; -LABEL_51: - _449B7E_toggle_bit((unsigned char *)v13, var_value, 1u); - if (( v30 != 1 )&&( v31 != 1 )) - return; - else - pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); - if ( v31 != 1 ) - return; - v25 = 8 * currPlayerId + 400; - LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); - pAudioPlayer->PlaySound(SOUND_20001, v25, 0, -1, 0, 0, 0, 0); - return; + _449B7E_toggle_bit((unsigned char *)pParty->_quest_bits, var_value, 1u); + if ( v30 != 1 ) + { + if ( v31 == 1 ) + { + v5 = 0; + v25 = 8 * currPlayerId + 400; + LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); + pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); + return; + } + } + pGame->pStru6Instance->SetPlayerBuffAnim(0x96u, currPlayerId); + if ( v31 == 1 ) + { + v5 = 0; + v25 = 8 * currPlayerId + 400; + LOBYTE(v25) = PID(OBJECT_Player,currPlayerId - 112); + pAudioPlayer->PlaySound(SOUND_20001, v25, v5, -1, v5, v5, v5, v5); + } + return; case VAR_PlayerItemInHands: item.Reset(); item.Reset();