public MagicEffectSpawnHazardArchetype DeepCopy( IMagicEffectSpawnHazardArchetypeGetter item, MagicEffectSpawnHazardArchetype.TranslationMask?copyMask = null) { MagicEffectSpawnHazardArchetype ret = (MagicEffectSpawnHazardArchetype)((MagicEffectSpawnHazardArchetypeCommon)((IMagicEffectSpawnHazardArchetypeGetter)item).CommonInstance() !).GetNew(); ((MagicEffectSpawnHazardArchetypeSetterTranslationCommon)((IMagicEffectSpawnHazardArchetypeGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn( item: ret, rhs: item, errorMask: null, copyMask: copyMask?.GetCrystal(), deepCopy: true); return(ret); }
public MagicEffectSpawnHazardArchetype DeepCopy( IMagicEffectSpawnHazardArchetypeGetter item, out MagicEffectSpawnHazardArchetype.ErrorMask errorMask, MagicEffectSpawnHazardArchetype.TranslationMask?copyMask = null) { var errorMaskBuilder = new ErrorMaskBuilder(); MagicEffectSpawnHazardArchetype ret = (MagicEffectSpawnHazardArchetype)((MagicEffectSpawnHazardArchetypeCommon)((IMagicEffectSpawnHazardArchetypeGetter)item).CommonInstance() !).GetNew(); ((MagicEffectSpawnHazardArchetypeSetterTranslationCommon)((IMagicEffectSpawnHazardArchetypeGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn( ret, item, errorMask: errorMaskBuilder, copyMask: copyMask?.GetCrystal(), deepCopy: true); errorMask = MagicEffectSpawnHazardArchetype.ErrorMask.Factory(errorMaskBuilder); return(ret); }
public override object GetNew() { return(MagicEffectSpawnHazardArchetype.GetNew()); }
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); }