Fixed not returning Undercity Barracks and Temple of the Rhalata scrolls after failed use

This commit is contained in:
Eddoursul 2024-02-14 11:51:18 +01:00
parent 70bcbb646b
commit 6f81c851f8
2 changed files with 2 additions and 1 deletions

View File

@ -12,8 +12,9 @@ Event OnEffectStart (Actor akTarket, Actor akCaster)
MAGVampireSunlight.Play(PlayerREF) MAGVampireSunlight.Play(PlayerREF)
MagicEffect CastedMGEF = Self.GetBaseObject() MagicEffect CastedMGEF = Self.GetBaseObject()
int nItems = _00E_TeleportScrollMGEF_List.GetSize()
Int iIndex = 0 Int iIndex = 0
While iIndex < 11 && !bScrollAdded While iIndex < nItems && !bScrollAdded
MagicEffect ScrollMGEF = _00E_TeleportScrollMGEF_List.GetAt(iIndex) as MagicEffect MagicEffect ScrollMGEF = _00E_TeleportScrollMGEF_List.GetAt(iIndex) as MagicEffect
If ScrollMGEF == CastedMGEF If ScrollMGEF == CastedMGEF
Scroll ScrollToAdd = _00E_TeleportScroll_List.GetAt(iIndex) as Scroll Scroll ScrollToAdd = _00E_TeleportScroll_List.GetAt(iIndex) as Scroll