1
Fork 0

Refresh the cooldown spell if it got dispelled for whatever reason

development
Eddoursul 2 months ago
parent 46aece5208
commit 7530eb221d
  1. BIN
      scripts/_00e_game_talentcontrolsc.pex
  2. BIN
      scripts/_00e_game_talentcooldownsc.pex
  3. 5
      source/scripts/_00e_game_talentcontrolsc.psc
  4. 2
      source/scripts/_00e_game_talentcooldownsc.psc

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

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

Loading…
Cancel
Save