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:
parent
40d99f6d1c
commit
8282b00ca2
246 changed files with 1722 additions and 1383 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server.Accounting;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue