fix: Optimizes gump relay info (Prep for Static Gumps) (#1698)
This commit is contained in:
parent
50fcee12dc
commit
cfe9e04c78
220 changed files with 364 additions and 402 deletions
|
|
@ -100,7 +100,7 @@ namespace Server.Factions
|
|||
AddHtmlLocalized(55, 140, 350, 20, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ namespace Server.Factions
|
|||
public static string FormatTimeSpan(TimeSpan ts) =>
|
||||
$"{ts.Days:D2}:{ts.Hours % 24:D2}:{ts.Minutes % 60:D2}:{ts.Seconds % 60:D2}";
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
var from = sender.Mobile;
|
||||
var bid = info.ButtonID;
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ namespace Server.Factions
|
|||
AddButton(20, 230, 4005, 4007, 0);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID == 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -259,7 +259,7 @@ namespace Server.Factions
|
|||
|
||||
public override int ButtonTypes => 4;
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (!FromButtonID(info.ButtonID, out var type, out var index))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ namespace Server.Factions
|
|||
|
||||
public override int ButtonTypes => 2;
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (!m_Town.IsFinance(m_From) || m_Town.Owner != m_Faction)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace Server.Factions
|
|||
AddButton(20, 240, 4005, 4007, 0);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID != 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ namespace Server.Factions
|
|||
AddHtmlLocalized(335, 400, 200, 20, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID == 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ namespace Server.Factions
|
|||
AddButton(135, 80, 4005, 4007, 2);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ namespace Server.Factions
|
|||
AddItem(x + (w - rc.Width) / 2 - rc.X, y + (h - rc.Height) / 2 - rc.Y, itemID);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (!m_Town.IsSheriff(m_From) || m_Town.Owner != m_Faction)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace Server.Factions
|
|||
AddButton(20, 210, 4005, 4007, 0);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (m_Town.Owner != m_Faction || !m_Faction.IsCommander(m_From))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace Server.Factions
|
|||
AddHtmlLocalized(55, 310, 100, 20, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID == 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue