Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)

This commit is contained in:
Kamron Batman 2019-03-11 14:29:59 -07:00 • committed by GitHub
parent e748af4430
commit 513e54f70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1094 changed files with 15913 additions and 21892 deletions

View file

@ -18,19 +18,18 @@ namespace Server.Gumps
AddBackground(0, 0, 291, 99, 0x13BE);
AddImageTiled(5, 6, 280, 20, 0xA40);
AddHtmlLocalized(9, 8, 280, 20, 1070972, 0x7FFF, false,
false); // Click "OKAY" to redeem the following promotional item:
AddHtmlLocalized(9, 8, 280, 20, 1070972, 0x7FFF); // Click "OKAY" to redeem the following promotional item:
AddImageTiled(5, 31, 280, 40, 0xA40);
AddHtmlLocalized(9, 35, 272, 40, cliloc, 0x7FFF, false, false);
AddButton(180, 73, 0xFB7, 0xFB8, (int)Buttons.Okay, GumpButtonType.Reply, 0);
AddHtmlLocalized(215, 75, 100, 20, 1011036, 0x7FFF, false, false); // OKAY
AddButton(5, 73, 0xFB1, 0xFB2, (int)Buttons.Cancel, GumpButtonType.Reply, 0);
AddHtmlLocalized(40, 75, 100, 20, 1060051, 0x7FFF, false, false); // CANCEL
AddHtmlLocalized(9, 35, 272, 40, cliloc, 0x7FFF);
AddButton(180, 73, 0xFB7, 0xFB8, (int)Buttons.Okay);
AddHtmlLocalized(215, 75, 100, 20, 1011036, 0x7FFF); // OKAY
AddButton(5, 73, 0xFB1, 0xFB2, (int)Buttons.Cancel);
AddHtmlLocalized(40, 75, 100, 20, 1060051, 0x7FFF); // CANCEL
}
public override void OnResponse(NetState sender, RelayInfo info)
{
if (m_Token == null || m_Token.Deleted)
if (m_Token?.Deleted != false)
return;
switch (info.ButtonID)
@ -71,4 +70,4 @@ namespace Server.Gumps
Okay
}
}
}
}