fix(core): Fixes displaying some doubles (#585)

This commit is contained in:
Kamron Batman 2021-04-25 14:04:44 -07:00 • committed by GitHub
parent a0893b68c0
commit 13717ab2d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 25 deletions

View file

@ -886,7 +886,7 @@ namespace Server.Engines.CannedEvil
list.Add(
1060660, // ~1_val~: ~2_val~
"Kills\t{0} of {1} ({2:F1}%)",
"Kills\t{0} of {1} ({2:0.#}%)",
m_Kills,
MaxKills,
100.0 * ((double)m_Kills / MaxKills)

View file

@ -71,11 +71,7 @@ namespace Server.Engines.MLQuests.Objectives
public override void WriteToGump(Gump g, ref int y)
{
var skillLabel = AosSkillBonuses.GetLabel(Skill);
string args;
args = ThresholdFixed % 10 == 0
? $"#{skillLabel}\t{ThresholdFixed / 10}"
: $"#{skillLabel}\t{(double)ThresholdFixed / 10:0.0}";
var args = $"#{skillLabel}\t{ThresholdFixed / 10.0:0.#}";
g.AddHtmlLocalized(98, y, 312, 16, 1077485, args, 0x15F90); // Increase ~1_SKILL~ to ~2_VALUE~
y += 16;