Esempio n. 1
0
 public static KeyValuePair <Attribute, short> MakeAttributeAmountPair(AttributeIncremental source, short level, float rate)
 {
     if (source.attribute == null)
     {
         return(new KeyValuePair <Attribute, short>());
     }
     return(new KeyValuePair <Attribute, short>(source.attribute, (short)(source.amount.GetAmount(level) * rate)));
 }
Esempio n. 2
0
    public static CharacterStats GetStats(this AttributeIncremental attributeIncremental, short level)
    {
        if (attributeIncremental.attribute == null)
        {
            return(new CharacterStats());
        }
        var attribute = attributeIncremental.attribute;

        return(attribute.GetStats(attributeIncremental.amount.GetAmount(level)));
    }