Moved autolearning ingredient effects to a quest

This commit is contained in:
Eddoursul 2024-10-16 15:18:59 +02:00
parent ca62b20f5f
commit b330a3f06f
7 changed files with 29 additions and 10 deletions

BIN
Autolearn quest.esp Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -4795,3 +4795,4 @@ scripts\prkf__00e_fs_nq07_craftpotio_0300146e.pex
scripts\prkf__00e_craftquestpotionpe_0300146d.pex
scripts\pf_mq14_sc06_toriusstandstil_0003c597.pex
scripts\_00E_UpdateSpeedmult.pex
scripts\_00E_AutolearnEffectsAlias.pex

View File

@ -0,0 +1,27 @@
Scriptname _00E_AutolearnEffectsAlias extends ReferenceAlias Hidden
FormList Property _00E_AutolearnEffectsList Auto
int iProcessedItemsNum
Event OnInit()
OnPlayerLoadGame()
EndEvent
Event OnPlayerLoadGame()
Int nItems = _00E_AutolearnEffectsList.GetSize()
if iProcessedItemsNum == nItems
return
endif
Int i = 0
While i < nItems
(_00E_AutolearnEffectsList.GetAt(i) as Ingredient).LearnAllEffects()
i += 1
EndWhile
iProcessedItemsNum = nItems
EndEvent

View File

@ -1,9 +0,0 @@
Scriptname _00E_LearnAllEffects extends Ingredient
Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)
If akNewContainer && akNewContainer == Game.GetForm(0x14)
LearnAllEffects()
EndIf
EndEvent