Пример #1
0
 public Item()
 {
     ID = suds.NextItemID++;
     Rarity = ItemRarity.Trash;
     Type = new ItemType();
     SpecialProps = new List<SpecialProp>();
     CombatMods = new CombatModifiers();
 }
Пример #2
0
 public Skill()
 {
     Modifiers = new CombatModifiers();
     Timer = TimerMax = 0;
 }
Пример #3
0
 public CombatModifiers Add(CombatModifiers other)
 {
     var ret = new CombatModifiers();
     foreach (var prop in this.GetType().GetProperties())
     {
         if (prop.PropertyType.Name.Equals("Int32"))
         {
             var val = (int)prop.GetValue(this, null);
             var oVal = (int)prop.GetValue(other, null);
             prop.SetValue(ret, val + oVal);
         }
         else if (prop.PropertyType.Name.Equals("Decimal"))
         {
             var val = (decimal)prop.GetValue(this, null);
             var oVal = (decimal)prop.GetValue(other, null);
             prop.SetValue(ret, val + oVal);
         }
     }
     return ret;
 }