Removed redundant checks and updates from _00E_Game_SkillmenuSC intended to fix hotkey registrations, prone to breaking due to missing RegisterForMenu() in OnPlayerLoadGame
This commit is contained in:
parent
9a50707a1e
commit
2b3f294bb4
Binary file not shown.
@ -23,7 +23,6 @@ endFunction
|
||||
|
||||
Event OnInit()
|
||||
|
||||
FixedBugs1_2 = True
|
||||
iCurrentAffinityIndex = -1
|
||||
InitAffinitySystem()
|
||||
|
||||
@ -33,9 +32,11 @@ Event OnInit()
|
||||
|
||||
EndEvent
|
||||
|
||||
Event OnUpdate()
|
||||
Event OnPlayerLoadGame()
|
||||
|
||||
InitAffinitySystem()
|
||||
UpdateKeyRegistration()
|
||||
RegisterForMenu("Journal Menu")
|
||||
|
||||
EndEvent
|
||||
|
||||
@ -66,18 +67,10 @@ EndEvent
|
||||
|
||||
Event OnMenuClose(String MenuName)
|
||||
|
||||
If MenuName == ("Journal Menu")
|
||||
UpdateKeyRegistration()
|
||||
EndIf
|
||||
|
||||
EndEvent
|
||||
|
||||
Event OnLocationChange(Location akOldLoc, Location akNewLoc)
|
||||
; Gavrant:
|
||||
; I don't know the purpose of re-registering keys on location change, but someone added this to _00E_Game_TalentControlSC in the first place.
|
||||
UpdateKeyRegistration()
|
||||
EndEvent
|
||||
|
||||
|
||||
;=====================================================================================
|
||||
; FUNCTIONS
|
||||
@ -148,20 +141,11 @@ Function OpenSkillmenu()
|
||||
If PlayerREF.GetCurrentLocation() != _00E_Dreamworld_Location
|
||||
MenuOpen = True
|
||||
|
||||
UpdateKeyRegistration()
|
||||
|
||||
; if !Game.IsMovementControlsEnabled()
|
||||
; bControlsHaveBeenDisabled = True
|
||||
; EndIf
|
||||
|
||||
_00E_Game_MenuIMOD.Apply()
|
||||
UI.OpenCustomMenu("00E_heromenu")
|
||||
UI.InvokeStringA("CustomMenu", "_root.heromenu_mc.SetStringValues", GetStrings())
|
||||
UI.InvokeFloatA("CustomMenu", "_root.heromenu_mc.SetIntValues", GetFloats())
|
||||
UI.InvokeFloatA("CustomMenu", "_root.heromenu_mc.SetModifier", GetMods())
|
||||
|
||||
RegisterForSingleUpdate(8)
|
||||
|
||||
EndIf
|
||||
|
||||
EndFunction
|
||||
@ -169,17 +153,8 @@ EndFunction
|
||||
Function CloseSkillmenu()
|
||||
|
||||
UI.CloseCustomMenu()
|
||||
|
||||
; If !bControlsHaveBeenDisabled
|
||||
; Game.EnablePlayerControls()
|
||||
; EndIf
|
||||
|
||||
; bControlsHaveBeenDisabled = False
|
||||
|
||||
_00E_Game_MenuIMOD.Remove()
|
||||
MenuOpen = False
|
||||
UpdateKeyRegistration()
|
||||
RegisterForSingleUpdate(15)
|
||||
|
||||
EndFunction
|
||||
|
||||
@ -392,33 +367,11 @@ Function InitAffinitySystem()
|
||||
EndWhile
|
||||
EndIf
|
||||
|
||||
; Fix 1.2.x.x bugs if needed
|
||||
If FixedBugs1_2 == False
|
||||
If bHasAffinityBonus == False
|
||||
iCurrentAffinityIndex = -1
|
||||
EndIf
|
||||
|
||||
If iCurrentAffinityIndex >= 0
|
||||
Spell affSpell = Affinity_Spells[iCurrentAffinityIndex]
|
||||
If PlayerREF.HasSpell(affSpell) == False
|
||||
PlayerREF.AddSpell(affSpell)
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
Int[] PerkDistribution = GetPerkDistribution()
|
||||
UpdateClassIndices(PerkDistribution)
|
||||
|
||||
FixedBugs1_2 = True
|
||||
|
||||
Else
|
||||
|
||||
; Init MajorSchool
|
||||
If MajorSchool == 0
|
||||
UpdateMajorSchool()
|
||||
EndIf
|
||||
|
||||
EndIf
|
||||
|
||||
BlockClassUpdates = False
|
||||
|
||||
EndFunction
|
||||
@ -832,16 +785,6 @@ String Function GetPlayerClassName()
|
||||
EndIf
|
||||
EndFunction
|
||||
|
||||
Event OnPlayerLoadGame()
|
||||
InitAffinitySystem()
|
||||
|
||||
; Post-1.2.5.0 update
|
||||
If bMeditateKeyRegistered == False
|
||||
UpdateKeyRegistration()
|
||||
EndIf
|
||||
|
||||
EndEvent
|
||||
|
||||
|
||||
;=====================================================================================
|
||||
; PROPERTIES
|
||||
@ -1078,7 +1021,6 @@ Int Affinity_RavagerIndex
|
||||
Int Affinity_ScourgeOfTheWildsIndex
|
||||
Int Affinity_SoulcallerIndex
|
||||
|
||||
Bool FixedBugs1_2
|
||||
Bool BlockClassUpdates
|
||||
|
||||
Bool bMeditateKeyRegistered = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user