Пример #1
0
 public BonusFeatureEditModel(BonusFeature f, IEditModel parent, FeatureViewModel fvm) : base(f, parent, fvm)
 {
     if (f.DamageBonusModifier != Ability.None)
     {
         f.DamageBonus         = ResourceFeatureEditModel.convert(f.DamageBonusModifier, f.DamageBonus);
         f.DamageBonusModifier = Ability.None;
     }
 }
 public SpellcastingFeatureEditModel(SpellcastingFeature f, IEditModel parent, FeatureViewModel fvm) : base(f, parent, fvm)
 {
     if (f.PrepareCountAdditionalModifier != Ability.None)
     {
         f.PrepareCount = ResourceFeatureEditModel.convert(f.PrepareCountAdditionalModifier, f.PrepareCount);
         f.PrepareCountAdditionalModifier = Ability.None;
     }
     if (f.PrepareCountPerClassLevel != 0)
     {
         f.PrepareCount = (f.PrepareCount == null || f.PrepareCount.Trim() == "0" || f.PrepareCount.Trim() == "" ? "" : f.PrepareCount + " + ") + "ClassLevel" + (f.PrepareCountPerClassLevel > 1 ? " * " + f.PrepareCountPerClassLevel : "");
         f.PrepareCountPerClassLevel = 0;
     }
     if (f.PrepareCountAdditional != 0)
     {
         f.PrepareCount           = (f.PrepareCount == null || f.PrepareCount.Trim() == "0" || f.PrepareCount.Trim() == "" ? "" : f.PrepareCount + " + ") + f.PrepareCountAdditional;
         f.PrepareCountAdditional = 0;
     }
 }