changeset 1774:097d72afd20f

Player::SetVariable removing LABEL_111
author Grumpy7
date Tue, 01 Oct 2013 09:49:16 +0200
parents 8e16cf2c7b1b
children 0abc0db1ea56
files Player.cpp
diffstat 1 files changed, 117 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- 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 )