Exemplo n.º 1
0
 public static KeyValuePair <Attribute, short> MakeAttributeAmountPair(AttributeAmount source, float rate)
 {
     if (source.attribute == null)
     {
         return(new KeyValuePair <Attribute, short>());
     }
     return(new KeyValuePair <Attribute, short>(source.attribute, (short)(source.amount * rate)));
 }
        public static CharacterStats GetStats(this AttributeAmount attributeAmount)
        {
            if (attributeAmount.attribute == null)
            {
                return(new CharacterStats());
            }
            Attribute attribute = attributeAmount.attribute;

            return(attribute.GetStats(attributeAmount.amount));
        }