diff mm7_5.cpp @ 1754:421c29d4ab3e

UITransition.cpp cleaning(continue)
author Ritor1
date Mon, 30 Sep 2013 17:29:27 +0600
parents f44b6e02e81c
children 4dee76d79c78
line wrap: on
line diff
--- a/mm7_5.cpp	Mon Sep 30 11:41:55 2013 +0600
+++ b/mm7_5.cpp	Mon Sep 30 17:29:27 2013 +0600
@@ -2336,7 +2336,7 @@
                 }
               }
             }
-            pAudioPlayer->PlaySound(SOUND_27, 0, 0, -1, 0, 0, 0, 0);
+            pAudioPlayer->PlaySound(SOUND_error, 0, 0, -1, 0, 0, 0, 0);
             v73 = "Can't jump to that location!";
           }
           ShowStatusBarString(v73, 6u);
@@ -3380,11 +3380,9 @@
           pAudioPlayer->PlaySound((SoundID)23, 0, 0, -1, 0, 0, 0, 0);
           break;
         case UIMSG_PlayerCreationSelectActiveSkill:
-          pPlayer = &pPlayer[uPlayerCreationUI_SelectedCharacter];
-          v6 = pPlayer->GetSkillIdxByOrder(pParam + 4);
-          if ( pPlayer->GetSkillIdxByOrder(3) == 37 )
-            pParty->pPlayers[0].pActiveSkills[v6 + 3486 * uPlayerCreationUI_SelectedCharacter] = 1;
-          pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0);
+          if ( pPlayer[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(3) == 37 )
+            pParty->pPlayers[uPlayerCreationUI_SelectedCharacter].pActiveSkills[pPlayer[uPlayerCreationUI_SelectedCharacter].GetSkillIdxByOrder(pParam + 4)] = 1;
+          pAudioPlayer->PlaySound(SOUND_24, 0, 0, -1, 0, 0, 0, 0);
           break;
         case UIMSG_PlayerCreationSelectClass:
           pPlayer[uPlayerCreationUI_SelectedCharacter].Reset((PLAYER_CLASS_TYPE)pParam);
@@ -3402,14 +3400,14 @@
           pParty->Reset();
           break;
         case UIMSG_PlayerCreationRemoveUpSkill:
-          uPlayerCreationUI_SelectedCharacter = pParam;
           v4 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem;
-          //int pSex = pGUIWindow_CurrentMenu->pStartingPosActiveItem;
-          v41 = 2;
-          v5 = v4 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam;
-          pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v5;
-          pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(v41)
-                                         + 3486 * uPlayerCreationUI_SelectedCharacter] = 0;
+          pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v4 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam;
+          pParty->pPlayers[pParam].pActiveSkills[pPlayer[pParam].GetSkillIdxByOrder(2)] = 0;
+          break;
+        case UIMSG_PlayerCreationRemoveDownSkill:
+          v4 = pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem;
+          pGUIWindow_CurrentMenu->pCurrentPosActiveItem = v4 % 7 + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam;
+          pParty->pPlayers[pParam].pActiveSkills[pPlayer[pParam].GetSkillIdxByOrder(3)] = 0;
           break;
         case UIMSG_PlayerCreationChangeName:
           pAudioPlayer->PlaySound((SoundID)24, 0, 0, -1, 0, 0, 0, 0);
@@ -3567,14 +3565,6 @@
             //VideoPlayer::dtor();
           }
           break;
-        case UIMSG_PlayerCreationRemoveDownSkill:
-          uPlayerCreationUI_SelectedCharacter = pParam;
-          //__debugbreak();
-          pGUIWindow_CurrentMenu->pCurrentPosActiveItem = (pGUIWindow_CurrentMenu->pCurrentPosActiveItem - pGUIWindow_CurrentMenu->pStartingPosActiveItem) % 7
-             + pGUIWindow_CurrentMenu->pStartingPosActiveItem + 7 * pParam;
-          pParty->pPlayers[0].pActiveSkills[(&pPlayer[uPlayerCreationUI_SelectedCharacter])->GetSkillIdxByOrder(3)
-                                             + 3486 * uPlayerCreationUI_SelectedCharacter] = 0;
-          break;
         default:
           break;
       }