public MagicEffectData(string Tag = null) : base(Tag) { MagicEffectFlags = new MagicEffectFlags(); BaseCost = new Single(); AssociatedItem = new FormID(); MagicSchool = new MagicSchool(); ResistanceType = new ActorValues(); Unknown = new UInt16(); Unused = new byte[2]; Light = new FormID(); ProjectileSpeed = new Single(); EffectShader = new FormID(); ObjectDisplayShader = new FormID(); EffectSound = new FormID(); BoltSound = new FormID(); HitSound = new FormID(); AreaSound = new FormID(); ConstantEffectEnchantmentFactor = new Single(); ConstantEffectBarterFactor = new Single(); Archetype = new MagicEffectArchetype(); ActorValue = new ActorValues(); }
public MagicEffectData(MagicEffectFlags MagicEffectFlags, Single BaseCost, FormID AssociatedItem, MagicSchool MagicSchool, ActorValues ResistanceType, UInt16 Unknown, Byte[] Unused, FormID Light, Single ProjectileSpeed, FormID EffectShader, FormID ObjectDisplayShader, FormID EffectSound, FormID BoltSound, FormID HitSound, FormID AreaSound, Single ConstantEffectEnchantmentFactor, Single ConstantEffectBarterFactor, MagicEffectArchetype Archetype, ActorValues ActorValue) { this.MagicEffectFlags = MagicEffectFlags; this.BaseCost = BaseCost; this.AssociatedItem = AssociatedItem; this.MagicSchool = MagicSchool; this.ResistanceType = ResistanceType; this.Unknown = Unknown; this.Unused = Unused; this.Light = Light; this.ProjectileSpeed = ProjectileSpeed; this.EffectShader = EffectShader; this.ObjectDisplayShader = ObjectDisplayShader; this.EffectSound = EffectSound; this.BoltSound = BoltSound; this.HitSound = HitSound; this.AreaSound = AreaSound; this.ConstantEffectEnchantmentFactor = ConstantEffectEnchantmentFactor; this.ConstantEffectBarterFactor = ConstantEffectBarterFactor; this.Archetype = Archetype; this.ActorValue = ActorValue; }
public static MagicEffectArchetype ReadArchetype(MutagenFrame frame) { // Jump back and read in association FormKey var curPos = frame.Position; frame.Position -= 56; FormKey associatedItemKey = FormKeyBinaryTranslation.Instance.Parse(frame); frame.Position = curPos; // Finish reading archetype MagicEffectArchetype.TypeEnum archetypeEnum = (MagicEffectArchetype.TypeEnum)frame.ReadInt32(); MagicEffectArchetype archetype; switch (archetypeEnum) { case MagicEffectArchetype.TypeEnum.Light: archetype = new MagicEffectLightArchetype(); break; case MagicEffectArchetype.TypeEnum.Bound: archetype = new MagicEffectBoundArchetype(); break; case MagicEffectArchetype.TypeEnum.SummonCreature: archetype = new MagicEffectNpcArchetype(); break; case MagicEffectArchetype.TypeEnum.Guide: archetype = new MagicEffectGuideArchetype(); break; case MagicEffectArchetype.TypeEnum.SpawnHazard: archetype = new MagicEffectSpawnHazardArchetype(); break; case MagicEffectArchetype.TypeEnum.PeakValueModifier: archetype = new MagicEffectKeywordArchetype(); break; case MagicEffectArchetype.TypeEnum.Cloak: archetype = new MagicEffectSpellArchetype(); break; case MagicEffectArchetype.TypeEnum.Werewolf: archetype = new MagicEffectWerewolfArchetype(); break; case MagicEffectArchetype.TypeEnum.VampireLord: archetype = new MagicEffectVampireArchetype(); break; case MagicEffectArchetype.TypeEnum.EnhanceWeapon: archetype = new MagicEffectEnchantmentArchetype(); break; case MagicEffectArchetype.TypeEnum.Calm: case MagicEffectArchetype.TypeEnum.Frenzy: archetype = new MagicEffectArchetype(archetypeEnum) { ActorValue = ActorValue.Aggression }; break; case MagicEffectArchetype.TypeEnum.Invisibility: archetype = new MagicEffectArchetype(archetypeEnum) { ActorValue = ActorValue.Invisibility }; break; case MagicEffectArchetype.TypeEnum.Paralysis: archetype = new MagicEffectArchetype(archetypeEnum) { ActorValue = ActorValue.Paralysis }; break; case MagicEffectArchetype.TypeEnum.Demoralize: case MagicEffectArchetype.TypeEnum.TurnUndead: case MagicEffectArchetype.TypeEnum.Rally: case MagicEffectArchetype.TypeEnum.Banish: archetype = new MagicEffectArchetype(archetypeEnum) { ActorValue = ActorValue.Confidence }; break; default: archetype = new MagicEffectArchetype(archetypeEnum) { ActorValue = ActorValue.None }; break; } archetype.AssociationKey = associatedItemKey; archetype.ActorValue = (ActorValue)frame.ReadInt32(); return(archetype); }