Refresh the cooldown spell if it got dispelled for whatever reason

This commit is contained in:
Eddoursul 2024-02-26 17:39:08 +01:00
parent 46aece5208
commit 7530eb221d
4 changed files with 5 additions and 2 deletions

View File

@ -48,6 +48,9 @@ Event OnPlayerLoadGame()
GoToState("RealPlayer")
endif
RegisterForActions()
if CooldownMagicEffect == None || CooldownMagicEffect as String == "[_00E_Game_TalentCooldownSC <None>]"
RefreshCooldownSpell()
endif
endif
else
Debug.Trace("NO SKSE: individual shout cooldowns are disabled")
@ -63,7 +66,7 @@ State RealPlayer
; This OnUpdate is triggered by RegisterForUpdates in other scripts attached to the player, e.g. in _00E_EPUpdateFunctions.
; So we must be cautious here.
If (CooldownMagicEffect == None && _00E_Game_TalentControl_CooldownResetDesired.GetValue() != 0)
If (CooldownMagicEffect == None && _00E_Game_TalentControl_CooldownResetDesired.GetValueInt() != 0)
_00E_Game_TalentControl_CooldownResetDesired.SetValue(0)
AddSpell(_00E_Game_AbTalentCooldown, False)
EndIf

View File

@ -27,7 +27,7 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
LastTimeElapsed = 0.0
Player = Game.GetPlayer() as _00E_Game_TalentControlSC
Player = Game.GetForm(0x14) as _00E_Game_TalentControlSC
CurrentShout = Player.GetEquippedShout()