# HG changeset patch # User Grumpy7 # Date 1380613756 -7200 # Node ID 097d72afd20fa14fbf2d5b6e1af524ed2e7fa116 # Parent 8e16cf2c7b1bc8d214ee9c6e356379ac71b9ad86 Player::SetVariable removing LABEL_111 diff -r 8e16cf2c7b1b -r 097d72afd20f Player.cpp --- a/Player.cpp Tue Oct 01 09:47:57 2013 +0200 +++ b/Player.cpp Tue Oct 01 09:49:16 2013 +0200 @@ -5898,7 +5898,6 @@ } LABEL_64: this->uMightBonus = (unsigned __int8)var_value; -LABEL_111: v28 = 0; v26 = SPEECH_91; v19 = pPlayers[currPlayerId + 1]; @@ -5918,26 +5917,86 @@ if ( var_type == VAR_FireResistanceBonus ) { this->sResFireBonus = (unsigned __int8)var_value; - goto LABEL_111; + v28 = 0; + v26 = SPEECH_91; + v19 = pPlayers[currPlayerId + 1]; + v31 = 1; + v19->PlaySound((PlayerSpeech)v26, v28); + 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; } switch ( var_type ) { case VAR_ActualIntellect: LABEL_68: this->uIntelligenceBonus = (unsigned __int8)var_value; - goto LABEL_111; + v28 = 0; + v26 = SPEECH_91; + v19 = pPlayers[currPlayerId + 1]; + v31 = 1; + v19->PlaySound((PlayerSpeech)v26, v28); + 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_ActualPersonality: LABEL_69: this->uWillpowerBonus = (unsigned __int8)var_value; - goto LABEL_111; + v28 = 0; + v26 = SPEECH_91; + v19 = pPlayers[currPlayerId + 1]; + v31 = 1; + v19->PlaySound((PlayerSpeech)v26, v28); + 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_ActualEndurance: LABEL_70: this->uEnduranceBonus = (unsigned __int8)var_value; - goto LABEL_111; + v28 = 0; + v26 = SPEECH_91; + v19 = pPlayers[currPlayerId + 1]; + v31 = 1; + v19->PlaySound((PlayerSpeech)v26, v28); + 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_ActualSpeed: LABEL_71: this->uSpeedBonus = (unsigned __int8)var_value; - goto LABEL_111; + v28 = 0; + v26 = SPEECH_91; + v19 = pPlayers[currPlayerId + 1]; + v31 = 1; + v19->PlaySound((PlayerSpeech)v26, v28); + 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_ActualAccuracy: LABEL_72: this->uAccuracyBonus = (unsigned __int8)var_value; @@ -6216,22 +6275,70 @@ v4->sResMindBonus = (unsigned __int8)var_value; break; } - goto LABEL_111; + v28 = 0; + v26 = SPEECH_91; + v19 = pPlayers[currPlayerId + 1]; + v31 = 1; + v19->PlaySound((PlayerSpeech)v26, v28); + 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; } if ( var_type == VAR_LightResistanceBonus ) { v4->sResLightBonus = (unsigned __int8)var_value; - goto LABEL_111; + v28 = 0; + v26 = SPEECH_91; + v19 = pPlayers[currPlayerId + 1]; + v31 = 1; + v19->PlaySound((PlayerSpeech)v26, v28); + 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; } if ( var_type == VAR_DarkResistanceBonus ) { v4->sResDarkBonus = (unsigned __int8)var_value; - goto LABEL_111; + v28 = 0; + v26 = SPEECH_91; + v19 = pPlayers[currPlayerId + 1]; + v31 = 1; + v19->PlaySound((PlayerSpeech)v26, v28); + 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; } if ( var_type == VAR_MagicResistanceBonus ) { v4->sResMagicBonus = (unsigned __int8)var_value; - goto LABEL_111; + v28 = 0; + v26 = SPEECH_91; + v19 = pPlayers[currPlayerId + 1]; + v31 = 1; + v19->PlaySound((PlayerSpeech)v26, v28); + 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; } if ( var_type > VAR_MagicResistanceBonus && var_type <= VAR_DiplomacySkill ) if ( v30 != 1 )