Beispiel #1
0
 public static SpecialStat Of(SpecialItemAttribute type, float percent, float flat)
 {
     return(new SpecialStat
     {
         Id = type,
         Percent = percent,
         Flat = flat,
     });
 }
        private static List <ParserSpecialStat> ParseSpecialValues(SpecialItemAttribute attribute, XmlNode node, bool isPercent)
        {
            List <ParserSpecialStat> values = new List <ParserSpecialStat>();

            for (int i = 2; i <= 17; i++)
            {
                float value = float.Parse(node.Attributes[$"idx{i}"].Value);
                values.Add(new ParserSpecialStat(attribute, isPercent ? value : 0, !isPercent ? value : 0));
            }
            return(values);
        }
Beispiel #3
0
 public SpecialStat(ParserSpecialStat stat)
 {
     ItemAttribute = stat.Id;
     Flat          = stat.Flat;
     Percent       = stat.Percent;
 }
Beispiel #4
0
 public SpecialStat(SpecialItemAttribute attribute, float flat, float percent)
 {
     ItemAttribute = attribute;
     Flat          = flat;
     Percent       = percent;
 }
 public ParserSpecialStat(SpecialItemAttribute id, float percent, float flat)
 {
     Id      = id;
     Percent = percent;
     Flat    = flat;
 }