public Item() { ID = suds.NextItemID++; Rarity = ItemRarity.Trash; Type = new ItemType(); SpecialProps = new List<SpecialProp>(); CombatMods = new CombatModifiers(); }
public Skill() { Modifiers = new CombatModifiers(); Timer = TimerMax = 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; }