Graceful degradation for Essence Gift

This commit is contained in:
Eddoursul 2024-02-10 15:05:30 +01:00
parent 7dda460b7d
commit d0f5f414e9
3 changed files with 12 additions and 2 deletions

BIN
Essence Gift.esp Normal file

Binary file not shown.

Binary file not shown.

View File

@ -9,6 +9,8 @@ Sound Property _00E_FS_Phasmalist_EnterWorld_Female Auto
EffectShader Property AbsorbGreenFXS Auto
float Property fMagnitude Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
Actor akApparition = None
@ -18,6 +20,14 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
_00E_FS_EssenceGift_NoApparition.Show()
EndIf
if SKSE.GetVersion()
fMagnitude = GetMagnitude()
endif
if fMagnitude == 0.0
fMagnitude = 45.0
endif
If akApparition && akApparition.Is3DLoaded()
If akApparition.GetActorBase().GetSex() == 1
_00E_FS_Phasmalist_EnterWorld_Female.Play(akApparition)
@ -25,8 +35,8 @@ Event OnEffectStart(Actor akTarget, Actor akCaster)
_00E_FS_Phasmalist_EnterWorld_Male.Play(akApparition)
EndIf
AbsorbGreenFXS.Play(akApparition)
akApparition.RestoreActorValue("Magicka", Self.GetMagnitude())
akApparition.RestoreActorValue("Magicka", fMagnitude)
Else
akCaster.RestoreActorValue("Magicka", Self.GetMagnitude())
akCaster.RestoreActorValue("Magicka", fMagnitude)
EndIf
EndEvent