Esempio n. 1
0
 public Stat(XmlStat xmlStat, ItemType itemType, ItemModTier parentTier = null)
 {
     Name = xmlStat.Name;
     // RangeTrees don't like from > to.
     Range = new Range<float>(Math.Min(xmlStat.From, xmlStat.To), Math.Max(xmlStat.From, xmlStat.To));
     ParentTier = parentTier;
     ItemType = itemType;
 }
Esempio n. 2
0
 public Stat(XmlStat xmlStat, ItemType itemType, ItemModTier parentTier = null)
 {
     Name = xmlStat.Name;
     // RangeTrees don't like from > to.
     Range      = new Range <float>(Math.Min(xmlStat.From, xmlStat.To), Math.Max(xmlStat.From, xmlStat.To));
     ParentTier = parentTier;
     ItemType   = itemType;
 }
Esempio n. 3
0
        public Stat(XmlStat xmlStat, ItemType itemType, ItemModTier parentTier = null)
        {
            Name = xmlStat.Name;
            var ranges = new List <Range <float> >();

            for (var i = 0; i < xmlStat.From.Count; i++)
            {
                var from = xmlStat.From[i];
                var to   = xmlStat.To[i];
                // RangeTrees don't like from > to.
                ranges.Add(Range.Create(Math.Min(from, to), Math.Max(from, to)));
            }
            Ranges      = ranges;
            _parentTier = parentTier;
            _itemType   = itemType;
        }
Esempio n. 4
0
        public Stat(XmlStat xmlStat, ItemType itemType, ModGroup modGroup, int level = 0)
        {
            Name = xmlStat.Name;
            var ranges = new List <Range <float> >();

            for (var i = 0; i < xmlStat.From.Count; i++)
            {
                var from = xmlStat.From[i];
                var to   = xmlStat.To[i];
                // RangeTrees don't like from > to.
                ranges.Add(Range.Create(Math.Min(from, to), Math.Max(from, to)));
            }
            Ranges    = ranges;
            _itemType = itemType;
            _modGroup = modGroup;
            _level    = level;
        }