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

@ -109,21 +109,21 @@ namespace Server.Items
AddImageTiled(10, 40, 253, 244, 0xA40);
AddImageTiled(10, 294, 253, 20, 0xA40);
AddAlphaRegion(10, 10, 253, 304);
AddButton(10, 294, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF, false, false); // CANCEL
AddHtmlLocalized(14, 12, 273, 20, 1076749, 0x7FFF, false, false); // Please select your broken bed position
AddButton(10, 294, 0xFB1, 0xFB2, 0);
AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF); // CANCEL
AddHtmlLocalized(14, 12, 273, 20, 1076749, 0x7FFF); // Please select your broken bed position
AddPage(1);
AddButton(19, 49, 0x845, 0x846, 1, GumpButtonType.Reply, 0);
AddHtmlLocalized(44, 47, 213, 20, 1075386, 0x7FFF, false, false); // South
AddButton(19, 73, 0x845, 0x846, 2, GumpButtonType.Reply, 0);
AddHtmlLocalized(44, 71, 213, 20, 1075387, 0x7FFF, false, false); // East
AddButton(19, 49, 0x845, 0x846, 1);
AddHtmlLocalized(44, 47, 213, 20, 1075386, 0x7FFF); // South
AddButton(19, 73, 0x845, 0x846, 2);
AddHtmlLocalized(44, 71, 213, 20, 1075387, 0x7FFF); // East
}
public override void OnResponse(NetState sender, RelayInfo info)
{
if (m_Deed == null || m_Deed.Deleted || info.ButtonID == 0)
if (m_Deed?.Deleted != false || info.ButtonID == 0)
return;
m_Deed.m_East = info.ButtonID != 1;
@ -131,4 +131,4 @@ namespace Server.Items
}
}
}
}
}

View file

@ -105,22 +105,21 @@ namespace Server.Items
AddImageTiled(10, 40, 253, 244, 0xA40);
AddImageTiled(10, 294, 253, 20, 0xA40);
AddAlphaRegion(10, 10, 253, 304);
AddButton(10, 294, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF, false, false); // CANCEL
AddHtmlLocalized(14, 12, 273, 20, 1076747, 0x7FFF, false,
false); // Please select your broken vanity position
AddButton(10, 294, 0xFB1, 0xFB2, 0);
AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF); // CANCEL
AddHtmlLocalized(14, 12, 273, 20, 1076747, 0x7FFF); // Please select your broken vanity position
AddPage(1);
AddButton(19, 49, 0x845, 0x846, 1, GumpButtonType.Reply, 0);
AddHtmlLocalized(44, 47, 213, 20, 1075386, 0x7FFF, false, false); // South
AddButton(19, 73, 0x845, 0x846, 2, GumpButtonType.Reply, 0);
AddHtmlLocalized(44, 71, 213, 20, 1075387, 0x7FFF, false, false); // East
AddButton(19, 49, 0x845, 0x846, 1);
AddHtmlLocalized(44, 47, 213, 20, 1075386, 0x7FFF); // South
AddButton(19, 73, 0x845, 0x846, 2);
AddHtmlLocalized(44, 71, 213, 20, 1075387, 0x7FFF); // East
}
public override void OnResponse(NetState sender, RelayInfo info)
{
if (m_Deed == null || m_Deed.Deleted || info.ButtonID == 0)
if (m_Deed?.Deleted != false || info.ButtonID == 0)
return;
m_Deed.m_East = info.ButtonID != 1;
@ -128,4 +127,4 @@ namespace Server.Items
}
}
}
}
}