Пример #1
0
        public ItemTemplate AddBaseStat(StatisticsTypes type, double Value, double perLevelChange, bool isPercentage)
        {
            var statFactory = new StatisticsFactory();

            if (BaseStats == null)
            {
                BaseStats = new List <Statistics>();
            }

            if (!BaseStats.ContainsType(type))
            {
                if (isPercentage)
                {
                    BaseStats.Add(statFactory.CreateStatPercent(Value, perLevelChange, type));
                }
                else
                {
                    BaseStats.Add(statFactory.CreateStatFlat(Value, perLevelChange, type));
                }
            }

            return(this);
        }