feat: Moves gumps out of the core (#1916)

> [!Important]
> **Developer Note**
> This code change will **completely move gumps out of the core**


### Summary

- Adds `GetGumps()` convenience which exposes methods to Find/Close/Send multiple gumps. This helper is a performance improvement by eliminating the Dictionary<Player, List> lookup for gumps.
This commit is contained in:
Kamron Batman 2024-08-09 19:07:32 -07:00 • committed by GitHub
parent 40d99f6d1c
commit 8282b00ca2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
246 changed files with 1722 additions and 1383 deletions

View file

@ -591,8 +591,7 @@ public class CharacterStatueTarget : Target
_maker.Delete();
statue.Sculpt(from);
from.CloseGump<CharacterStatueGump>();
from.SendGump(new CharacterStatueGump(_maker, statue, from));
from.SendGump(new CharacterStatueGump(_maker, statue, from), true);
return;
}

View file

@ -8,12 +8,12 @@ namespace Server.Engines.VeteranRewards
{
private readonly Mobile m_From;
public override bool Singleton => true;
public RewardChoiceGump(Mobile from) : base(0, 0)
{
m_From = from;
from.CloseGump<RewardChoiceGump>();
RenderBackground();
RenderCategories();
}

View file

@ -9,13 +9,13 @@ namespace Server.Engines.VeteranRewards
private readonly RewardEntry m_Entry;
private readonly Mobile m_From;
public override bool Singleton => true;
public RewardConfirmGump(Mobile from, RewardEntry entry) : base(0, 0)
{
m_From = from;
m_Entry = entry;
from.CloseGump<RewardConfirmGump>();
AddPage(0);
AddBackground(10, 10, 500, 300, 2600);

View file

@ -8,6 +8,8 @@ namespace Server.Gumps
{
private readonly IAddon m_Addon;
public override bool Singleton => true;
public RewardDemolitionGump(IAddon addon, int question) : base(150, 50)
{
m_Addon = addon;

View file

@ -7,12 +7,12 @@ namespace Server.Engines.VeteranRewards
{
private readonly Mobile m_From;
public override bool Singleton => true;
public RewardNoticeGump(Mobile from) : base(0, 0)
{
m_From = from;
from.CloseGump<RewardNoticeGump>();
AddPage(0);
AddBackground(10, 10, 500, 135, 2600);

View file

@ -14,6 +14,8 @@ namespace Server.Gumps
private readonly IRewardOption m_Option;
private readonly RewardOptionList m_Options = new();
public override bool Singleton => true;
public RewardOptionGump(IRewardOption option, int title = 0) : base(60, 36)
{
m_Option = option;

View file

@ -1,5 +1,6 @@
using System;
using Server.Accounting;
using Server.Gumps;
using Server.Items;
using Server.Mobiles;