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
|
|
@ -1057,7 +1057,6 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
if (m_TeamInfo?.Game != null)
|
||||
{
|
||||
from.CloseGump<BRBoardGump>();
|
||||
from.SendGump(new BRBoardGump(from, m_TeamInfo.Game));
|
||||
}
|
||||
}
|
||||
|
|
@ -1082,7 +1081,7 @@ namespace Server.Engines.ConPVP
|
|||
private const int LabelColor32 = 0xFFFFFF;
|
||||
private const int BlackColor32 = 0x000000;
|
||||
|
||||
// private BRGame m_Game;
|
||||
public override bool Singleton => true;
|
||||
|
||||
public BRBoardGump(Mobile mob, BRGame game, BRTeamInfo section = null) : base(60, 60)
|
||||
{
|
||||
|
|
@ -1719,7 +1718,6 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
|
||||
mob.CloseGump<BRBoardGump>();
|
||||
mob.SendGump(new BRBoardGump(mob, this));
|
||||
|
||||
m_Context.Requip(mob, corpse);
|
||||
|
|
@ -1918,7 +1916,6 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
if (dp?.Mobile != null)
|
||||
{
|
||||
dp.Mobile.CloseGump<BRBoardGump>();
|
||||
dp.Mobile.SendGump(new BRBoardGump(dp.Mobile, this));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
if (m_TeamInfo?.Game != null)
|
||||
{
|
||||
from.CloseGump<CTFBoardGump>();
|
||||
from.SendGump(new CTFBoardGump(from, m_TeamInfo.Game));
|
||||
}
|
||||
}
|
||||
|
|
@ -56,6 +55,8 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
private CTFGame m_Game;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public CTFBoardGump(Mobile mob, CTFGame game, CTFTeamInfo section = null)
|
||||
: base(60, 60)
|
||||
{
|
||||
|
|
@ -1059,7 +1060,6 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
|
||||
mob.CloseGump<CTFBoardGump>();
|
||||
mob.SendGump(new CTFBoardGump(mob, this));
|
||||
|
||||
m_Context.Requip(mob, corpse);
|
||||
|
|
@ -1258,7 +1258,6 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
if (dp?.Mobile != null)
|
||||
{
|
||||
dp.Mobile.CloseGump<CTFBoardGump>();
|
||||
dp.Mobile.SendGump(new CTFBoardGump(dp.Mobile, this));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
if (m_TeamInfo?.Game != null)
|
||||
{
|
||||
from.CloseGump<DDBoardGump>();
|
||||
from.SendGump(new DDBoardGump(from, m_TeamInfo.Game));
|
||||
}
|
||||
}
|
||||
|
|
@ -52,7 +51,7 @@ namespace Server.Engines.ConPVP
|
|||
private const int LabelColor32 = 0xFFFFFF;
|
||||
private const int BlackColor32 = 0x000000;
|
||||
|
||||
// private DDGame m_Game;
|
||||
public override bool Singleton => true;
|
||||
|
||||
public DDBoardGump(Mobile mob, DDGame game, DDTeamInfo section = null)
|
||||
: base(60, 60)
|
||||
|
|
@ -605,7 +604,6 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
|
||||
mob.CloseGump<DDBoardGump>();
|
||||
mob.SendGump(new DDBoardGump(mob, this));
|
||||
|
||||
m_Context.Requip(mob, corpse);
|
||||
|
|
@ -820,7 +818,6 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
if (dp?.Mobile != null)
|
||||
{
|
||||
dp.Mobile.CloseGump<DDBoardGump>();
|
||||
dp.Mobile.SendGump(new DDBoardGump(dp.Mobile, this));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -311,7 +311,6 @@ namespace Server.Engines.ConPVP
|
|||
{
|
||||
if (m_Game != null)
|
||||
{
|
||||
from.CloseGump<KHBoardGump>();
|
||||
from.SendGump(new KHBoardGump(from, m_Game));
|
||||
}
|
||||
else
|
||||
|
|
@ -353,6 +352,8 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
private KHGame m_Game;
|
||||
|
||||
public override bool Singleton => true;
|
||||
|
||||
public KHBoardGump(Mobile mob, KHGame game)
|
||||
: base(60, 60)
|
||||
{
|
||||
|
|
@ -989,7 +990,6 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
|
||||
mob.CloseGump<KHBoardGump>();
|
||||
mob.SendGump(new KHBoardGump(mob, this));
|
||||
|
||||
m_Context.Requip(mob, corpse);
|
||||
|
|
@ -1199,7 +1199,6 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
if (dp?.Mobile != null)
|
||||
{
|
||||
dp.Mobile.CloseGump<KHBoardGump>();
|
||||
dp.Mobile.SendGump(new KHBoardGump(dp.Mobile, this));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue