Ejemplo n.º 1
0
        public MagicEffectKeywordArchetype DeepCopy(
            IMagicEffectKeywordArchetypeGetter item,
            MagicEffectKeywordArchetype.TranslationMask?copyMask = null)
        {
            MagicEffectKeywordArchetype ret = (MagicEffectKeywordArchetype)((MagicEffectKeywordArchetypeCommon)((IMagicEffectKeywordArchetypeGetter)item).CommonInstance() !).GetNew();

            ((MagicEffectKeywordArchetypeSetterTranslationCommon)((IMagicEffectKeywordArchetypeGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn(
                item: ret,
                rhs: item,
                errorMask: null,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: true);
            return(ret);
        }
Ejemplo n.º 2
0
        public MagicEffectKeywordArchetype DeepCopy(
            IMagicEffectKeywordArchetypeGetter item,
            out MagicEffectKeywordArchetype.ErrorMask errorMask,
            MagicEffectKeywordArchetype.TranslationMask?copyMask = null)
        {
            var errorMaskBuilder            = new ErrorMaskBuilder();
            MagicEffectKeywordArchetype ret = (MagicEffectKeywordArchetype)((MagicEffectKeywordArchetypeCommon)((IMagicEffectKeywordArchetypeGetter)item).CommonInstance() !).GetNew();

            ((MagicEffectKeywordArchetypeSetterTranslationCommon)((IMagicEffectKeywordArchetypeGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn(
                ret,
                item,
                errorMask: errorMaskBuilder,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: true);
            errorMask = MagicEffectKeywordArchetype.ErrorMask.Factory(errorMaskBuilder);
            return(ret);
        }
Ejemplo n.º 3
0
 public override object GetNew()
 {
     return(MagicEffectKeywordArchetype.GetNew());
 }
Ejemplo n.º 4
0
            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);
            }