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
|
|
@ -307,37 +307,21 @@ namespace Server.Commands
|
|||
FinishPage();
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (!SplitButtonID(info.ButtonID, 1, out var type, out var index))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var entry = info.GetTextEntry(0);
|
||||
|
||||
if (entry != null)
|
||||
{
|
||||
m_Batch.Condition = entry.Text;
|
||||
}
|
||||
m_Batch.Condition = info.GetTextEntry(0) ?? "";
|
||||
|
||||
for (var i = m_Batch.BatchCommands.Count - 1; i >= 0; --i)
|
||||
{
|
||||
var sc = m_Batch.BatchCommands[i];
|
||||
|
||||
entry = info.GetTextEntry(1 + i * 2);
|
||||
|
||||
if (entry != null)
|
||||
{
|
||||
sc.Command = entry.Text;
|
||||
}
|
||||
|
||||
entry = info.GetTextEntry(2 + i * 2);
|
||||
|
||||
if (entry != null)
|
||||
{
|
||||
sc.Object = entry.Text;
|
||||
}
|
||||
sc.Command = info.GetTextEntry(1 + i * 2);
|
||||
sc.Object = info.GetTextEntry(2 + i * 2);
|
||||
|
||||
if (sc.Command.Length == 0 && sc.Object.Length == 0)
|
||||
{
|
||||
|
|
@ -417,7 +401,7 @@ namespace Server.Commands
|
|||
FinishPage();
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (SplitButtonID(info.ButtonID, 1, out var type, out var index))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ namespace Server.Commands.Generic
|
|||
FinishPage();
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
|
|
@ -349,7 +349,7 @@ namespace Server.Commands.Generic
|
|||
CommandSystem.Handle(m_From, $"{CommandSystem.Prefix}{ip}");
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (m_Item.Deleted)
|
||||
{
|
||||
|
|
@ -515,7 +515,7 @@ namespace Server.Commands.Generic
|
|||
CommandSystem.Handle(m_From, $"{CommandSystem.Prefix}{ip}");
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (m_Mobile.Deleted)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -287,7 +287,7 @@ public static class HelpInfo
|
|||
FinishPage();
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
var m = sender.Mobile;
|
||||
switch (info.ButtonID)
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ namespace Server.Gumps
|
|||
return finalResults;
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
var from = sender.Mobile;
|
||||
|
||||
|
|
@ -202,8 +202,7 @@ namespace Server.Gumps
|
|||
{
|
||||
case 1: // Search
|
||||
{
|
||||
var te = info.GetTextEntry(0);
|
||||
var match = te?.Text.Trim() ?? "";
|
||||
var match = info.GetTextEntry(0)?.Trim() ?? "";
|
||||
|
||||
if (match.Length < 3)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
public override void OnResponse(NetState state, in RelayInfo info)
|
||||
{
|
||||
var from = m_Owner;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue