Scriptname SuH_spellES_returnpet extends activemagiceffect  

SuH_Fun property _Fun auto
DialogueFollowerScript Property DialogueFollower Auto
Quest Property pDialogueFollower  Auto
ObjectReference Property SuH_realm_petreturn Auto 
ObjectReference Property SuH_realm_petreturnbear Auto 
ObjectReference Property SuH_realm_petreturnbristle Auto 
ObjectReference Property SuH_realm_petreturndog Auto 
ObjectReference Property SuH_realm_petreturndraugr Auto 
ObjectReference Property SuH_realm_petreturnfalmer Auto 
ObjectReference Property SuH_realm_petreturnfamiliar Auto 
ObjectReference Property SuH_realm_petreturngargoyle Auto 
ObjectReference Property SuH_realm_petreturnhorker Auto 
ObjectReference Property SuH_realm_petreturnhorse Auto 
ObjectReference Property SuH_realm_petreturnhusky Auto 
ObjectReference Property SuH_realm_petreturnwolf Auto 
ObjectReference Property SuH_realm_petreturnskeever Auto 
ObjectReference Property SuH_realm_petreturnnetch Auto 
ObjectReference Property SuH_realm_petreturnriekling Auto 
ObjectReference Property SuH_realm_petreturnsabrecat Auto 
ObjectReference Property SuH_realm_petreturnseeker Auto 
ObjectReference Property SuH_realm_petreturnspriggan Auto 
ObjectReference Property SuH_realm_petreturntroll Auto 

GlobalVariable property SuH_PETactive auto
GlobalVariable property SuH_PETactivedog auto
GlobalVariable property SuH_PETactivewolf auto
GlobalVariable property SuH_PETactivehorse auto
GlobalVariable property SuH_PETactiveskeever auto
GlobalVariable property SuH_PETactivefamiliar auto
GlobalVariable property SuH_PETactivebear auto
GlobalVariable property SuH_PETactivesabrecat auto
GlobalVariable property SuH_PETactivedraugr auto
GlobalVariable property SuH_PETactivetroll auto
GlobalVariable property SuH_PETactivespriggan auto
GlobalVariable property SuH_PETactivehorker auto
GlobalVariable property SuH_PETactivefalmer auto
GlobalVariable property SuH_PETactivehusky auto
GlobalVariable property SuH_PETactivebristle auto
GlobalVariable property SuH_PETactiveseeker auto
GlobalVariable property SuH_PETactivegargoyle auto
GlobalVariable property SuH_PETactivenetch auto
GlobalVariable property SuH_PETactiveriekling auto

Actor property SuH_actor_dog auto
Actor property SuH_actor_wolf auto
Actor property SuH_actor_horse auto
Actor property SuH_actor_skeever auto
actor property SuH_actor_familiar auto
actor property SuH_actor_bear auto
actor property SuH_actor_sabrecat auto
actor property SuH_actor_draugr auto
actor property SuH_actor_troll auto
actor property SuH_actor_spriggan auto
actor property SuH_actor_horker auto
actor property SuH_actor_falmer auto
actor property SuH_actor_husky auto
actor property SuH_actor_bristle auto
actor property SuH_actor_seeker auto
actor property SuH_actor_gargoyle auto
actor property SuH_actor_netch auto
actor property SuH_actor_riekling auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
	if SuH_PETactivedog.getValue()
		(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
		SuH_actor_dog.MoveTo(SuH_realm_petreturndog)
		SuH_PETactivedog.SetValue(0)
	elseif SuH_PETactivewolf.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_wolf.MoveTo(SuH_realm_petreturnwolf)
			SuH_PETactivewolf.SetValue(0)
	elseif SuH_PETactivehorse.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_horse.MoveTo(SuH_realm_petreturnhorse)
			SuH_PETactivehorse.SetValue(0) 
	elseif SuH_PETactiveskeever.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_skeever.MoveTo(SuH_realm_petreturnskeever)
			SuH_PETactiveskeever.SetValue(0) 
	elseif SuH_PETactivefamiliar.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_familiar.MoveTo(SuH_realm_petreturnfamiliar)
			SuH_PETactivefamiliar.SetValue(0) 
	elseif SuH_PETactivebear.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_bear.MoveTo(SuH_realm_petreturnbear)
			SuH_PETactivebear.SetValue(0) 
	elseif SuH_PETactivesabrecat.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_sabrecat.MoveTo(SuH_realm_petreturnsabrecat)
			SuH_PETactivesabrecat.SetValue(0) 
	elseif SuH_PETactivedraugr.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_draugr.MoveTo(SuH_realm_petreturndraugr)
			SuH_PETactivedraugr.SetValue(0) 
	elseif SuH_PETactivetroll.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_troll.MoveTo(SuH_realm_petreturntroll)
			SuH_PETactivetroll.SetValue(0) 
	elseif SuH_PETactivespriggan.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_spriggan.MoveTo(SuH_realm_petreturnspriggan)
			SuH_PETactivespriggan.SetValue(0) 
	elseif SuH_PETactivehorker.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_horker.MoveTo(SuH_realm_petreturnhorker)
			SuH_PETactivehorker.SetValue(0) 
	elseif SuH_PETactivefalmer.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_falmer.MoveTo(SuH_realm_petreturnfalmer)
			SuH_PETactivefalmer.SetValue(0) 
	elseif SuH_PETactivehusky.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_husky.MoveTo(SuH_realm_petreturnhusky)
			SuH_PETactivehusky.SetValue(0) 
	elseif SuH_PETactivebristle.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_bristle.MoveTo(SuH_realm_petreturnbristle)
			SuH_PETactivebristle.SetValue(0) 
	elseif SuH_PETactiveseeker.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_seeker.MoveTo(SuH_realm_petreturnseeker)
			SuH_PETactiveseeker.SetValue(0) 
	elseif SuH_PETactivegargoyle.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_gargoyle.MoveTo(SuH_realm_petreturngargoyle)
			SuH_PETactivegargoyle.SetValue(0) 
	elseif SuH_PETactivenetch.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_netch.MoveTo(SuH_realm_petreturnnetch)
			SuH_PETactivenetch.SetValue(0) 
	elseif SuH_PETactiveriekling.getValue()
			(pDialogueFollower as DialogueFollowerScript).DismissAnimal()
			SuH_actor_riekling.MoveTo(SuH_realm_petreturnriekling)
			SuH_PETactiveriekling.SetValue(0) 
	else
		Debug.Notification("Succubus Heart - No valid pets found")
	endIf
endEvent