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))); }
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))); }