diff Player.cpp @ 1773:8e16cf2c7b1b

Player::SetVariable removing LABEL_112
author Grumpy7
date Tue, 01 Oct 2013 09:47:57 +0200
parents c0b32e8a82c8
children 097d72afd20f
line wrap: on
line diff
--- a/Player.cpp	Tue Oct 01 09:45:32 2013 +0200
+++ b/Player.cpp	Tue Oct 01 09:47:57 2013 +0200
@@ -5738,37 +5738,107 @@
           this->uMight = (unsigned __int8)var_value;
           v28 = 0;
           v26 = 92;
-          goto LABEL_112;
+          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_BaseIntellect:
           this->uIntelligence = (unsigned __int8)var_value;
           v28 = 0;
           v26 = 92;
-          goto LABEL_112;
+          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_BasePersonality:
           this->uWillpower = (unsigned __int8)var_value;
           v28 = 0;
           v26 = 92;
-          goto LABEL_112;
+          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_BaseEndurance:
           this->uEndurance = (unsigned __int8)var_value;
           v28 = 0;
           v26 = 92;
-          goto LABEL_112;
+          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_BaseSpeed:
           this->uSpeed = (unsigned __int8)var_value;
           v28 = 0;
           v26 = 92;
-          goto LABEL_112;
+          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_BaseAccuracy:
           this->uAccuracy = (unsigned __int8)var_value;
           v28 = 0;
           v26 = 92;
-          goto LABEL_112;
+          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_BaseLuck:
           this->uLuck = (unsigned __int8)var_value;
           v28 = 0;
           v26 = 92;
-          goto LABEL_112;
+          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_FixedFood:
           Party::SetFood(var_value);
           goto LABEL_124;
@@ -5831,7 +5901,6 @@
 LABEL_111:
     v28 = 0;
     v26 = SPEECH_91;
-LABEL_112:
     v19 = pPlayers[currPlayerId + 1];
     v31 = 1;
     v19->PlaySound((PlayerSpeech)v26, v28);
@@ -5874,63 +5943,183 @@
         this->uAccuracyBonus = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_ActualLuck:
 LABEL_73:
         this->uLuckBonus = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_FireResistance:
         this->sResFireBase = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_AirResistance:
         this->sResAirBase = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_WaterResistance:
         this->sResWaterBase = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_EarthResistance:
         this->sResEarthBase = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_SpiritResistance:
         this->sResSpiritBase = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_MindResistance:
         this->sResMindBase = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_BodyResistance:
         this->sResBodyBase = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_LightResistance:
         this->sResLightBase = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_DarkResistance:
         this->sResDarkBase = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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_MagicResistance:
         this->sResMagicBase = (unsigned __int8)var_value;
         v28 = 0;
         v26 = 92;
-        goto LABEL_112;
+        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;
       default:
         return;
     }