fix: Optimizes gump relay info (Prep for Static Gumps) (#1698)

This commit is contained in:
Kamron Batman 2024-03-07 20:54:53 -08:00 • committed by GitHub
parent 50fcee12dc
commit cfe9e04c78
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
220 changed files with 364 additions and 402 deletions

View file

@ -117,7 +117,7 @@ namespace Server.Gumps
}
}
public override void OnResponse(NetState sender, RelayInfo info)
public override void OnResponse(NetState sender, in RelayInfo info)
{
object toSet = null;
bool shouldSet, shouldSend = true;
@ -126,13 +126,13 @@ namespace Server.Gumps
{
case 1:
{
var text = info.GetTextEntry(0);
var text = info.GetTextEntry(0)?.Trim();
if (text != null)
if (text?.Length > 0)
{
try
{
Types.TryParse(m_Property.PropertyType, text.Text, out toSet);
Types.TryParse(m_Property.PropertyType, text, out toSet);
shouldSet = true;
}
catch