fix: Fixes issue with cached static gump strings. Fixes bad gump colors (#1771)
### Summary - Fixes an issue that causes CUO to crash due to bad string caching in static gumps - Fixes wrong/bad 16bit html gump hues. - Moves `C16232` (16-bit to 32-bit) and `C32216` (32-bit to 16-bit) to Utility class for broader use. TODO: - Some gumps have different 32bit (for string content) vs 16bit (for localized content) strings. Does this matter?
This commit is contained in:
parent
a001eb03da
commit
622250b8f4
27 changed files with 129 additions and 155 deletions
|
|
@ -56,7 +56,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
public static void WriteTimeRemaining(Gump g, ref int y, TimeSpan timeRemaining)
|
||||
{
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1062379, 0x15F90); // Est. time remaining:
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1062379, 0x5F90); // Est. time remaining:
|
||||
g.AddLabel(223, y, 0x481, timeRemaining.TotalSeconds.ToString("F0"));
|
||||
y += 16;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
var amount = DesiredAmount.ToString();
|
||||
|
||||
g.AddHtmlLocalized(98, y, 350, 16, 1072205, 0x15F90); // Obtain
|
||||
g.AddHtmlLocalized(98, y, 350, 16, 1072205, 0x5F90); // Obtain
|
||||
g.AddLabel(143, y, 0x481, amount);
|
||||
|
||||
if (Name.Number > 0)
|
||||
|
|
@ -67,7 +67,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
if (Name.Number > 0)
|
||||
{
|
||||
g.AddHtmlLocalized(98, y, 312, 32, Name.Number, 0x15F90);
|
||||
g.AddHtmlLocalized(98, y, 312, 32, Name.Number, 0x5F90);
|
||||
}
|
||||
else if (Name.String != null)
|
||||
{
|
||||
|
|
@ -207,11 +207,11 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
base.WriteToGump(g, ref y);
|
||||
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 3000087, 0x15F90); // Total
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 3000087, 0x5F90); // Total
|
||||
g.AddLabel(223, y, 0x481, GetCurrentTotal().ToString());
|
||||
y += 16;
|
||||
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1074782, 0x15F90); // Return to
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1074782, 0x5F90); // Return to
|
||||
g.AddLabel(223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor(Instance.QuesterType));
|
||||
y += 16;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
var amount = Amount.ToString();
|
||||
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072207, 0x15F90); // Deliver
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072207, 0x5F90); // Deliver
|
||||
g.AddLabel(143, y, 0x481, amount);
|
||||
|
||||
if (Name.Number > 0)
|
||||
|
|
@ -89,7 +89,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
y += 32;
|
||||
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1072379, 0x15F90); // Deliver to
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1072379, 0x5F90); // Deliver to
|
||||
g.AddLabel(223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor(Destination));
|
||||
|
||||
y += 16;
|
||||
|
|
|
|||
|
|
@ -65,11 +65,11 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
public override void WriteToGump(Gump g, ref int y)
|
||||
{
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072206, 0x15F90); // Escort to
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072206, 0x5F90); // Escort to
|
||||
|
||||
if (Destination.Name.Number > 0)
|
||||
{
|
||||
g.AddHtmlLocalized(173, y, 312, 20, Destination.Name.Number, 0xFFFFFF);
|
||||
g.AddHtmlLocalized(173, y, 312, 20, Destination.Name.Number, 0x7FFF);
|
||||
}
|
||||
else if (Destination.Name.String != null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
var skillLabel = AosSkillBonuses.GetLabel(Skill);
|
||||
var args = $"#{skillLabel}\t{ThresholdFixed / 10.0:0.#}";
|
||||
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1077485, args, 0x15F90); // Increase ~1_SKILL~ to ~2_VALUE~
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1077485, args, 0x5F90); // Increase ~1_SKILL~ to ~2_VALUE~
|
||||
y += 16;
|
||||
}
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
if (IsCompleted())
|
||||
{
|
||||
g.AddHtmlLocalized(113, y, 312, 20, 1055121, 0xFFFFFF); // Complete
|
||||
g.AddHtmlLocalized(113, y, 312, 20, 1055121, 0x7FFF); // Complete
|
||||
y += 16;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
var amount = DesiredAmount.ToString();
|
||||
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072204, 0x15F90); // Slay
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072204, 0x5F90); // Slay
|
||||
g.AddLabel(133, y, 0x481, amount);
|
||||
|
||||
if (Name.Number > 0)
|
||||
|
|
@ -43,11 +43,11 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
if (Area != null)
|
||||
{
|
||||
g.AddHtmlLocalized(103, y, 312, 20, 1018327, 0x15F90); // Location
|
||||
g.AddHtmlLocalized(103, y, 312, 20, 1018327, 0x5F90); // Location
|
||||
|
||||
if (Area.Name.Number > 0)
|
||||
{
|
||||
g.AddHtmlLocalized(223, y, 312, 20, Area.Name.Number, 0xFFFFFF);
|
||||
g.AddHtmlLocalized(223, y, 312, 20, Area.Name.Number, 0x7FFF);
|
||||
}
|
||||
else if (Area.Name.String != null)
|
||||
{
|
||||
|
|
@ -127,11 +127,11 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
base.WriteToGump(g, ref y);
|
||||
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 3000087, 0x15F90); // Total
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 3000087, 0x5F90); // Total
|
||||
g.AddLabel(223, y, 0x481, Slain.ToString());
|
||||
y += 16;
|
||||
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1074782, 0x15F90); // Return to
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1074782, 0x5F90); // Return to
|
||||
g.AddLabel(223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor(Instance.QuesterType));
|
||||
y += 16;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue