Ejemplo n.º 1
0
 /// <summary>
 /// Gets a string representation with the provided format. The following parameters are accepted :
 /// <list type="bullet">
 /// <item>%n for name (lower case)</item>
 /// <item>%N for name (CamelCase)</item>
 /// <item>%B for attribute base value</item>
 /// <item>%b for base bonus</item>
 /// <item>%i for implant bonus</item>
 /// <item>%r for remapping points</item>
 /// <item>%e for effective value</item>
 /// </list>
 /// </summary>
 /// <returns>The formatted string.</returns>
 public string ToString(string format)
 {
     format = format.Replace("%n", m_attrib.ToString().ToLower(CultureConstants.DefaultCulture));
     format = format.Replace("%N", m_attrib.ToString());
     format = format.Replace("%B", EveConstants.CharacterBaseAttributePoints.ToString());
     format = format.Replace("%b", m_base.ToString());
     format = format.Replace("%i", ImplantBonus.ToString());
     format = format.Replace("%r", (m_base - EveConstants.CharacterBaseAttributePoints).ToString());
     format = format.Replace("%e", EffectiveValue.ToString("0"));
     return(format);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets a string representation with the provided format. The following parameters are accepted :
 /// <list type="bullet">
 /// <item>%n for name (lower case)</item>
 /// <item>%N for name (CamelCase)</item>
 /// <item>%b for base value</item>
 /// <item>%i for implant bonus</item>
 /// <item>%s for skills bonus</item>
 /// <item>%s1 for lower skill bonus</item>
 /// <item>%s2 for upper skill bonus</item>
 /// <item>%f for learning factor</item>
 /// <item>%e for effective value</item>
 /// </list>
 /// </summary>
 /// <returns>The formatted string.</returns>
 public string ToString(string format)
 {
     format = format.Replace("%n", m_attrib.ToString().ToLower());
     format = format.Replace("%N", m_attrib.ToString());
     format = format.Replace("%b", m_base.ToString());
     format = format.Replace("%i", ImplantBonus.ToString());
     format = format.Replace("%s", SkillsBonus.ToString());
     format = format.Replace("%s1", LowerSkillBonus.ToString());
     format = format.Replace("%s2", UpperSkillBonus.ToString());
     format = format.Replace("%f", m_character.LearningFactor.ToString("0.00"));
     format = format.Replace("%e", EffectiveValue.ToString("0.00"));
     return(format);
 }