Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)
This commit is contained in:
parent
e748af4430
commit
513e54f70e
1094 changed files with 15913 additions and 21892 deletions
|
|
@ -137,16 +137,16 @@ namespace Server.Items
|
|||
AddBackground(10, 10, 430, 430, 3000);
|
||||
|
||||
if (m_Definition.TitleString != null)
|
||||
AddHtml(20, 30, 400, 25, m_Definition.TitleString, false, false);
|
||||
AddHtml(20, 30, 400, 25, m_Definition.TitleString);
|
||||
else if (m_Definition.Title > 0)
|
||||
AddHtmlLocalized(20, 30, 400, 25, m_Definition.Title, false, false);
|
||||
AddHtmlLocalized(20, 30, 400, 25, m_Definition.Title);
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 200, 25, 1011036, false, false); // OKAY
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 200, 25, 1011036); // OKAY
|
||||
|
||||
if (m_Definition.DefaultSupported)
|
||||
{
|
||||
AddButton(200, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddButton(200, 400, 4005, 4007, 2);
|
||||
AddLabel(235, 400, 0, "DEFAULT");
|
||||
}
|
||||
}
|
||||
|
|
@ -160,9 +160,9 @@ namespace Server.Items
|
|||
AddButton(30, 85 + i * 25, 5224, 5224, 0, GumpButtonType.Page, 1 + i);
|
||||
|
||||
if (groups[i].NameString != null)
|
||||
AddHtml(55, 85 + i * 25, 200, 25, groups[i].NameString, false, false);
|
||||
AddHtml(55, 85 + i * 25, 200, 25, groups[i].NameString);
|
||||
else
|
||||
AddHtmlLocalized(55, 85 + i * 25, 200, 25, groups[i].Name, false, false);
|
||||
AddHtmlLocalized(55, 85 + i * 25, 200, 25, groups[i].Name);
|
||||
}
|
||||
|
||||
for (int i = 0; i < groups.Length; ++i)
|
||||
|
|
@ -215,4 +215,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
|
|
@ -67,4 +67,4 @@ namespace Server.Items
|
|||
LootType = LootType.Blessed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
|
|
@ -65,4 +65,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ using Server.Gumps;
|
|||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
{
|
||||
public class MetallicHuePicker<T> : Gump
|
||||
{
|
||||
private CustomHuePickerCallback<T> m_Callback;
|
||||
|
|
@ -27,14 +27,14 @@ namespace Server.Items
|
|||
AddBackground(0, 0, 450, 450, 0x13BE);
|
||||
AddBackground(10, 10, 430, 430, 0xBB8);
|
||||
|
||||
AddHtmlLocalized(55, 400, 200, 25, 1011036, false, false); // OKAY
|
||||
AddHtmlLocalized(55, 400, 200, 25, 1011036); // OKAY
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(200, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddButton(200, 400, 4005, 4007, 2);
|
||||
AddLabel(235, 400, 0, "DEFAULT");
|
||||
|
||||
AddHtmlLocalized(55, 25, 200, 25, 1150063, false, false); // Base/Shadow Color
|
||||
AddHtmlLocalized(260, 25, 200, 25, 1150064, false, false); // Highlight Color
|
||||
AddHtmlLocalized(55, 25, 200, 25, 1150063); // Base/Shadow Color
|
||||
AddHtmlLocalized(260, 25, 200, 25, 1150064); // Highlight Color
|
||||
|
||||
for (int row = 0; row < 13; row++)
|
||||
{
|
||||
|
|
@ -74,4 +74,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
|
|
@ -62,4 +62,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
|
|
@ -65,4 +65,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
|
|
@ -61,4 +61,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this, null))
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this))
|
||||
return;
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
|
|
@ -65,4 +65,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue