ModernUO/Projects/UOContent/Engines/ML Quests/Rewards/BaseReward.cs
Kamron Batman 622250b8f4
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?
2024-05-10 22:44:16 -07:00

22 lines
586 B
C#

using System.Collections.Generic;
using Server.Gumps;
using Server.Mobiles;
namespace Server.Engines.MLQuests.Rewards
{
public abstract class BaseReward
{
public BaseReward(TextDefinition name) => Name = name;
public TextDefinition Name { get; set; }
protected virtual int LabelHeight => 16;
public void WriteToGump(Gump g, int x, ref int y)
{
Name.AddHtmlText(g, x, y, 280, LabelHeight, false, false, 0x5F90, 0xBDE784);
}
public abstract void AddRewardItems(PlayerMobile pm, List<Item> rewards);
}
}