Exemplo n.º 1
0
 public static Spell DeepCopy(
     this ISpellGetter item,
     Spell.TranslationMask?copyMask = null)
 {
     return(((SpellSetterTranslationCommon)((ISpellGetter)item).CommonSetterTranslationInstance() !).DeepCopy(
                item: item,
                copyMask: copyMask));
 }
Exemplo n.º 2
0
 public static bool Equals(
     this ISpellGetter item,
     ISpellGetter rhs)
 {
     return(((SpellCommon)((ISpellGetter)item).CommonInstance() !).Equals(
                lhs: item,
                rhs: rhs));
 }
Exemplo n.º 3
0
 public static Spell Duplicate(
     this ISpellGetter item,
     FormKey formKey,
     Spell.TranslationMask?copyMask = null)
 {
     return(((SpellCommon)((ISpellGetter)item).CommonInstance() !).Duplicate(
                item: item,
                formKey: formKey,
                copyMask: copyMask?.GetCrystal()));
 }
Exemplo n.º 4
0
 public static Spell DeepCopy(
     this ISpellGetter item,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask = null)
 {
     return(((SpellSetterTranslationCommon)((ISpellGetter)item).CommonSetterTranslationInstance() !).DeepCopy(
                item: item,
                copyMask: copyMask,
                errorMask: errorMask));
 }
Exemplo n.º 5
0
 public static bool Equals(
     this ISpellGetter item,
     ISpellGetter rhs,
     Spell.TranslationMask?equalsMask = null)
 {
     return(((SpellCommon)((ISpellGetter)item).CommonInstance() !).Equals(
                lhs: item,
                rhs: rhs,
                crystal: equalsMask?.GetCrystal()));
 }
Exemplo n.º 6
0
 public static string ToString(
     this ISpellGetter item,
     string?name = null,
     Spell.Mask <bool>?printMask = null)
 {
     return(((SpellCommon)((ISpellGetter)item).CommonInstance() !).ToString(
                item: item,
                name: name,
                printMask: printMask));
 }
Exemplo n.º 7
0
 public static Spell.Mask <bool> GetEqualsMask(
     this ISpellGetter item,
     ISpellGetter rhs,
     EqualsMaskHelper.Include include = EqualsMaskHelper.Include.All)
 {
     return(((SpellCommon)((ISpellGetter)item).CommonInstance() !).GetEqualsMask(
                item: item,
                rhs: rhs,
                include: include));
 }
 public override void Write(
     MutagenWriter writer,
     ISpellGetter item,
     TypedWriteParams?translationParams = null)
 {
     Write(
         item: (ISpellLeveledGetter)item,
         writer: writer,
         translationParams: translationParams);
 }
 public override Spell Duplicate(
     ISpellGetter item,
     FormKey formKey,
     TranslationCrystal?copyMask)
 {
     return(this.Duplicate(
                item: (ISpellLeveledGetter)item,
                formKey: formKey,
                copyMask: copyMask));
 }
Exemplo n.º 10
0
 public override void Write(
     MutagenWriter writer,
     ISpellGetter item,
     RecordTypeConverter?recordTypeConverter = null)
 {
     Write(
         item: (ISpellLeveledGetter)item,
         writer: writer,
         recordTypeConverter: recordTypeConverter);
 }
Exemplo n.º 11
0
 public static void ToString(
     this ISpellGetter item,
     FileGeneration fg,
     string?name = null,
     Spell.Mask <bool>?printMask = null)
 {
     ((SpellCommon)((ISpellGetter)item).CommonInstance() !).ToString(
         item: item,
         fg: fg,
         name: name,
         printMask: printMask);
 }
Exemplo n.º 12
0
 public static void DeepCopyIn(
     this ISpellInternal lhs,
     ISpellGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask)
 {
     ((SpellSetterTranslationCommon)((ISpellGetter)lhs).CommonSetterTranslationInstance() !).DeepCopyIn(
         item: lhs,
         rhs: rhs,
         errorMask: errorMask,
         copyMask: copyMask,
         deepCopy: false);
 }
Exemplo n.º 13
0
 /// <summary>
 /// Adds a condition to the recipe that the user have a given spell
 /// </summary>
 /// <param name="cobj"></param>
 /// <param name="spell"></param>
 public static void AddCraftingSpellCondition(this ConstructibleObject cobj, ISpellGetter spell, bool mustHave = true)
 {
     cobj.Conditions.Add(new ConditionFloat
     {
         Data = new FunctionConditionData
         {
             Function           = Condition.Function.HasSpell,
             ParameterOneRecord = new FormLink <ISkyrimMajorRecordGetter>(spell.FormKey),
         },
         CompareOperator = CompareOperator.EqualTo,
         ComparisonValue = mustHave ? 1 : 0,
     });
 }
 public override void DeepCopyIn(
     ISpell item,
     ISpellGetter rhs,
     ErrorMaskBuilder?errorMask,
     TranslationCrystal?copyMask,
     bool deepCopy)
 {
     this.DeepCopyIn(
         item: (ISpellLeveled)item,
         rhs: (ISpellLeveledGetter)rhs,
         errorMask: errorMask,
         copyMask: copyMask,
         deepCopy: deepCopy);
 }
Exemplo n.º 15
0
        public static void DeepCopyIn(
            this ISpellInternal lhs,
            ISpellGetter rhs,
            out Spell.ErrorMask errorMask,
            Spell.TranslationMask?copyMask = null)
        {
            var errorMaskBuilder = new ErrorMaskBuilder();

            ((SpellSetterTranslationCommon)((ISpellGetter)lhs).CommonSetterTranslationInstance() !).DeepCopyIn(
                item: lhs,
                rhs: rhs,
                errorMask: errorMaskBuilder,
                copyMask: copyMask?.GetCrystal(),
                deepCopy: false);
            errorMask = Spell.ErrorMask.Factory(errorMaskBuilder);
        }
 public override int GetHashCode(ISpellGetter item)
 {
     return(GetHashCode(item: (ISpellLeveledGetter)item));
 }