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
|
|
@ -33,7 +33,6 @@ public partial class PottedPlantDeed : Item
|
|||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
|
|
@ -46,6 +45,8 @@ public partial class PottedPlantDeed : Item
|
|||
{
|
||||
private readonly PottedPlantDeed _deed;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public InternalGump(PottedPlantDeed deed) : base(100, 200)
|
||||
{
|
||||
_deed = deed;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ public partial class SnowStatueDeed : Item
|
|||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(from, this));
|
||||
}
|
||||
else
|
||||
|
|
@ -78,6 +77,8 @@ public partial class SnowStatueDeed : Item
|
|||
{
|
||||
private readonly SnowStatueDeed _deed;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public InternalGump(Mobile from, SnowStatueDeed deed) : base(100, 200)
|
||||
{
|
||||
_deed = deed;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ public partial class WreathAddon : Item, IDyable, IAddon
|
|||
{
|
||||
if (from.InRange(GetWorldLocation(), 3))
|
||||
{
|
||||
from.CloseGump<WreathAddonGump>();
|
||||
from.SendGump(new WreathAddonGump(from, this));
|
||||
}
|
||||
else
|
||||
|
|
@ -111,6 +110,8 @@ public partial class WreathAddon : Item, IDyable, IAddon
|
|||
private readonly WreathAddon _addon;
|
||||
private readonly Mobile _from;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public WreathAddonGump(Mobile from, WreathAddon addon) : base(150, 50)
|
||||
{
|
||||
_from = from;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue