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

@ -201,7 +201,7 @@ namespace Server.Items
World.Broadcast(
0x35,
true,
"{0} solen hives teleporters have been created. The entire process took {1:F1} seconds.",
"{0} solen hives teleporters have been created. The entire process took {1:0.#} seconds.",
count,
(endTime - startTime).TotalSeconds
);

View file

@ -130,7 +130,7 @@ namespace Server.Items
{
list.Add(
1070721,
"#{0}\t{1:0.0}",
"#{0}\t{1:F1}",
AosSkillBonuses.GetLabel(Skill),
SkillValue
); // Skill stored: ~1_skillname~ ~2_skillamount~
@ -461,10 +461,10 @@ namespace Server.Items
AddHtmlLocalized(210, 200, 390, 20, AosSkillBonuses.GetLabel(skill.SkillName), 0x7FFF);
AddHtmlLocalized(10, 220, 390, 20, 1062298, 0x7FFF); // Current Value:
AddLabel(210, 220, 0x481, skill.Base.ToString("0.0"));
AddLabel(210, 220, 0x481, skill.Base.ToString("F1"));
AddHtmlLocalized(10, 240, 390, 20, 1062299, 0x7FFF); // Current Cap:
AddLabel(210, 240, 0x481, skill.Cap.ToString("0.0"));
AddLabel(210, 240, 0x481, skill.Cap.ToString("F1"));
AddHtmlLocalized(10, 260, 390, 20, 1062300, 0x7FFF); // New Value:
AddLabel(210, 260, 0x481, "0.0");
@ -611,13 +611,13 @@ namespace Server.Items
var fromSkill = from.Skills[stone.Skill];
AddHtmlLocalized(10, 220, 390, 20, 1062298, 0x7FFF); // Current Value:
AddLabel(210, 220, 0x481, fromSkill.Base.ToString("0.0"));
AddLabel(210, 220, 0x481, fromSkill.Base.ToString("F1"));
AddHtmlLocalized(10, 240, 390, 20, 1062299, 0x7FFF); // Current Cap:
AddLabel(210, 240, 0x481, fromSkill.Cap.ToString("0.0"));
AddLabel(210, 240, 0x481, fromSkill.Cap.ToString("F1"));
AddHtmlLocalized(10, 260, 390, 20, 1062300, 0x7FFF); // New Value:
AddLabel(210, 260, 0x481, stone.SkillValue.ToString("0.0"));
AddLabel(210, 260, 0x481, stone.SkillValue.ToString("F1"));
AddButton(10, 360, 0xFA5, 0xFA6, 2);
AddHtmlLocalized(

View file

@ -36,15 +36,7 @@ namespace Server.Items
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
if (Value == 1)
{
list.Add(1076759, "{0}\t{1}.0 Skill Points", GetName(), Value);
}
else
{
list.Add(1076759, "{0}\t{1} Skill Points", GetName(), Value);
}
list.Add(1076759, $"{GetName()}\t{Value:0.#} Skill Points");
}
public override bool CanUse(Mobile from)