perf: Migrate Item Interaction gumps to DynamicGump/StaticGump (#2421)

## Summary

Migrates 11 player-facing Item Interaction gumps from legacy `Gump` to `StaticGump<T>` or `DynamicGump`.

| File | Gump | Base | Reason |
|---|---|---|---|
| `Items/Deeds/NameChangeDeed.cs` | `NameChangeDeedGump` | `StaticGump<T>` | Fully fixed layout |
| `Items/Deeds/HairRestylingDeed.cs` | `HairRestylingDeedGump` (renamed from `InternalGump`) | `DynamicGump` | Per-race/per-gender cliloc IDs and gump images vary every instance |
| `Items/Deeds/HolidayTreeDeed.cs` | `HolidayTreeChoiceGump` | `StaticGump<T>` | Fully fixed (Classic/Modern radio) |
| `Items/Deeds/NewPlayerTicket.cs` | `NewPlayerTicketGump` (renamed from `InternalGump`) | `StaticGump<T>` | Fully fixed gift menu |
| `Items/Misc/PromotionalToken.cs` | `PromotionalTokenGump` | `DynamicGump` | `TextDefinition` (`ItemGumpName`) varies per token subclass — cliloc/string differs |
| `Items/Misc/SpecialHairDye.cs` | `SpecialHairDyeGump` | `StaticGump<T>` | Static entry array drives a fixed layout |
| `Items/Misc/InteriorDecorator.cs` | `InteriorDecoratorGump` (renamed from `InternalGump`) | `DynamicGump` | Button art flips per `decorator.Command` (Turn/Up/Down) |
| `Items/Special/8th Anniversary Items/Dawn's Music Box/DawnsMusicBoxGump.cs` | `DawnsMusicBoxGump` | `DynamicGump` | Page count derived from variable `Tracks.Count` |
| `Items/Misc/PowerGenerator.cs` | `PowerGeneratorGump` (renamed from `GameGump`) | `DynamicGump` | Variable side length 3-6 and per-step node hues |
| `Gumps/HeritageTokenGump.cs` | `HeritageTokenGump` | `StaticGump<T>` | All 7 pages fully baked — only static cliloc IDs |
| `Gumps/ConfirmHeritageGump.cs` | `ConfirmHeritageGump` | `DynamicGump` | Confirmation cliloc chosen at runtime per item selected |

All gumps use `Singleton => true`, private constructors, and a static `DisplayTo` entry point that validates prerequisites before constructing.

External callers updated (`HeritageToken`, `DawnsMusicBox`) to the new `DisplayTo` entry points. `Console.WriteLine` in `ConfirmHeritageGump` exception handler replaced with `LogFactory`-backed logger.
This commit is contained in:
Kamron Batman 2026-04-26 11:31:49 -07:00 committed by GitHub
parent 15e506ffc2
commit 598c3c125c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 709 additions and 1009 deletions

View file

@ -1,37 +1,55 @@
using System;
using Server.Items;
using Server.Logging;
using Server.Network;
namespace Server.Gumps
{
public class ConfirmHeritageGump : Gump
public class ConfirmHeritageGump : DynamicGump
{
private readonly Type[] m_Selected;
private readonly HeritageToken m_Token;
private static readonly ILogger _logger = LogFactory.GetLogger(typeof(ConfirmHeritageGump));
private readonly Type[] _selected;
private readonly HeritageToken _token;
private readonly int _cliloc;
public override bool Singleton => true;
public ConfirmHeritageGump(HeritageToken token, Type[] selected, int cliloc) : base(60, 36)
private ConfirmHeritageGump(HeritageToken token, Type[] selected, int cliloc) : base(60, 36)
{
m_Token = token;
m_Selected = selected;
_token = token;
_selected = selected;
_cliloc = cliloc;
}
AddPage(0);
public static void DisplayTo(Mobile from, HeritageToken token, Type[] selected, int cliloc)
{
if (from?.NetState == null || token?.Deleted != false || selected == null || selected.Length == 0)
{
return;
}
AddBackground(0, 0, 291, 99, 0x13BE);
AddImageTiled(5, 6, 280, 20, 0xA40);
AddHtmlLocalized(9, 8, 280, 20, 1070972, 0x7FFF); // Click "OKAY" to redeem the following promotional item:
AddImageTiled(5, 31, 280, 40, 0xA40);
AddHtmlLocalized(9, 35, 272, 40, cliloc, 0x7FFF);
AddButton(180, 73, 0xFB7, 0xFB8, (int)Buttons.Okay);
AddHtmlLocalized(215, 75, 100, 20, 1011036, 0x7FFF); // OKAY
AddButton(5, 73, 0xFB1, 0xFB2, (int)Buttons.Cancel);
AddHtmlLocalized(40, 75, 100, 20, 1060051, 0x7FFF); // CANCEL
from.SendGump(new ConfirmHeritageGump(token, selected, cliloc));
}
protected override void BuildLayout(ref DynamicGumpBuilder builder)
{
builder.AddPage();
builder.AddBackground(0, 0, 291, 99, 0x13BE);
builder.AddImageTiled(5, 6, 280, 20, 0xA40);
builder.AddHtmlLocalized(9, 8, 280, 20, 1070972, 0x7FFF); // Click "OKAY" to redeem the following promotional item:
builder.AddImageTiled(5, 31, 280, 40, 0xA40);
builder.AddHtmlLocalized(9, 35, 272, 40, _cliloc, 0x7FFF);
builder.AddButton(180, 73, 0xFB7, 0xFB8, (int)Buttons.Okay);
builder.AddHtmlLocalized(215, 75, 100, 20, 1011036, 0x7FFF); // OKAY
builder.AddButton(5, 73, 0xFB1, 0xFB2, (int)Buttons.Cancel);
builder.AddHtmlLocalized(40, 75, 100, 20, 1060051, 0x7FFF); // CANCEL
}
public override void OnResponse(NetState sender, in RelayInfo info)
{
if (m_Token?.Deleted != false)
if (_token?.Deleted != false)
{
return;
}
@ -42,7 +60,7 @@ namespace Server.Gumps
{
Item item = null;
foreach (var type in m_Selected)
foreach (var type in _selected)
{
try
{
@ -50,13 +68,12 @@ namespace Server.Gumps
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
Console.WriteLine(ex.StackTrace);
_logger.Error(ex, "Failed to create heritage item of type {Type}", type);
}
if (item != null)
{
m_Token.Delete();
_token.Delete();
sender.Mobile.AddToBackpack(item);
}
}
@ -66,7 +83,7 @@ namespace Server.Gumps
case (int)Buttons.Cancel:
{
sender.Mobile.SendGump(new HeritageTokenGump(m_Token));
HeritageTokenGump.DisplayTo(sender.Mobile, _token);
break;
}
}

View file

@ -1,717 +1,226 @@
using System;
using System.Collections.Generic;
using Server.Items;
using Server.Network;
namespace Server.Gumps
namespace Server.Gumps;
public class HeritageTokenGump : StaticGump<HeritageTokenGump>
{
public class HeritageTokenGump : Gump
private static readonly Dictionary<int, (Type[] Types, int CliLoc, int Tooltip, int ItemID, int Hue, int Width, int Height)> ButtonLookup = new()
{
private readonly HeritageToken m_Token;
// 7th anniversary
{ 0x64, ([typeof(LeggingsOfEmbers)], 1078147, 1062912, 0x1411, 0x2C, 18, 8) },
{ 0x65, ([typeof(RoseOfTrinsic)], 1062913, 1062914, 0x234D, 0x0, 18, 12) },
{ 0x66, ([typeof(ShaminoCrossbow)], 1062915, 1062916, 0x26C3, 0x504, 18, 8) },
{ 0x67, ([typeof(TapestryOfSosaria)], 1062917, 1062918, 0x3F1D, 0x0, 18, 8) },
{ 0x68, ([typeof(HearthOfHomeFireDeed)], 1062919, 1062920, 0x3F14, 0x0, 18, 8) },
{ 0x69, ([typeof(HolySword)], 1062921, 1062922, 0xF60, 0x482, -1, 10) },
{ 0x6A, ([typeof(SamuraiHelm)], 1062923, 1062924, 0x236C, 0x0, 18, 6) },
public HeritageTokenGump(HeritageToken token) : base(60, 36)
// 8th anniversary
{ 0x6B, ([typeof(SpiritualityHelm)], 1075188, 1075223, 0x2B10, 0x226, 18, 11) },
{ 0x6C, ([typeof(ValorGauntlets)], 1075192, 1075224, 0x2B0C, 0x226, 18, 15) },
{ 0x6D, ([typeof(DupresShield)], 1075196, 1075225, 0x2B01, 0x0, 18, 9) },
{ 0x6E, ([typeof(FountainOfLifeDeed)], 1075197, 1075226, 0x2AC6, 0x0, 29, 0) },
{ 0x6F, ([typeof(DawnsMusicBox)], 1075198, 1075227, 0x2AF9, 0x0, -4, -5) },
{ 0x70, ([typeof(OssianGrimoire)], 1078148, 1075228, 0x2253, 0x0, 18, 12) },
{ 0x71, ([typeof(FerretFormTalisman)], 1078142, 1078527, 0x2D98, 0x0, 19, 13) },
{ 0x72, ([typeof(SquirrelFormTalisman)], 1078143, 1078528, 0x2D97, 0x0, 19, 13) },
{ 0x73, ([typeof(CuSidheFormTalisman)], 1078144, 1078529, 0x2D96, 0x0, 19, 8) },
{ 0x74, ([typeof(ReptalonFormTalisman)], 1078145, 1078530, 0x2D95, 0x0, -4, 2) },
{ 0x75, ([typeof(QuiverOfInfinity)], 1075201, 1078526, 0x2B02, 0x0, -2, 9) },
// evil home decor
{ 0x76, (
[typeof(BoneThroneDeed), typeof(BoneCouchDeed), typeof(BoneTableDeed)],
1074797, 1075986, 0x2A91, 0x0, 25, 5
) },
{ 0x77, (
[typeof(CreepyPortraitDeed), typeof(DisturbingPortraitDeed), typeof(UnsettlingPortraitDeed)],
1078146, 1075987, 0x2A99, 0x0, 18, 1
) },
{ 0x78, (
[
typeof(MountedPixieBlueDeed), typeof(MountedPixieGreenDeed), typeof(MountedPixieLimeDeed),
typeof(MountedPixieOrangeDeed), typeof(MountedPixieWhiteDeed)
],
1074799, 1075988, 0x2A71, 0x0, 13, 5
) },
{ 0x79, ([typeof(HaunterMirrorDeed)], 1074800, 1075990, 0x2A98, 0x0, 26, 1) },
{ 0x7A, ([typeof(BedOfNailsDeed)], 1074801, 1075989, 0x2A92, 0x0, 18, 1) },
{ 0x7B, ([typeof(SacrificialAltarDeed)], 1074818, 1075991, 0x2AB8, 0x0, 18, 1) },
// broken furniture
{ 0x7C, ([typeof(BrokenCoveredChairDeed)], 1076257, 1076610, 0x3F26, 0x0, 18, 8) },
{ 0x7D, ([typeof(BrokenBookcaseDeed)], 1076258, 1076610, 0x3F22, 0x0, 18, 8) },
{ 0x7E, ([typeof(StandingBrokenChairDeed)], 1076259, 1076610, 0x3F24, 0x0, 18, 8) },
{ 0x7F, ([typeof(BrokenVanityDeed)], 1076260, 1076610, 0x3F25, 0x0, 18, 8) },
{ 0x80, ([typeof(BrokenChestOfDrawersDeed)], 1076261, 1076610, 0x3F23, 0x0, 18, 8) },
{ 0x81, ([typeof(BrokenArmoireDeed)], 1076262, 1076610, 0x3F21, 0x0, 18, 8) },
{ 0x82, ([typeof(BrokenBedDeed)], 1076263, 1076610, 0x3F0B, 0x0, 18, 8) },
{ 0x83, ([typeof(BrokenFallenChairDeed)], 1076264, 1076610, 0xC19, 0x0, 13, 8) },
// other
{ 0x84, ([typeof(SuitOfGoldArmorDeed)], 1076265, 1076611, 0x3DAA, 0x0, 20, -3) },
{ 0x85, ([typeof(SuitOfSilverArmorDeed)], 1076266, 1076612, 0x151C, 0x0, -20, -3) },
{ 0x86, ([typeof(BoilingCauldronDeed)], 1076267, 1076613, 0x3DB1, 0x0, 18, 8) },
{ 0x87, ([typeof(GuillotineDeed)], 1024656, 1076614, 0x3F27, 0x0, 18, 8) },
{ 0x88, ([typeof(CherryBlossomTreeDeed)], 1076268, 1076615, 0x3F0C, 0x0, 18, 8) },
{ 0x89, ([typeof(AppleTreeDeed)], 1076269, 1076616, 0x3F07, 0x0, 18, 8) },
{ 0x8A, ([typeof(PeachTreeDeed)], 1076270, 1076617, 0x3F16, 0x0, 18, 8) },
{ 0x8B, ([typeof(HangingAxesDeed)], 1076271, 1076618, 0x3F12, 0x0, 18, 8) },
{ 0x8C, ([typeof(HangingSwordsDeed)], 1076272, 1076619, 0x3F13, 0x0, 18, 8) },
{ 0x8D, ([typeof(BlueFancyRugDeed)], 1076273, 1076620, 0x3F09, 0x0, 18, 8) },
{ 0x8E, ([typeof(WoodenCoffinDeed)], 1076274, 1076621, 0x3F0E, 0x0, 18, 8) },
{ 0x8F, ([typeof(VanityDeed)], 1074027, 1076623, 0x3F1F, 0x0, 18, 8) },
{ 0x90, ([typeof(TableWithPurpleClothDeed)], 1076635, 1076624, 0x118B, 0x0, -4, -9) },
{ 0x91, ([typeof(TableWithBlueClothDeed)], 1076636, 1076624, 0x118C, 0x0, -4, -9) },
{ 0x92, ([typeof(TableWithRedClothDeed)], 1076637, 1076624, 0x118D, 0x0, -4, -9) },
{ 0x93, ([typeof(TableWithOrangeClothDeed)], 1076638, 1076624, 0x118E, 0x0, -4, -9) },
{ 0x94, ([typeof(UnmadeBedDeed)], 1076279, 1076625, 0x3F1E, 0x0, 18, 8) },
{ 0x95, ([typeof(CurtainsDeed)], 1076280, 1076626, 0x3F0F, 0x0, 18, 8) },
{ 0x96, ([typeof(ScarecrowDeed)], 1076281, 1076627, 0x1E34, 0x0, 18, -17) },
{ 0x97, ([typeof(WallTorchDeed)], 1076282, 1076628, 0xA0C, 0x0, 18, 8) },
{ 0x98, ([typeof(FountainDeed)], 1076283, 1076629, 0x3F10, 0x0, 18, 9) },
{ 0x99, ([typeof(StoneStatueDeed)], 1076284, 1076630, 0x3F19, 0x0, 18, 8) },
{ 0x9A, ([typeof(LargeFishingNetDeed)], 1076285, 1076631, 0x1EA5, 0x0, 5, -25) },
{ 0x9B, ([typeof(SmallFishingNetDeed)], 1076286, 1076632, 0x1EA3, 0x0, 18, -27) },
{ 0x9C, ([typeof(HouseLadderDeed)], 1076287, 1076633, 0x2FDF, 0x0, 18, -36) },
{ 0x9D, ([typeof(IronMaidenDeed)], 1076288, 1076622, 0x3F15, 0x0, 18, 8) },
{ 0x9E, ([typeof(BluePlainRugDeed)], 1076585, 1076620, 0x3F0A, 0x0, 18, 8) },
{ 0x9F, ([typeof(GoldenDecorativeRugDeed)], 1076586, 1076620, 0x3F11, 0x0, 18, 8) },
{ 0xA0, ([typeof(CinnamonFancyRugDeed)], 1076587, 1076620, 0x3F0D, 0x0, 18, 8) },
{ 0xA1, ([typeof(RedPlainRugDeed)], 1076588, 1076620, 0x3F18, 0x0, 18, 8) },
{ 0xA2, ([typeof(BlueDecorativeRugDeed)], 1076589, 1076620, 0x3F08, 0x0, 18, 8) },
{ 0xA3, ([typeof(PinkFancyRugDeed)], 1076590, 1076620, 0x3F17, 0x0, 18, 8) },
{ 0xA4, ([typeof(CherryBlossomTrunkDeed)], 1076784, 1076615, 0x312A, 0x0, 18, 8) },
{ 0xA5, ([typeof(AppleTrunkDeed)], 1076785, 1076616, 0x3128, 0x0, 18, 8) },
{ 0xA6, ([typeof(PeachTrunkDeed)], 1076786, 1076617, 0x3129, 0x0, 18, 8) }
};
private readonly HeritageToken _token;
public override bool Singleton => true;
private HeritageTokenGump(HeritageToken token) : base(60, 36) => _token = token;
public static void DisplayTo(Mobile from, HeritageToken token)
{
if (from?.NetState == null || token?.Deleted != false)
{
m_Token = token;
AddPage(0);
AddBackground(0, 0, 520, 404, 0x13BE);
AddImageTiled(10, 10, 500, 20, 0xA40);
AddImageTiled(10, 40, 500, 324, 0xA40);
AddImageTiled(10, 374, 500, 20, 0xA40);
AddAlphaRegion(10, 10, 500, 384);
AddButton(10, 374, 0xFB1, 0xFB2, 0);
AddHtmlLocalized(45, 376, 450, 20, 1060051, 0x7FFF); // CANCEL
AddHtmlLocalized(14, 12, 500, 20, 1075576, 0x7FFF); // Choose your item from the following pages
AddPage(1);
AddImageTiledButton(14, 44, 0x918, 0x919, 0x64, GumpButtonType.Reply, 0, 0x1411, 0x2C, 18, 8);
AddTooltip(1062912);
AddHtmlLocalized(98, 44, 250, 60, 1078147, 0x7FFF); // Royal Leggings of Embers
AddImageTiledButton(264, 44, 0x918, 0x919, 0x65, GumpButtonType.Reply, 0, 0x234D, 0x0, 18, 12);
AddTooltip(1062914);
AddHtmlLocalized(348, 44, 250, 60, 1062913, 0x7FFF); // Rose of Trinsic
AddImageTiledButton(14, 108, 0x918, 0x919, 0x66, GumpButtonType.Reply, 0, 0x26C3, 0x504, 18, 8);
AddTooltip(1062916);
AddHtmlLocalized(98, 108, 250, 60, 1062915, 0x7FFF); // Shaminos Best Crossbow
AddImageTiledButton(264, 108, 0x918, 0x919, 0x67, GumpButtonType.Reply, 0, 0x3F1D, 0x0, 18, 8);
AddTooltip(1062918);
AddHtmlLocalized(348, 108, 250, 60, 1062917, 0x7FFF); // The Tapestry of Sosaria
AddImageTiledButton(14, 172, 0x918, 0x919, 0x68, GumpButtonType.Reply, 0, 0x3F14, 0x0, 18, 8);
AddTooltip(1062920);
AddHtmlLocalized(98, 172, 250, 60, 1062919, 0x7FFF); // Hearth of the Home Fire
AddImageTiledButton(264, 172, 0x918, 0x919, 0x69, GumpButtonType.Reply, 0, 0xF60, 0x482, -1, 10);
AddTooltip(1062922);
AddHtmlLocalized(348, 172, 250, 60, 1062921, 0x7FFF); // The Holy Sword
AddImageTiledButton(14, 236, 0x918, 0x919, 0x6A, GumpButtonType.Reply, 0, 0x236C, 0x0, 18, 6);
AddTooltip(1062924);
AddHtmlLocalized(98, 236, 250, 60, 1062923, 0x7FFF); // Ancient Samurai Helm
AddImageTiledButton(264, 236, 0x918, 0x919, 0x6B, GumpButtonType.Reply, 0, 0x2B10, 0x226, 18, 11);
AddTooltip(1075223);
AddHtmlLocalized(348, 236, 250, 60, 1075188, 0x7FFF); // Helm of Spirituality
AddImageTiledButton(14, 300, 0x918, 0x919, 0x6C, GumpButtonType.Reply, 0, 0x2B0C, 0x226, 18, 15);
AddTooltip(1075224);
AddHtmlLocalized(98, 300, 250, 60, 1075192, 0x7FFF); // Gauntlets of Valor
AddImageTiledButton(264, 300, 0x918, 0x919, 0x6D, GumpButtonType.Reply, 0, 0x2B01, 0x0, 18, 9);
AddTooltip(1075225);
AddHtmlLocalized(348, 300, 250, 60, 1075196, 0x7FFF); // Dupres Shield
AddButton(400, 374, 0xFA5, 0xFA7, 0, GumpButtonType.Page, 2);
AddHtmlLocalized(440, 376, 60, 20, 1043353, 0x7FFF); // Next
AddPage(2);
AddButton(300, 374, 0xFAE, 0xFB0, 0, GumpButtonType.Page, 1);
AddHtmlLocalized(340, 376, 60, 20, 1011393, 0x7FFF); // Back
AddImageTiledButton(14, 44, 0x918, 0x919, 0x6E, GumpButtonType.Reply, 0, 0x2AC6, 0x0, 29, 0);
AddTooltip(1075226);
AddHtmlLocalized(98, 44, 250, 60, 1075197, 0x7FFF); // Fountain of Life
AddImageTiledButton(264, 44, 0x918, 0x919, 0x6F, GumpButtonType.Reply, 0, 0x2AF9, 0x0, -4, -5);
AddTooltip(1075227);
AddHtmlLocalized(348, 44, 250, 60, 1075198, 0x7FFF); // Dawns Music Box
AddImageTiledButton(14, 108, 0x918, 0x919, 0x70, GumpButtonType.Reply, 0, 0x2253, 0x0, 18, 12);
AddTooltip(1075228);
AddHtmlLocalized(98, 108, 250, 60, 1078148, 0x7FFF); // Ossian Grimoire
AddImageTiledButton(264, 108, 0x918, 0x919, 0x71, GumpButtonType.Reply, 0, 0x2D98, 0x0, 19, 13);
AddTooltip(1078527);
AddHtmlLocalized(348, 108, 250, 60, 1078142, 0x7FFF); // Talisman of the Fey:<br>Ferret
AddImageTiledButton(14, 172, 0x918, 0x919, 0x72, GumpButtonType.Reply, 0, 0x2D97, 0x0, 19, 13);
AddTooltip(1078528);
AddHtmlLocalized(98, 172, 250, 60, 1078143, 0x7FFF); // Talisman of the Fey:<br>Squirrel
AddImageTiledButton(264, 172, 0x918, 0x919, 0x73, GumpButtonType.Reply, 0, 0x2D96, 0x0, 19, 8);
AddTooltip(1078529);
AddHtmlLocalized(348, 172, 250, 60, 1078144, 0x7FFF); // Talisman of the Fey:<br>Cu Sidhe
AddImageTiledButton(14, 236, 0x918, 0x919, 0x74, GumpButtonType.Reply, 0, 0x2D95, 0x0, -4, 2);
AddTooltip(1078530);
AddHtmlLocalized(98, 236, 250, 60, 1078145, 0x7FFF); // Talisman of the Fey:<br>Reptalon
AddImageTiledButton(264, 236, 0x918, 0x919, 0x75, GumpButtonType.Reply, 0, 0x2B02, 0x0, -2, 9);
AddTooltip(1078526);
AddHtmlLocalized(348, 236, 250, 60, 1075201, 0x7FFF); // Quiver of Infinity
AddImageTiledButton(14, 300, 0x918, 0x919, 0x76, GumpButtonType.Reply, 0, 0x2A91, 0x0, 25, 5);
AddTooltip(1075986);
AddHtmlLocalized(98, 300, 250, 60, 1074797, 0x7FFF); // Bone Throne, Bone Couch<br>and Bone Table
AddImageTiledButton(264, 300, 0x918, 0x919, 0x77, GumpButtonType.Reply, 0, 0x2A99, 0x0, 18, 1);
AddTooltip(1075987);
AddHtmlLocalized(348, 300, 250, 60, 1078146, 0x7FFF); // Creepy Portraits
AddButton(400, 374, 0xFA5, 0xFA7, 0, GumpButtonType.Page, 3);
AddHtmlLocalized(440, 376, 60, 20, 1043353, 0x7FFF); // Next
AddPage(3);
AddButton(300, 374, 0xFAE, 0xFB0, 0, GumpButtonType.Page, 2);
AddHtmlLocalized(340, 376, 60, 20, 1011393, 0x7FFF); // Back
AddImageTiledButton(14, 44, 0x918, 0x919, 0x78, GumpButtonType.Reply, 0, 0x2A71, 0x0, 13, 5);
AddTooltip(1075988);
AddHtmlLocalized(98, 44, 250, 60, 1074799, 0x7FFF); // Mounted Pixies (5)
AddImageTiledButton(264, 44, 0x918, 0x919, 0x79, GumpButtonType.Reply, 0, 0x2A98, 0x0, 26, 1);
AddTooltip(1075990);
AddHtmlLocalized(348, 44, 250, 60, 1074800, 0x7FFF); // Haunted Mirror
AddImageTiledButton(14, 108, 0x918, 0x919, 0x7A, GumpButtonType.Reply, 0, 0x2A92, 0x0, 18, 1);
AddTooltip(1075989);
AddHtmlLocalized(98, 108, 250, 60, 1074801, 0x7FFF); // Bed of Nails
AddImageTiledButton(264, 108, 0x918, 0x919, 0x7B, GumpButtonType.Reply, 0, 0x2AB8, 0x0, 18, 1);
AddTooltip(1075991);
AddHtmlLocalized(348, 108, 250, 60, 1074818, 0x7FFF); // Sacrificial Altar
AddImageTiledButton(14, 172, 0x918, 0x919, 0x7C, GumpButtonType.Reply, 0, 0x3F26, 0x0, 18, 8);
AddTooltip(1076610);
AddHtmlLocalized(98, 172, 250, 60, 1076257, 0x7FFF); // Broken Covered Chair
AddImageTiledButton(264, 172, 0x918, 0x919, 0x7D, GumpButtonType.Reply, 0, 0x3F22, 0x0, 18, 8);
AddTooltip(1076610);
AddHtmlLocalized(348, 172, 250, 60, 1076258, 0x7FFF); // Broken Bookcase
AddImageTiledButton(14, 236, 0x918, 0x919, 0x7E, GumpButtonType.Reply, 0, 0x3F24, 0x0, 18, 8);
AddTooltip(1076610);
AddHtmlLocalized(98, 236, 250, 60, 1076259, 0x7FFF); // Standing Broken Chair
AddImageTiledButton(264, 236, 0x918, 0x919, 0x7F, GumpButtonType.Reply, 0, 0x3F25, 0x0, 18, 8);
AddTooltip(1076610);
AddHtmlLocalized(348, 236, 250, 60, 1076260, 0x7FFF); // Broken Vanity
AddImageTiledButton(14, 300, 0x918, 0x919, 0x80, GumpButtonType.Reply, 0, 0x3F23, 0x0, 18, 8);
AddTooltip(1076610);
AddHtmlLocalized(98, 300, 250, 60, 1076261, 0x7FFF); // Broken Chest of Drawers
AddImageTiledButton(264, 300, 0x918, 0x919, 0x81, GumpButtonType.Reply, 0, 0x3F21, 0x0, 18, 8);
AddTooltip(1076610);
AddHtmlLocalized(348, 300, 250, 60, 1076262, 0x7FFF); // Broken Armoire
AddButton(400, 374, 0xFA5, 0xFA7, 0, GumpButtonType.Page, 4);
AddHtmlLocalized(440, 376, 60, 20, 1043353, 0x7FFF); // Next
AddPage(4);
AddButton(300, 374, 0xFAE, 0xFB0, 0, GumpButtonType.Page, 3);
AddHtmlLocalized(340, 376, 60, 20, 1011393, 0x7FFF); // Back
AddImageTiledButton(14, 44, 0x918, 0x919, 0x82, GumpButtonType.Reply, 0, 0x3F0B, 0x0, 18, 8);
AddTooltip(1076610);
AddHtmlLocalized(98, 44, 250, 60, 1076263, 0x7FFF); // Broken Bed
AddImageTiledButton(264, 44, 0x918, 0x919, 0x83, GumpButtonType.Reply, 0, 0xC19, 0x0, 13, 8);
AddTooltip(1076610);
AddHtmlLocalized(348, 44, 250, 60, 1076264, 0x7FFF); // Broken Fallen Chair
AddImageTiledButton(14, 108, 0x918, 0x919, 0x84, GumpButtonType.Reply, 0, 0x3DAA, 0x0, 20, -3);
AddTooltip(1076611);
AddHtmlLocalized(98, 108, 250, 60, 1076265, 0x7FFF); // Suit of Gold Armor
AddImageTiledButton(264, 108, 0x918, 0x919, 0x85, GumpButtonType.Reply, 0, 0x151C, 0x0, -20, -3);
AddTooltip(1076612);
AddHtmlLocalized(348, 108, 250, 60, 1076266, 0x7FFF); // Suit of Silver Armor
AddImageTiledButton(14, 172, 0x918, 0x919, 0x86, GumpButtonType.Reply, 0, 0x3DB1, 0x0, 18, 8);
AddTooltip(1076613);
AddHtmlLocalized(98, 172, 250, 60, 1076267, 0x7FFF); // Boiling Cauldron
AddImageTiledButton(264, 172, 0x918, 0x919, 0x87, GumpButtonType.Reply, 0, 0x3F27, 0x0, 18, 8);
AddTooltip(1076614);
AddHtmlLocalized(348, 172, 250, 60, 1024656, 0x7FFF); // Guillotine
AddImageTiledButton(14, 236, 0x918, 0x919, 0x88, GumpButtonType.Reply, 0, 0x3F0C, 0x0, 18, 8);
AddTooltip(1076615);
AddHtmlLocalized(98, 236, 250, 60, 1076268, 0x7FFF); // Cherry Blossom Tree
AddImageTiledButton(264, 236, 0x918, 0x919, 0x89, GumpButtonType.Reply, 0, 0x3F07, 0x0, 18, 8);
AddTooltip(1076616);
AddHtmlLocalized(348, 236, 250, 60, 1076269, 0x7FFF); // Apple Tree
AddImageTiledButton(14, 300, 0x918, 0x919, 0x8A, GumpButtonType.Reply, 0, 0x3F16, 0x0, 18, 8);
AddTooltip(1076617);
AddHtmlLocalized(98, 300, 250, 60, 1076270, 0x7FFF); // Peach Tree
AddImageTiledButton(264, 300, 0x918, 0x919, 0x8B, GumpButtonType.Reply, 0, 0x3F12, 0x0, 18, 8);
AddTooltip(1076618);
AddHtmlLocalized(348, 300, 250, 60, 1076271, 0x7FFF); // Hanging Axes
AddButton(400, 374, 0xFA5, 0xFA7, 0, GumpButtonType.Page, 5);
AddHtmlLocalized(440, 376, 60, 20, 1043353, 0x7FFF); // Next
AddPage(5);
AddButton(300, 374, 0xFAE, 0xFB0, 0, GumpButtonType.Page, 4);
AddHtmlLocalized(340, 376, 60, 20, 1011393, 0x7FFF); // Back
AddImageTiledButton(14, 44, 0x918, 0x919, 0x8C, GumpButtonType.Reply, 0, 0x3F13, 0x0, 18, 8);
AddTooltip(1076619);
AddHtmlLocalized(98, 44, 250, 60, 1076272, 0x7FFF); // Hanging Swords
AddImageTiledButton(264, 44, 0x918, 0x919, 0x8D, GumpButtonType.Reply, 0, 0x3F09, 0x0, 18, 8);
AddTooltip(1076620);
AddHtmlLocalized(348, 44, 250, 60, 1076273, 0x7FFF); // Blue fancy rug
AddImageTiledButton(14, 108, 0x918, 0x919, 0x8E, GumpButtonType.Reply, 0, 0x3F0E, 0x0, 18, 8);
AddTooltip(1076621);
AddHtmlLocalized(98, 108, 250, 60, 1076274, 0x7FFF); // Coffin
AddImageTiledButton(264, 108, 0x918, 0x919, 0x8F, GumpButtonType.Reply, 0, 0x3F1F, 0x0, 18, 8);
AddTooltip(1076623);
AddHtmlLocalized(348, 108, 250, 60, 1074027, 0x7FFF); // Vanity
AddImageTiledButton(14, 172, 0x918, 0x919, 0x90, GumpButtonType.Reply, 0, 0x118B, 0x0, -4, -9);
AddTooltip(1076624);
AddHtmlLocalized(98, 172, 250, 60, 1076635, 0x7FFF); // Table With A Purple<br>Tablecloth
AddImageTiledButton(264, 172, 0x918, 0x919, 0x91, GumpButtonType.Reply, 0, 0x118C, 0x0, -4, -9);
AddTooltip(1076624);
AddHtmlLocalized(348, 172, 250, 60, 1076636, 0x7FFF); // Table With A Blue<br>Tablecloth
AddImageTiledButton(14, 236, 0x918, 0x919, 0x92, GumpButtonType.Reply, 0, 0x118D, 0x0, -4, -9);
AddTooltip(1076624);
AddHtmlLocalized(98, 236, 250, 60, 1076637, 0x7FFF); // Table With A Red<br>Tablecloth
AddImageTiledButton(264, 236, 0x918, 0x919, 0x93, GumpButtonType.Reply, 0, 0x118E, 0x0, -4, -9);
AddTooltip(1076624);
AddHtmlLocalized(348, 236, 250, 60, 1076638, 0x7FFF); // Table With An Orange<br>Tablecloth
AddImageTiledButton(14, 300, 0x918, 0x919, 0x94, GumpButtonType.Reply, 0, 0x3F1E, 0x0, 18, 8);
AddTooltip(1076625);
AddHtmlLocalized(98, 300, 250, 60, 1076279, 0x7FFF); // Unmade Bed
AddImageTiledButton(264, 300, 0x918, 0x919, 0x95, GumpButtonType.Reply, 0, 0x3F0F, 0x0, 18, 8);
AddTooltip(1076626);
AddHtmlLocalized(348, 300, 250, 60, 1076280, 0x7FFF); // Curtains
AddButton(400, 374, 0xFA5, 0xFA7, 0, GumpButtonType.Page, 6);
AddHtmlLocalized(440, 376, 60, 20, 1043353, 0x7FFF); // Next
AddPage(6);
AddButton(300, 374, 0xFAE, 0xFB0, 0, GumpButtonType.Page, 5);
AddHtmlLocalized(340, 376, 60, 20, 1011393, 0x7FFF); // Back
AddImageTiledButton(14, 44, 0x918, 0x919, 0x96, GumpButtonType.Reply, 0, 0x1E34, 0x0, 18, -17);
AddTooltip(1076627);
AddHtmlLocalized(98, 44, 250, 60, 1076281, 0x7FFF); // Scarecrow
AddImageTiledButton(264, 44, 0x918, 0x919, 0x97, GumpButtonType.Reply, 0, 0xA0C, 0x0, 18, 8);
AddTooltip(1076628);
AddHtmlLocalized(348, 44, 250, 60, 1076282, 0x7FFF); // Wall Torch
AddImageTiledButton(14, 108, 0x918, 0x919, 0x98, GumpButtonType.Reply, 0, 0x3F10, 0x0, 18, 9);
AddTooltip(1076629);
AddHtmlLocalized(98, 108, 250, 60, 1076283, 0x7FFF); // Fountain
AddImageTiledButton(264, 108, 0x918, 0x919, 0x99, GumpButtonType.Reply, 0, 0x3F19, 0x0, 18, 8);
AddTooltip(1076630);
AddHtmlLocalized(348, 108, 250, 60, 1076284, 0x7FFF); // Statue
AddImageTiledButton(14, 172, 0x918, 0x919, 0x9A, GumpButtonType.Reply, 0, 0x1EA5, 0x0, 5, -25);
AddTooltip(1076631);
AddHtmlLocalized(98, 172, 250, 60, 1076285, 0x7FFF); // Large Fish Net
AddImageTiledButton(264, 172, 0x918, 0x919, 0x9B, GumpButtonType.Reply, 0, 0x1EA3, 0x0, 18, -27);
AddTooltip(1076632);
AddHtmlLocalized(348, 172, 250, 60, 1076286, 0x7FFF); // Small Fish Net
AddImageTiledButton(14, 236, 0x918, 0x919, 0x9C, GumpButtonType.Reply, 0, 0x2FDF, 0x0, 18, -36);
AddTooltip(1076633);
AddHtmlLocalized(98, 236, 250, 60, 1076287, 0x7FFF); // Ladder
AddImageTiledButton(264, 236, 0x918, 0x919, 0x9D, GumpButtonType.Reply, 0, 0x3F15, 0x0, 18, 8);
AddTooltip(1076622);
AddHtmlLocalized(348, 236, 250, 60, 1076288, 0x7FFF); // Iron Maiden
AddImageTiledButton(14, 300, 0x918, 0x919, 0x9E, GumpButtonType.Reply, 0, 0x3F0A, 0x0, 18, 8);
AddTooltip(1076620);
AddHtmlLocalized(98, 300, 250, 60, 1076585, 0x7FFF); // Blue plain rug
AddImageTiledButton(264, 300, 0x918, 0x919, 0x9F, GumpButtonType.Reply, 0, 0x3F11, 0x0, 18, 8);
AddTooltip(1076620);
AddHtmlLocalized(348, 300, 250, 60, 1076586, 0x7FFF); // Golden decorative rug
AddButton(400, 374, 0xFA5, 0xFA7, 0, GumpButtonType.Page, 7);
AddHtmlLocalized(440, 376, 60, 20, 1043353, 0x7FFF); // Next
AddPage(7);
AddButton(300, 374, 0xFAE, 0xFB0, 0, GumpButtonType.Page, 6);
AddHtmlLocalized(340, 376, 60, 20, 1011393, 0x7FFF); // Back
AddImageTiledButton(14, 44, 0x918, 0x919, 0xA0, GumpButtonType.Reply, 0, 0x3F0D, 0x0, 18, 8);
AddTooltip(1076620);
AddHtmlLocalized(98, 44, 250, 60, 1076587, 0x7FFF); // Cinnamon fancy rug
AddImageTiledButton(264, 44, 0x918, 0x919, 0xA1, GumpButtonType.Reply, 0, 0x3F18, 0x0, 18, 8);
AddTooltip(1076620);
AddHtmlLocalized(348, 44, 250, 60, 1076588, 0x7FFF); // Red plain rug
AddImageTiledButton(14, 108, 0x918, 0x919, 0xA2, GumpButtonType.Reply, 0, 0x3F08, 0x0, 18, 8);
AddTooltip(1076620);
AddHtmlLocalized(98, 108, 250, 60, 1076589, 0x7FFF); // Blue decorative rug
AddImageTiledButton(264, 108, 0x918, 0x919, 0xA3, GumpButtonType.Reply, 0, 0x3F17, 0x0, 18, 8);
AddTooltip(1076620);
AddHtmlLocalized(348, 108, 250, 60, 1076590, 0x7FFF); // Pink fancy rug
AddImageTiledButton(14, 172, 0x918, 0x919, 0xA4, GumpButtonType.Reply, 0, 0x312A, 0x0, 18, 8);
AddTooltip(1076615);
AddHtmlLocalized(98, 172, 250, 60, 1076784, 0x7FFF); // Cherry Blossom Trunk
AddImageTiledButton(264, 172, 0x918, 0x919, 0xA5, GumpButtonType.Reply, 0, 0x3128, 0x0, 18, 8);
AddTooltip(1076616);
AddHtmlLocalized(348, 172, 250, 60, 1076785, 0x7FFF); // Apple Trunk
AddImageTiledButton(14, 236, 0x918, 0x919, 0xA6, GumpButtonType.Reply, 0, 0x3129, 0x0, 18, 8);
AddTooltip(1076617);
AddHtmlLocalized(98, 236, 250, 60, 1076786, 0x7FFF); // Peach Trunk
return;
}
public override void OnResponse(NetState sender, in RelayInfo info)
from.SendGump(new HeritageTokenGump(token));
}
protected override void BuildLayout(ref StaticGumpBuilder builder)
{
builder.AddPage();
// Standard static framing
builder.AddBackground(0, 0, 520, 404, 0x13BE);
builder.AddImageTiled(10, 10, 500, 20, 0xA40);
builder.AddImageTiled(10, 40, 500, 324, 0xA40);
builder.AddImageTiled(10, 374, 500, 20, 0xA40);
builder.AddAlphaRegion(10, 10, 500, 384);
builder.AddButton(10, 374, 0xFB1, 0xFB2, 0);
builder.AddHtmlLocalized(45, 376, 450, 20, 1060051, 0x7FFF); // CANCEL
builder.AddHtmlLocalized(14, 12, 500, 20, 1075576, 0x7FFF); // Choose your item from the following pages
const int itemsPerPage = 10;
int totalItems = ButtonLookup.Count;
int totalPages = (int)Math.Ceiling((double)totalItems / itemsPerPage);
int index = 0;
int page = 1;
foreach (var (buttonId, (_, cliloc, tooltip, itemId, hue, width, height)) in ButtonLookup)
{
if (m_Token?.Deleted != false || info.ButtonID == 0)
// When index cleanly divides by 10, we are starting a new page
if (index % itemsPerPage == 0)
{
return;
builder.AddPage(page);
// Add Next Button
if (page < totalPages)
{
builder.AddButton(400, 374, 0xFA5, 0xFA7, 0, GumpButtonType.Page, page + 1);
builder.AddHtmlLocalized(440, 376, 60, 20, 1043353, 0x7FFF); // Next
}
// Add Back Button
if (page > 1)
{
builder.AddButton(300, 374, 0xFAE, 0xFB0, 0, GumpButtonType.Page, page - 1);
builder.AddHtmlLocalized(340, 376, 60, 20, 1011393, 0x7FFF); // Back
}
}
Type[] types;
int cliloc;
// Calculate dynamic grid placement (2 columns, 5 rows)
int posOnPage = index % itemsPerPage;
int col = posOnPage % 2; // 0 for left, 1 for right
int row = posOnPage / 2; // 0 through 4
switch (info.ButtonID)
int xBase = col == 0 ? 14 : 264;
int yBase = 44 + (row * 64);
int textX = col == 0 ? 98 : 348;
// Render the UI entries
builder.AddImageTiledButton(
xBase,
yBase,
0x918,
0x919,
buttonId,
GumpButtonType.Reply,
0,
itemId,
hue,
width,
height
);
if (tooltip > 0)
{
default:
{
types = null;
cliloc = 0;
break;
}
// 7th anniversary
case 0x64:
{
types = [typeof(LeggingsOfEmbers)];
cliloc = 1078147;
break;
}
case 0x65:
{
types = [typeof(RoseOfTrinsic)];
cliloc = 1062913;
break;
}
case 0x66:
{
types = [typeof(ShaminoCrossbow)];
cliloc = 1062915;
break;
}
case 0x67:
{
types = [typeof(TapestryOfSosaria)];
cliloc = 1062917;
break;
}
case 0x68:
{
types = [typeof(HearthOfHomeFireDeed)];
cliloc = 1062919;
break;
}
case 0x69:
{
types = [typeof(HolySword)];
cliloc = 1062921;
break;
}
case 0x6A:
{
types = [typeof(SamuraiHelm)];
cliloc = 1062923;
break;
}
// 8th anniversary
/*case 0x6B: types = new [] { typeof( SpiritualityHelm ) }; cliloc = 1075188; break;
case 0x6C: types = new [] { typeof( ValorGauntlets ) }; cliloc = 1075192; break;*/
case 0x6D:
{
types = [typeof(DupresShield)];
cliloc = 1075196;
break;
}
case 0x6E:
{
types = [typeof(FountainOfLifeDeed)];
cliloc = 1075197;
break;
}
case 0x6F:
{
types = [typeof(DawnsMusicBox)];
cliloc = 1075198;
break;
}
case 0x70:
{
types = [typeof(OssianGrimoire)];
cliloc = 1078148;
break;
}
case 0x71:
{
types = [typeof(FerretFormTalisman)];
cliloc = 1078142;
break;
}
case 0x72:
{
types = [typeof(SquirrelFormTalisman)];
cliloc = 1078143;
break;
}
case 0x73:
{
types = [typeof(CuSidheFormTalisman)];
cliloc = 1078144;
break;
}
case 0x74:
{
types = [typeof(ReptalonFormTalisman)];
cliloc = 1078145;
break;
}
case 0x75:
{
types = [typeof(QuiverOfInfinity)];
cliloc = 1075201;
break;
}
// evil home decor
case 0x76:
{
types = [typeof(BoneThroneDeed), typeof(BoneCouchDeed), typeof(BoneTableDeed)];
cliloc = 1074797;
break;
}
case 0x77:
{
types =
[
typeof(CreepyPortraitDeed),
typeof(DisturbingPortraitDeed),
typeof(UnsettlingPortraitDeed)
];
cliloc = 1078146;
break;
}
case 0x78:
{
types =
[
typeof(MountedPixieBlueDeed),
typeof(MountedPixieGreenDeed),
typeof(MountedPixieLimeDeed),
typeof(MountedPixieOrangeDeed),
typeof(MountedPixieWhiteDeed)
];
cliloc = 1074799;
break;
}
case 0x79:
{
types = [typeof(HaunterMirrorDeed)];
cliloc = 1074800;
break;
}
case 0x7A:
{
types = [typeof(BedOfNailsDeed)];
cliloc = 1074801;
break;
}
case 0x7B:
{
types = [typeof(SacrificialAltarDeed)];
cliloc = 1074818;
break;
}
// broken furniture
case 0x7C:
{
types = [typeof(BrokenCoveredChairDeed)];
cliloc = 1076257;
break;
}
case 0x7D:
{
types = [typeof(BrokenBookcaseDeed)];
cliloc = 1076258;
break;
}
case 0x7E:
{
types = [typeof(StandingBrokenChairDeed)];
cliloc = 1076259;
break;
}
case 0x7F:
{
types = [typeof(BrokenVanityDeed)];
cliloc = 1076260;
break;
}
case 0x80:
{
types = [typeof(BrokenChestOfDrawersDeed)];
cliloc = 1076261;
break;
}
case 0x81:
{
types = [typeof(BrokenArmoireDeed)];
cliloc = 1076262;
break;
}
case 0x82:
{
types = [typeof(BrokenBedDeed)];
cliloc = 1076263;
break;
}
case 0x83:
{
types = [typeof(BrokenFallenChairDeed)];
cliloc = 1076264;
break;
}
// other
case 0x84:
{
types = [typeof(SuitOfGoldArmorDeed)];
cliloc = 1076265;
break;
}
case 0x85:
{
types = [typeof(SuitOfSilverArmorDeed)];
cliloc = 1076266;
break;
}
case 0x86:
{
types = [typeof(BoilingCauldronDeed)];
cliloc = 1076267;
break;
}
case 0x87:
{
types = [typeof(GuillotineDeed)];
cliloc = 1024656;
break;
}
case 0x88:
{
types = [typeof(CherryBlossomTreeDeed)];
cliloc = 1076268;
break;
}
case 0x89:
{
types = [typeof(AppleTreeDeed)];
cliloc = 1076269;
break;
}
case 0x8A:
{
types = [typeof(PeachTreeDeed)];
cliloc = 1076270;
break;
}
case 0x8B:
{
types = [typeof(HangingAxesDeed)];
cliloc = 1076271;
break;
}
case 0x8C:
{
types = [typeof(HangingSwordsDeed)];
cliloc = 1076272;
break;
}
case 0x8D:
{
types = [typeof(BlueFancyRugDeed)];
cliloc = 1076273;
break;
}
case 0x8E:
{
types = [typeof(WoodenCoffinDeed)];
cliloc = 1076274;
break;
}
case 0x8F:
{
types = [typeof(VanityDeed)];
cliloc = 1074027;
break;
}
case 0x90:
{
types = [typeof(TableWithPurpleClothDeed)];
cliloc = 1076635;
break;
}
case 0x91:
{
types = [typeof(TableWithBlueClothDeed)];
cliloc = 1076636;
break;
}
case 0x92:
{
types = [typeof(TableWithRedClothDeed)];
cliloc = 1076637;
break;
}
case 0x93:
{
types = [typeof(TableWithOrangeClothDeed)];
cliloc = 1076638;
break;
}
case 0x94:
{
types = [typeof(UnmadeBedDeed)];
cliloc = 1076279;
break;
}
case 0x95:
{
types = [typeof(CurtainsDeed)];
cliloc = 1076280;
break;
}
case 0x96:
{
types = [typeof(ScarecrowDeed)];
cliloc = 1076281;
break;
}
case 0x97:
{
types = [typeof(WallTorchDeed)];
cliloc = 1076282;
break;
}
case 0x98:
{
types = [typeof(FountainDeed)];
cliloc = 1076283;
break;
}
case 0x99:
{
types = [typeof(StoneStatueDeed)];
cliloc = 1076284;
break;
}
case 0x9A:
{
types = [typeof(LargeFishingNetDeed)];
cliloc = 1076285;
break;
}
case 0x9B:
{
types = [typeof(SmallFishingNetDeed)];
cliloc = 1076286;
break;
}
case 0x9C:
{
types = [typeof(HouseLadderDeed)];
cliloc = 1076287;
break;
}
case 0x9D:
{
types = [typeof(IronMaidenDeed)];
cliloc = 1076288;
break;
}
case 0x9E:
{
types = [typeof(BluePlainRugDeed)];
cliloc = 1076585;
break;
}
case 0x9F:
{
types = [typeof(GoldenDecorativeRugDeed)];
cliloc = 1076586;
break;
}
case 0xA0:
{
types = [typeof(CinnamonFancyRugDeed)];
cliloc = 1076587;
break;
}
case 0xA1:
{
types = [typeof(RedPlainRugDeed)];
cliloc = 1076588;
break;
}
case 0xA2:
{
types = [typeof(BlueDecorativeRugDeed)];
cliloc = 1076589;
break;
}
case 0xA3:
{
types = [typeof(PinkFancyRugDeed)];
cliloc = 1076590;
break;
}
case 0xA4:
{
types = [typeof(CherryBlossomTrunkDeed)];
cliloc = 1076784;
break;
}
case 0xA5:
{
types = [typeof(AppleTrunkDeed)];
cliloc = 1076785;
break;
}
case 0xA6:
{
types = [typeof(PeachTrunkDeed)];
cliloc = 1076786;
break;
}
builder.AddTooltip(tooltip);
}
if (types?.Length > 0 && cliloc > 0)
builder.AddHtmlLocalized(textX, yBase, 250, 60, cliloc, 0x7FFF);
index++;
// Bump to the next page when we fill the current one
if (index % itemsPerPage == 0)
{
sender.Mobile.SendGump(new ConfirmHeritageGump(m_Token, types, cliloc));
}
else
{
// This option is currently disabled, while we evaluate it for game balance.
sender.Mobile.SendLocalizedMessage(501311);
page++;
}
}
}
public override void OnResponse(NetState sender, in RelayInfo info)
{
if (_token?.Deleted != false || info.ButtonID == 0)
{
return;
}
if (!ButtonLookup.TryGetValue(info.ButtonID, out var buttonInfo))
{
return;
}
var (types, cliloc, _, _, _, _, _) = buttonInfo;
if (types?.Length > 0 && cliloc > 0)
{
ConfirmHeritageGump.DisplayTo(sender.Mobile, _token, types, cliloc);
}
else
{
// This option is currently disabled, while we evaluate it for game balance.
sender.Mobile.SendLocalizedMessage(501311);
}
}
}