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
|
|
@ -27,11 +27,7 @@ namespace Server.Engines.Quests
|
|||
{
|
||||
protected List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
|
||||
public BaseQuester() : this(null)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseQuester(string title) : base(title)
|
||||
public BaseQuester(string title = null) : base(title)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -122,4 +118,4 @@ namespace Server.Engines.Quests
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,11 +4,7 @@ namespace Server.Engines.Quests
|
|||
{
|
||||
public abstract class DynamicTeleporter : Item
|
||||
{
|
||||
public DynamicTeleporter() : this(0x1822, 0x482)
|
||||
{
|
||||
}
|
||||
|
||||
public DynamicTeleporter(int itemID, int hue) : base(itemID)
|
||||
public DynamicTeleporter(int itemID = 0x1822, int hue = 0x482) : base(itemID)
|
||||
{
|
||||
Movable = false;
|
||||
Hue = hue;
|
||||
|
|
@ -62,4 +58,4 @@ namespace Server.Engines.Quests
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ namespace Server.Engines.Quests
|
|||
AddImageTiled(35, 150, 120, 100, 9393);
|
||||
AddImage(35, 250, 9396);
|
||||
|
||||
AddHtmlLocalized(110, 60, 200, 20, 1049069, White, false, false); // <STRONG>Conversation Event</STRONG>
|
||||
AddHtmlLocalized(110, 60, 200, 20, 1049069, White); // <STRONG>Conversation Event</STRONG>
|
||||
|
||||
AddImage(65, 14, 10102);
|
||||
AddImageTiled(81, 14, 349, 17, 10101);
|
||||
|
|
@ -94,7 +94,7 @@ namespace Server.Engines.Quests
|
|||
AddImage(75, 58, 9781);
|
||||
AddImage(380, 45, 223);
|
||||
|
||||
AddButton(220, 335, 2313, 2312, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(220, 335, 2313, 2312, 1);
|
||||
AddImage(0, 0, 10440);
|
||||
|
||||
AddPage(1);
|
||||
|
|
@ -106,7 +106,7 @@ namespace Server.Engines.Quests
|
|||
if (i > 0)
|
||||
{
|
||||
AddButton(65, 366, 9909, 9911, 0, GumpButtonType.Page, 1 + i);
|
||||
AddHtmlLocalized(90, 367, 50, 20, 1043354, Black, false, false); // Previous
|
||||
AddHtmlLocalized(90, 367, 50, 20, 1043354, Black); // Previous
|
||||
|
||||
AddPage(1 + i);
|
||||
}
|
||||
|
|
@ -116,7 +116,7 @@ namespace Server.Engines.Quests
|
|||
if (i > 0)
|
||||
{
|
||||
AddButton(420, 366, 9903, 9905, 0, GumpButtonType.Page, i);
|
||||
AddHtmlLocalized(370, 367, 50, 20, 1043353, Black, false, false); // Next
|
||||
AddHtmlLocalized(370, 367, 50, 20, 1043353, Black); // Next
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -135,4 +135,4 @@ namespace Server.Engines.Quests
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,13 +37,13 @@ namespace Server.Engines.Quests
|
|||
AddImageTiled(131, 20, 10, height - 30, 2624);
|
||||
AddAlphaRegion(131, 20, 10, height - 30);
|
||||
|
||||
AddHtmlLocalized(67, 35, 120, 20, 1011233, White, false, false); // INFO
|
||||
AddHtmlLocalized(67, 35, 120, 20, 1011233, White); // INFO
|
||||
|
||||
AddImage(62, 52, 9157);
|
||||
AddImage(72, 52, 9157);
|
||||
AddImage(82, 52, 9157);
|
||||
|
||||
AddButton(25, 31, 1209, 1210, 777, GumpButtonType.Reply, 0);
|
||||
AddButton(25, 31, 1209, 1210, 777);
|
||||
|
||||
AddPage(1);
|
||||
|
||||
|
|
@ -56,4 +56,4 @@ namespace Server.Engines.Quests
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -147,12 +147,12 @@ namespace Server.Engines.Quests
|
|||
|
||||
AddImage(20, 5, 1417);
|
||||
|
||||
AddHtmlLocalized(0, 78, 120, 40, 1049079, White, false, false); // Quest Log Updated
|
||||
AddHtmlLocalized(0, 78, 120, 40, 1049079, White); // Quest Log Updated
|
||||
|
||||
AddImageTiled(0, 78, 120, 40, 2624);
|
||||
AddAlphaRegion(0, 78, 120, 40);
|
||||
|
||||
AddButton(30, 15, 5575, 5576, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(30, 15, 5575, 5576, 1);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
|
|
@ -193,20 +193,20 @@ namespace Server.Engines.Quests
|
|||
AddImage(20, 87, 1231);
|
||||
AddImage(75, 62, 9307);
|
||||
|
||||
AddHtmlLocalized(117, 35, 230, 20, 1046026, Blue, false, false); // Quest Log
|
||||
AddHtmlLocalized(117, 35, 230, 20, 1046026, Blue); // Quest Log
|
||||
|
||||
AddImage(77, 33, 9781);
|
||||
AddImage(65, 110, 2104);
|
||||
|
||||
AddHtmlLocalized(79, 106, 230, 20, 1049073, Blue, false, false); // Objective:
|
||||
AddHtmlLocalized(79, 106, 230, 20, 1049073, Blue); // Objective:
|
||||
|
||||
AddImageTiled(68, 125, 120, 1, 9101);
|
||||
AddImage(65, 240, 2104);
|
||||
|
||||
AddHtmlLocalized(79, 237, 230, 20, 1049076, Blue, false, false); // Progress details:
|
||||
AddHtmlLocalized(79, 237, 230, 20, 1049076, Blue); // Progress details:
|
||||
|
||||
AddImageTiled(68, 255, 120, 1, 9101);
|
||||
AddButton(175, 355, 2313, 2312, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(175, 355, 2313, 2312, 1);
|
||||
|
||||
AddImage(341, 15, 10450);
|
||||
AddImage(341, 330, 10450);
|
||||
|
|
@ -222,7 +222,7 @@ namespace Server.Engines.Quests
|
|||
if (i > 0)
|
||||
{
|
||||
AddButton(55, 346, 9909, 9911, 0, GumpButtonType.Page, 1 + i);
|
||||
AddHtmlLocalized(82, 347, 50, 20, 1043354, White, false, false); // Previous
|
||||
AddHtmlLocalized(82, 347, 50, 20, 1043354, White); // Previous
|
||||
|
||||
AddPage(1 + i);
|
||||
}
|
||||
|
|
@ -233,7 +233,7 @@ namespace Server.Engines.Quests
|
|||
if (i > 0)
|
||||
{
|
||||
AddButton(317, 346, 9903, 9905, 0, GumpButtonType.Page, i);
|
||||
AddHtmlLocalized(278, 347, 50, 20, 1043353, White, false, false); // Next
|
||||
AddHtmlLocalized(278, 347, 50, 20, 1043353, White); // Next
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -252,4 +252,4 @@ namespace Server.Engines.Quests
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -512,34 +512,31 @@ namespace Server.Engines.Quests
|
|||
AddImage(2, 248, 10006);
|
||||
AddImage(2, 2, 10006);
|
||||
|
||||
AddHtmlLocalized(25, 22, 200, 20, 1049000, 32000, false, false); // Confirm Quest Cancellation
|
||||
AddHtmlLocalized(25, 22, 200, 20, 1049000, 32000); // Confirm Quest Cancellation
|
||||
AddImage(25, 40, 3007);
|
||||
|
||||
if (system.IsTutorial)
|
||||
{
|
||||
AddHtmlLocalized(25, 55, 300, 120, 1060836, White, false,
|
||||
false); // This quest will give you valuable information, skills and equipment that will help you advance in the game at a quicker pace.<BR><BR>Are you certain you wish to cancel at this time?
|
||||
AddHtmlLocalized(25, 55, 300, 120, 1060836, White); // This quest will give you valuable information, skills and equipment that will help you advance in the game at a quicker pace.<BR><BR>Are you certain you wish to cancel at this time?
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHtmlLocalized(25, 60, 300, 20, 1049001, White, false, false); // You have chosen to abort your quest:
|
||||
AddHtmlLocalized(25, 60, 300, 20, 1049001, White); // You have chosen to abort your quest:
|
||||
AddImage(25, 81, 0x25E7);
|
||||
AddHtmlObject(48, 80, 280, 20, system.Name, DarkGreen, false, false);
|
||||
|
||||
AddHtmlLocalized(25, 120, 280, 20, 1049002, White, false,
|
||||
false); // Can this quest be restarted after quitting?
|
||||
AddHtmlLocalized(25, 120, 280, 20, 1049002, White); // Can this quest be restarted after quitting?
|
||||
AddImage(25, 141, 0x25E7);
|
||||
AddHtmlLocalized(48, 140, 280, 20, system.RestartDelay < TimeSpan.MaxValue ? 1049016 : 1049017, DarkGreen,
|
||||
false, false); // Yes/No
|
||||
AddHtmlLocalized(48, 140, 280, 20, system.RestartDelay < TimeSpan.MaxValue ? 1049016 : 1049017, DarkGreen); // Yes/No
|
||||
}
|
||||
|
||||
AddRadio(25, 175, 9720, 9723, true, 1);
|
||||
AddHtmlLocalized(60, 180, 280, 20, 1049005, White, false, false); // Yes, I really want to quit!
|
||||
AddHtmlLocalized(60, 180, 280, 20, 1049005, White); // Yes, I really want to quit!
|
||||
|
||||
AddRadio(25, 210, 9720, 9723, false, 0);
|
||||
AddHtmlLocalized(60, 215, 280, 20, 1049006, White, false, false); // No, I don't want to quit.
|
||||
AddHtmlLocalized(60, 215, 280, 20, 1049006, White); // No, I don't want to quit.
|
||||
|
||||
AddButton(265, 220, 247, 248, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(265, 220, 247, 248, 1);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
|
|
@ -565,7 +562,7 @@ namespace Server.Engines.Quests
|
|||
AddAlphaRegion(50, 20, 400, 400);
|
||||
|
||||
AddImage(90, 33, 9005);
|
||||
AddHtmlLocalized(130, 45, 270, 20, 1049010, White, false, false); // Quest Offer
|
||||
AddHtmlLocalized(130, 45, 270, 20, 1049010, White); // Quest Offer
|
||||
AddImageTiled(130, 65, 175, 1, 9101);
|
||||
|
||||
AddImage(140, 110, 1209);
|
||||
|
|
@ -574,12 +571,12 @@ namespace Server.Engines.Quests
|
|||
AddHtmlObject(98, 140, 312, 200, system.OfferMessage, LightGreen, false, true);
|
||||
|
||||
AddRadio(85, 350, 9720, 9723, true, 1);
|
||||
AddHtmlLocalized(120, 356, 280, 20, 1049011, White, false, false); // I accept!
|
||||
AddHtmlLocalized(120, 356, 280, 20, 1049011, White); // I accept!
|
||||
|
||||
AddRadio(85, 385, 9720, 9723, false, 0);
|
||||
AddHtmlLocalized(120, 391, 280, 20, 1049012, White, false, false); // No thanks, I decline.
|
||||
AddHtmlLocalized(120, 391, 280, 20, 1049012, White); // No thanks, I decline.
|
||||
|
||||
AddButton(340, 390, 247, 248, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(340, 390, 247, 248, 1);
|
||||
|
||||
AddImageTiled(50, 29, 30, 390, 10460);
|
||||
AddImageTiled(34, 140, 17, 279, 9263);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue