Scriptname SuH_spellES_trainpet extends activemagiceffect  

SuH_Fun property _Fun auto

GlobalVariable property SuH_PETactivedog auto
GlobalVariable property SuH_PETactivewolf auto
GlobalVariable property SuH_PETactivehorse auto

Actor property PlayerRef auto
Actor property SuH_actor_dog auto
Actor property SuH_actor_wolf auto
Actor property SuH_actor_horse auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	if SuH_PETactivedog.GetValue()
		actor[] animActor = new actor[2]
		animActor[0] = SuH_actor_dog
		animActor[1] = PlayerRef
		_Fun.ANIMcalc(0, animActor)
	elseif SuH_PETactivewolf.GetValue()
		actor[] animActor = new actor[2]
		animActor[0] = SuH_actor_wolf
		animActor[1] = PlayerRef
		_Fun.ANIMcalc(0, animActor)
	elseif SuH_PETactivehorse.GetValue()
		actor[] animActor = new actor[2]
		animActor[0] = SuH_actor_horse
		animActor[1] = PlayerRef
		_Fun.ANIMcalc(0, animActor)
	else
		Debug.Notification("Train Pet - No active pets found!")
	endIf
	
endEvent