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
|
|
@ -61,7 +61,6 @@ public partial class AnkhOfSacrificeComponent : AddonComponent
|
|||
}
|
||||
else
|
||||
{
|
||||
m.CloseGump<AnkhResurrectGump>();
|
||||
m.SendGump(new AnkhResurrectGump(m, ResurrectMessage.VirtueShrine));
|
||||
}
|
||||
}
|
||||
|
|
@ -215,7 +214,6 @@ public partial class AnkhOfSacrificeDeed : BaseAddonDeed, IRewardItem, IRewardOp
|
|||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<RewardOptionGump>();
|
||||
from.SendGump(new RewardOptionGump(this));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@ public partial class Banner : Item, IAddon, IDyable, IRewardItem
|
|||
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<RewardDemolitionGump>();
|
||||
from.SendGump(new RewardDemolitionGump(this, 1018318)); // Do you wish to re-deed this banner?
|
||||
}
|
||||
else
|
||||
|
|
@ -133,7 +132,6 @@ public partial class BannerDeed : Item, IRewardItem
|
|||
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
|
|
@ -154,6 +152,8 @@ public partial class BannerDeed : Item, IRewardItem
|
|||
|
||||
private readonly BannerDeed _banner;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public InternalGump(BannerDeed banner) : base(100, 200)
|
||||
{
|
||||
_banner = banner;
|
||||
|
|
@ -274,7 +274,6 @@ public partial class BannerDeed : Item, IRewardItem
|
|||
|
||||
if (north && west)
|
||||
{
|
||||
from.CloseGump<FacingGump>();
|
||||
from.SendGump(new FacingGump(_banner, _itemID, p3d, house));
|
||||
}
|
||||
else if (north || west)
|
||||
|
|
@ -301,6 +300,8 @@ public partial class BannerDeed : Item, IRewardItem
|
|||
private readonly int m_ItemID;
|
||||
private readonly Point3D m_Location;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public FacingGump(BannerDeed banner, int itemID, Point3D location, BaseHouse house) : base(150, 50)
|
||||
{
|
||||
m_Banner = banner;
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ public partial class RewardBrazierDeed : Item, IRewardItem
|
|||
return;
|
||||
}
|
||||
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
|
||||
|
|
@ -154,6 +153,8 @@ public partial class RewardBrazierDeed : Item, IRewardItem
|
|||
{
|
||||
private readonly RewardBrazierDeed _brazier;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public InternalGump(RewardBrazierDeed brazier) : base(100, 200)
|
||||
{
|
||||
_brazier = brazier;
|
||||
|
|
|
|||
|
|
@ -420,7 +420,6 @@ public partial class CannonDeed : BaseAddonDeed, IRewardItem, IRewardOption
|
|||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<RewardOptionGump>();
|
||||
from.SendGump(new RewardOptionGump(this));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ public partial class DecorativeShield : Item, IAddon, IRewardItem
|
|||
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<RewardDemolitionGump>();
|
||||
from.SendGump(new RewardDemolitionGump(this, 1049783)); // Do you wish to re-deed this decoration?
|
||||
}
|
||||
else
|
||||
|
|
@ -113,7 +112,6 @@ public partial class DecorativeShieldDeed : Item, IRewardItem
|
|||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
|
|
@ -141,6 +139,8 @@ public partial class DecorativeShieldDeed : Item, IRewardItem
|
|||
|
||||
private readonly DecorativeShieldDeed _shield;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public InternalGump(DecorativeShieldDeed shield) : base(150, 50)
|
||||
{
|
||||
_shield = shield;
|
||||
|
|
@ -267,7 +267,6 @@ public partial class DecorativeShieldDeed : Item, IRewardItem
|
|||
|
||||
if (north && west)
|
||||
{
|
||||
from.CloseGump<FacingGump>();
|
||||
from.SendGump(new FacingGump(_shield, _itemID, p3d, house));
|
||||
}
|
||||
else if (north || west)
|
||||
|
|
@ -294,6 +293,8 @@ public partial class DecorativeShieldDeed : Item, IRewardItem
|
|||
private readonly Point3D _location;
|
||||
private readonly DecorativeShieldDeed _shield;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public FacingGump(DecorativeShieldDeed shield, int itemID, Point3D location, BaseHouse house) : base(150, 50)
|
||||
{
|
||||
_shield = shield;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ public partial class FlamingHead : StoneFaceTrapNoDamage, IAddon, IRewardItem
|
|||
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<RewardDemolitionGump>();
|
||||
from.SendGump(new RewardDemolitionGump(this, 1018329)); // Do you wish to re-deed this skull?
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ public partial class HangingSkeleton : Item, IAddon, IRewardItem
|
|||
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<RewardDemolitionGump>();
|
||||
from.SendGump(new RewardDemolitionGump(this, 1049783)); // Do you wish to re-deed this decoration?
|
||||
}
|
||||
else
|
||||
|
|
@ -129,7 +128,6 @@ public partial class HangingSkeletonDeed : Item, IRewardItem
|
|||
return;
|
||||
}
|
||||
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
|
||||
|
|
@ -147,6 +145,8 @@ public partial class HangingSkeletonDeed : Item, IRewardItem
|
|||
{
|
||||
private readonly HangingSkeletonDeed _deed;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public InternalGump(HangingSkeletonDeed skeleton) : base(100, 200)
|
||||
{
|
||||
_deed = skeleton;
|
||||
|
|
@ -253,7 +253,6 @@ public partial class HangingSkeletonDeed : Item, IRewardItem
|
|||
|
||||
if (north && west)
|
||||
{
|
||||
from.CloseGump<FacingGump>();
|
||||
from.SendGump(new FacingGump(_deed, _itemID, p3d, house));
|
||||
}
|
||||
else if (north || west)
|
||||
|
|
@ -280,6 +279,8 @@ public partial class HangingSkeletonDeed : Item, IRewardItem
|
|||
private readonly Point3D _location;
|
||||
private readonly HangingSkeletonDeed _skeleton;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public FacingGump(HangingSkeletonDeed banner, int itemID, Point3D location, BaseHouse house) : base(150, 50)
|
||||
{
|
||||
_skeleton = banner;
|
||||
|
|
|
|||
|
|
@ -368,7 +368,6 @@ public partial class MiningCartDeed : BaseAddonDeed, IRewardItem, IRewardOption
|
|||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<RewardOptionGump>();
|
||||
from.SendGump(new RewardOptionGump(this));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ public partial class MinotaurStatueDeed : BaseAddonDeed, IRewardItem, IRewardOpt
|
|||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<RewardOptionGump>();
|
||||
from.SendGump(new RewardOptionGump(this));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ public partial class PottedCactusDeed : Item, IRewardItem
|
|||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
|
|
@ -73,6 +72,8 @@ public partial class PottedCactusDeed : Item, IRewardItem
|
|||
{
|
||||
private readonly PottedCactusDeed _deed;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public InternalGump(PottedCactusDeed cactus) : base(100, 200)
|
||||
{
|
||||
_deed = cactus;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,6 @@ public partial class StoneAnkh : BaseAddon, IRewardItem
|
|||
|
||||
if (house?.IsOwner(from) == true)
|
||||
{
|
||||
from.CloseGump<RewardDemolitionGump>();
|
||||
from.SendGump(new RewardDemolitionGump(this, 1049783)); // Do you wish to re-deed this decoration?
|
||||
}
|
||||
else
|
||||
|
|
@ -122,7 +121,6 @@ public partial class StoneAnkhDeed : BaseAddonDeed, IRewardItem
|
|||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
|
|
@ -150,6 +148,8 @@ public partial class StoneAnkhDeed : BaseAddonDeed, IRewardItem
|
|||
{
|
||||
private readonly StoneAnkhDeed _deed;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public InternalGump(StoneAnkhDeed deed) : base(150, 50)
|
||||
{
|
||||
_deed = deed;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,6 @@ public partial class TreeStumpDeed : BaseAddonDeed, IRewardItem, IRewardOption
|
|||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<RewardOptionGump>();
|
||||
from.SendGump(new RewardOptionGump(this));
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -304,7 +304,6 @@ public partial class WallBannerDeed : BaseAddonDeed, IRewardItem
|
|||
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
|
|
@ -324,6 +323,8 @@ public partial class WallBannerDeed : BaseAddonDeed, IRewardItem
|
|||
{
|
||||
private readonly WallBannerDeed _wallBanner;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public InternalGump(WallBannerDeed wallBanner) : base(150, 50)
|
||||
{
|
||||
_wallBanner = wallBanner;
|
||||
|
|
|
|||
|
|
@ -174,7 +174,6 @@ public partial class WeaponEngravingTool : Item, IUsesRemaining, IRewardItem
|
|||
|
||||
if (targeted is BaseWeapon item)
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(_tool, item));
|
||||
}
|
||||
else
|
||||
|
|
@ -189,6 +188,8 @@ public partial class WeaponEngravingTool : Item, IUsesRemaining, IRewardItem
|
|||
private readonly BaseWeapon _target;
|
||||
private readonly WeaponEngravingTool _tool;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public InternalGump(WeaponEngravingTool tool, BaseWeapon target) : base(0, 0)
|
||||
{
|
||||
_tool = tool;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue