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
|
|
@ -24,6 +24,8 @@ public class CraftGump : DynamicGump
|
|||
private readonly BaseTool _tool;
|
||||
private readonly TextDefinition _notice;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public CraftGump(
|
||||
Mobile from, CraftSystem craftSystem, BaseTool tool, TextDefinition notice, CraftPage page = CraftPage.None
|
||||
) : base(40, 40)
|
||||
|
|
@ -419,7 +421,6 @@ public class CraftGump : DynamicGump
|
|||
|
||||
public override void SendTo(NetState ns)
|
||||
{
|
||||
_from.CloseGump<CraftGump>();
|
||||
_from.CloseGump<CraftGumpItem>();
|
||||
|
||||
base.SendTo(ns);
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ namespace Server.Engines.Craft
|
|||
|
||||
private bool m_ShowExceptionalChance;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public CraftGumpItem(Mobile from, CraftSystem craftSystem, CraftItem craftItem, BaseTool tool) : base(40, 40)
|
||||
{
|
||||
m_From = from;
|
||||
|
|
@ -34,9 +36,6 @@ namespace Server.Engines.Craft
|
|||
m_CraftItem = craftItem;
|
||||
m_Tool = tool;
|
||||
|
||||
from.CloseGump<CraftGump>();
|
||||
from.CloseGump<CraftGumpItem>();
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(0, 0, 530, 417, 5054);
|
||||
AddImageTiled(10, 10, 510, 22, 2624);
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using Server.Commands;
|
||||
using Server.Factions;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Logging;
|
||||
using Server.Mobiles;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@ namespace Server.Engines.Craft
|
|||
private readonly BaseTool m_Tool;
|
||||
private readonly Type m_TypeRes;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public QueryMakersMarkGump(
|
||||
int quality, Mobile from, CraftItem craftItem, CraftSystem craftSystem, Type typeRes,
|
||||
BaseTool tool
|
||||
) : base(100, 200)
|
||||
{
|
||||
from.CloseGump<QueryMakersMarkGump>();
|
||||
|
||||
m_Quality = quality;
|
||||
m_From = from;
|
||||
m_CraftItem = craftItem;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using Server.Ethics;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using Server.Factions;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue