protected override void OnAmountChange(int oldValue) { oldValue = CurrencySystem.ConvertTo(CurrencyType, CurrencyType.Gold, oldValue); int newValue = CurrencySystem.ConvertTo(CurrencyType, CurrencyType.Gold, this.Amount); UpdateTotal(this, TotalType.Gold, newValue - oldValue); }
public override int GetTotal(TotalType type) { int baseTotal = base.GetTotal(type); if (type == TotalType.Gold) { baseTotal += CurrencySystem.ConvertTo(CurrencyType, CurrencyType.Gold, this.Amount); } return(baseTotal); }