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
|
|
@ -73,7 +73,7 @@ namespace Server.Gumps
|
|||
AddButton(x + SetOffsetX, y + SetOffsetY, SetButtonID1, SetButtonID2, 1);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
if (info.ButtonID == 1)
|
||||
{
|
||||
|
|
@ -81,11 +81,11 @@ namespace Server.Gumps
|
|||
{
|
||||
if (m_From.AccessLevel >= AccessLevel.GameMaster)
|
||||
{
|
||||
var text = info.GetTextEntry(0);
|
||||
var text = info.GetTextEntry(0)?.Trim();
|
||||
|
||||
if (text != null)
|
||||
if (text?.Length > 0)
|
||||
{
|
||||
m_Skill.Base = Convert.ToDouble(text.Text);
|
||||
m_Skill.Base = Convert.ToDouble(text);
|
||||
CommandLogging.LogChangeProperty(m_From, m_Target, $"{m_Skill}.Base", m_Skill.Base.ToString());
|
||||
}
|
||||
}
|
||||
|
|
@ -340,7 +340,7 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
public override void OnResponse(NetState sender, in RelayInfo info)
|
||||
{
|
||||
var buttonID = info.ButtonID - 1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue