public virtual int GetHashCode(ILeveledSpellGetter item)
        {
            var hash = new HashCode();

            hash.Add(base.GetHashCode());
            return(hash.ToHashCode());
        }
Ejemplo n.º 2
0
 public void Write(
     MutagenWriter writer,
     ILeveledSpellGetter item,
     RecordTypeConverter?recordTypeConverter = null)
 {
     using (HeaderExport.Header(
                writer: writer,
                record: recordTypeConverter.ConvertToCustom(RecordTypes.LVSP),
                type: Mutagen.Bethesda.Binary.ObjectType.Record))
     {
         try
         {
             Fallout4MajorRecordBinaryWriteTranslation.WriteEmbedded(
                 item: item,
                 writer: writer);
             MajorRecordBinaryWriteTranslation.WriteRecordTypes(
                 item: item,
                 writer: writer,
                 recordTypeConverter: recordTypeConverter);
         }
         catch (Exception ex)
         {
             throw RecordException.Enrich(ex, item);
         }
     }
 }
 public void Write(
     MutagenWriter writer,
     ILeveledSpellGetter item,
     TypedWriteParams?translationParams = null)
 {
     using (HeaderExport.Record(
                writer: writer,
                record: translationParams.ConvertToCustom(RecordTypes.LVSP)))
     {
         try
         {
             Fallout4MajorRecordBinaryWriteTranslation.WriteEmbedded(
                 item: item,
                 writer: writer);
             MajorRecordBinaryWriteTranslation.WriteRecordTypes(
                 item: item,
                 writer: writer,
                 translationParams: translationParams);
         }
         catch (Exception ex)
         {
             throw RecordException.Enrich(ex, item);
         }
     }
 }
 public IEnumerable <IFormLinkGetter> GetContainedFormLinks(ILeveledSpellGetter obj)
 {
     foreach (var item in base.GetContainedFormLinks(obj))
     {
         yield return(item);
     }
     yield break;
 }
 public static LeveledSpell DeepCopy(
     this ILeveledSpellGetter item,
     LeveledSpell.TranslationMask?copyMask = null)
 {
     return(((LeveledSpellSetterTranslationCommon)((ILeveledSpellGetter)item).CommonSetterTranslationInstance() !).DeepCopy(
                item: item,
                copyMask: copyMask));
 }
 public static bool Equals(
     this ILeveledSpellGetter item,
     ILeveledSpellGetter rhs,
     LeveledSpell.TranslationMask?equalsMask = null)
 {
     return(((LeveledSpellCommon)((ILeveledSpellGetter)item).CommonInstance() !).Equals(
                lhs: item,
                rhs: rhs,
                crystal: equalsMask?.GetCrystal()));
 }
        public LeveledSpell Duplicate(
            ILeveledSpellGetter item,
            FormKey formKey,
            TranslationCrystal?copyMask)
        {
            var newRec = new LeveledSpell(formKey);

            newRec.DeepCopyIn(item, default(ErrorMaskBuilder?), copyMask);
            return(newRec);
        }
 public static LeveledSpell Duplicate(
     this ILeveledSpellGetter item,
     FormKey formKey,
     LeveledSpell.TranslationMask?copyMask = null)
 {
     return(((LeveledSpellCommon)((ILeveledSpellGetter)item).CommonInstance() !).Duplicate(
                item: item,
                formKey: formKey,
                copyMask: copyMask?.GetCrystal()));
 }
 protected static void ToStringFields(
     ILeveledSpellGetter item,
     FileGeneration fg,
     LeveledSpell.Mask <bool>?printMask = null)
 {
     Fallout4MajorRecordCommon.ToStringFields(
         item: item,
         fg: fg,
         printMask: printMask);
 }
 public static string ToString(
     this ILeveledSpellGetter item,
     string?name = null,
     LeveledSpell.Mask <bool>?printMask = null)
 {
     return(((LeveledSpellCommon)((ILeveledSpellGetter)item).CommonInstance() !).ToString(
                item: item,
                name: name,
                printMask: printMask));
 }
 public static LeveledSpell DeepCopy(
     this ILeveledSpellGetter item,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask = null)
 {
     return(((LeveledSpellSetterTranslationCommon)((ILeveledSpellGetter)item).CommonSetterTranslationInstance() !).DeepCopy(
                item: item,
                copyMask: copyMask,
                errorMask: errorMask));
 }
 public static LeveledSpell.Mask <bool> GetEqualsMask(
     this ILeveledSpellGetter item,
     ILeveledSpellGetter rhs,
     EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
 {
     return(((LeveledSpellCommon)((ILeveledSpellGetter)item).CommonInstance() !).GetEqualsMask(
                item: item,
                rhs: rhs,
                include: include));
 }
 public void FillEqualsMask(
     ILeveledSpellGetter item,
     ILeveledSpellGetter rhs,
     LeveledSpell.Mask <bool> ret,
     EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
 {
     if (rhs == null)
     {
         return;
     }
     base.FillEqualsMask(item, rhs, ret, include);
 }
 public static void ToString(
     this ILeveledSpellGetter item,
     FileGeneration fg,
     string?name = null,
     LeveledSpell.Mask <bool>?printMask = null)
 {
     ((LeveledSpellCommon)((ILeveledSpellGetter)item).CommonInstance() !).ToString(
         item: item,
         fg: fg,
         name: name,
         printMask: printMask);
 }
 public static void DeepCopyIn(
     this ILeveledSpellInternal lhs,
     ILeveledSpellGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask)
 {
     ((LeveledSpellSetterTranslationCommon)((ILeveledSpellGetter)lhs).CommonSetterTranslationInstance() !).DeepCopyIn(
         item: lhs,
         rhs: rhs,
         errorMask: errorMask,
         copyMask: copyMask,
         deepCopy: false);
 }
        public string ToString(
            ILeveledSpellGetter item,
            string?name = null,
            LeveledSpell.Mask <bool>?printMask = null)
        {
            var fg = new FileGeneration();

            ToString(
                item: item,
                fg: fg,
                name: name,
                printMask: printMask);
            return(fg.ToString());
        }
        public LeveledSpell.Mask <bool> GetEqualsMask(
            ILeveledSpellGetter item,
            ILeveledSpellGetter rhs,
            EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
        {
            var ret = new LeveledSpell.Mask <bool>(false);

            ((LeveledSpellCommon)((ILeveledSpellGetter)item).CommonInstance() !).FillEqualsMask(
                item: item,
                rhs: rhs,
                ret: ret,
                include: include);
            return(ret);
        }
 public void DeepCopyIn(
     ILeveledSpell item,
     ILeveledSpellGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask,
     bool deepCopy)
 {
     base.DeepCopyIn(
         (IFallout4MajorRecord)item,
         (IFallout4MajorRecordGetter)rhs,
         errorMask,
         copyMask,
         deepCopy: deepCopy);
 }
 public void DeepCopyIn(
     ILeveledSpellInternal item,
     ILeveledSpellGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask,
     bool deepCopy)
 {
     base.DeepCopyIn(
         item,
         rhs,
         errorMask,
         copyMask,
         deepCopy: deepCopy);
 }
        public LeveledSpell DeepCopy(
            ILeveledSpellGetter item,
            LeveledSpell.TranslationMask?copyMask = null)
        {
            LeveledSpell ret = (LeveledSpell)((LeveledSpellCommon)((ILeveledSpellGetter)item).CommonInstance() !).GetNew();

            ((LeveledSpellSetterTranslationCommon)((ILeveledSpellGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn(
                item: ret,
                rhs: item,
                errorMask: null,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: true);
            return(ret);
        }
        public static void DeepCopyIn(
            this ILeveledSpellInternal lhs,
            ILeveledSpellGetter rhs,
            out LeveledSpell.ErrorMask errorMask,
            LeveledSpell.TranslationMask?copyMask = null)
        {
            var errorMaskBuilder = new ErrorMaskBuilder();

            ((LeveledSpellSetterTranslationCommon)((ILeveledSpellGetter)lhs).CommonSetterTranslationInstance() !).DeepCopyIn(
                item: lhs,
                rhs: rhs,
                errorMask: errorMaskBuilder,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: false);
            errorMask = LeveledSpell.ErrorMask.Factory(errorMaskBuilder);
        }
        public LeveledSpell DeepCopy(
            ILeveledSpellGetter item,
            out LeveledSpell.ErrorMask errorMask,
            LeveledSpell.TranslationMask?copyMask = null)
        {
            var          errorMaskBuilder = new ErrorMaskBuilder();
            LeveledSpell ret = (LeveledSpell)((LeveledSpellCommon)((ILeveledSpellGetter)item).CommonInstance() !).GetNew();

            ((LeveledSpellSetterTranslationCommon)((ILeveledSpellGetter)ret).CommonSetterTranslationInstance() !).DeepCopyIn(
                ret,
                item,
                errorMask: errorMaskBuilder,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: true);
            errorMask = LeveledSpell.ErrorMask.Factory(errorMaskBuilder);
            return(ret);
        }
 public void ToString(
     ILeveledSpellGetter item,
     FileGeneration fg,
     string?name = null,
     LeveledSpell.Mask <bool>?printMask = null)
 {
     if (name == null)
     {
         fg.AppendLine($"LeveledSpell =>");
     }
     else
     {
         fg.AppendLine($"{name} (LeveledSpell) =>");
     }
     fg.AppendLine("[");
     using (new DepthWrapper(fg))
     {
         ToStringFields(
             item: item,
             fg: fg,
             printMask: printMask);
     }
     fg.AppendLine("]");
 }