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
Binary file not shown.
|
|
@ -100,7 +100,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Sandals(0x709));
|
||||
|
|
@ -144,7 +144,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Sandals(Utility.RandomNeutralHue()));
|
||||
|
|
@ -196,7 +196,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Shoes(Utility.RandomNeutralHue()));
|
||||
|
|
@ -227,4 +227,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Sandals(Utility.RandomPinkHue()));
|
||||
|
|
@ -201,4 +201,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1952,7 +1952,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2014,7 +2014,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2077,7 +2077,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2138,7 +2138,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2200,7 +2200,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2261,7 +2261,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2320,7 +2320,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2383,7 +2383,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2442,7 +2442,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2515,7 +2515,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots());
|
||||
AddItem(new FemaleLeafChest());
|
||||
|
|
@ -2570,7 +2570,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2629,7 +2629,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2686,7 +2686,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2758,7 +2758,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2837,7 +2837,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2900,7 +2900,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -2965,7 +2965,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3023,7 +3023,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3088,7 +3088,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3147,7 +3147,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3205,7 +3205,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3254,7 +3254,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3322,7 +3322,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3380,7 +3380,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3445,7 +3445,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3505,7 +3505,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3564,7 +3564,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -3622,7 +3622,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots(0x1BB));
|
||||
|
||||
|
|
@ -3685,7 +3685,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots(0x901));
|
||||
AddItem(new WoodlandBelt());
|
||||
|
|
@ -3746,7 +3746,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ThighBoots(0x127));
|
||||
AddItem(new FemaleElvenRobe(Utility.RandomBrightHue()));
|
||||
|
|
@ -3790,7 +3790,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots(0x1BB));
|
||||
AddItem(new Cloak(0x3B2));
|
||||
|
|
@ -3847,7 +3847,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots(0x72C));
|
||||
AddItem(new FemaleElvenRobe(0x8B0));
|
||||
|
|
@ -3890,7 +3890,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots());
|
||||
AddItem(new Tunic(0x732));
|
||||
|
|
@ -3938,7 +3938,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ThighBoots());
|
||||
AddItem(new ElvenPants(0x58D));
|
||||
|
|
@ -3983,7 +3983,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots());
|
||||
AddItem(new HidePants());
|
||||
|
|
@ -4028,7 +4028,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Sandals(0x715));
|
||||
AddItem(new FemaleElvenRobe(0x742));
|
||||
|
|
@ -4071,7 +4071,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots(0x1BB));
|
||||
AddItem(new MaleElvenRobe(0x47E));
|
||||
|
|
@ -4114,7 +4114,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Shoes(0x75A));
|
||||
AddItem(new FemaleElvenRobe(0x13));
|
||||
|
|
@ -4158,7 +4158,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots(0x3B2));
|
||||
AddItem(new RoyalCirclet());
|
||||
|
|
@ -4208,7 +4208,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Sandals(0x1BB));
|
||||
AddItem(new MaleElvenRobe(0x48F));
|
||||
|
|
@ -4251,7 +4251,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots(0x901));
|
||||
AddItem(new ElvenPants(0x8AB));
|
||||
|
|
@ -4303,7 +4303,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots(0x1BB));
|
||||
|
||||
|
|
@ -4359,7 +4359,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -4410,7 +4410,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -4470,7 +4470,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -4525,7 +4525,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -4579,7 +4579,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -4634,7 +4634,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -4677,4 +4677,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -789,7 +789,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new FancyShirt(Utility.RandomBlueHue()));
|
||||
AddItem(new LongPants(Utility.RandomNondyedHue()));
|
||||
|
|
@ -830,4 +830,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Doublet());
|
||||
|
|
@ -130,7 +130,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new GildedDress());
|
||||
|
|
@ -161,4 +161,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Shoes(Utility.RandomNeutralHue()));
|
||||
AddItem(new Skirt(Utility.RandomBlueHue()));
|
||||
|
|
@ -308,7 +308,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Shoes(Utility.RandomNeutralHue()));
|
||||
AddItem(new LongPants(Utility.RandomBlueHue()));
|
||||
|
|
@ -344,4 +344,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Sandals(Utility.RandomNeutralHue()));
|
||||
|
|
@ -353,4 +353,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Archery, 60.0, 80.0);
|
||||
|
||||
|
|
@ -439,7 +439,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
|
||||
|
|
@ -501,7 +501,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Boots(0x901));
|
||||
|
|
@ -557,7 +557,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Shoes(Utility.RandomNeutralHue()));
|
||||
|
|
@ -609,7 +609,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Blacksmith, 60.0, 80.0);
|
||||
|
||||
|
|
@ -673,7 +673,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Boots(0x901));
|
||||
|
|
@ -726,7 +726,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Boots(0x543));
|
||||
|
|
@ -780,7 +780,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Robe(0x2FD));
|
||||
|
|
@ -832,7 +832,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Boots(0x591));
|
||||
|
|
@ -877,7 +877,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new ThighBoots());
|
||||
|
|
@ -931,7 +931,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Boots(0x901));
|
||||
|
|
@ -987,7 +987,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Boots(0x901));
|
||||
|
|
@ -1036,4 +1036,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -738,7 +738,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -801,7 +801,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -859,7 +859,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -916,7 +916,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -984,7 +984,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -1041,7 +1041,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -1105,7 +1105,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -1164,7 +1164,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -1221,7 +1221,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new ElvenBoots());
|
||||
AddItem(new LeafTonlet());
|
||||
|
|
@ -1267,7 +1267,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -1311,4 +1311,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -495,7 +495,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -553,7 +553,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -620,7 +620,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -680,7 +680,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -724,4 +724,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
SetSkill(SkillName.Meditation, 60.0, 80.0);
|
||||
SetSkill(SkillName.Focus, 60.0, 80.0);
|
||||
|
|
@ -163,4 +163,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Sandals(0x72B));
|
||||
|
|
@ -162,7 +162,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
Hue = Race.RandomSkinHue();
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Utility.AssignRandomHair(this, true);
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Sandals(0x8FD));
|
||||
|
|
@ -193,4 +193,4 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
AddButton( 275, 430, (int)ButtonGraphic.Continue, (int)ButtonGraphic.Continue + 2, 0, GumpButtonType.Page, m_Page + 1 );
|
||||
|
||||
foreach ( ButtonInfo button in m_Buttons )
|
||||
AddButton( button.Position == ButtonPosition.Left ? 95 : 313, 455, (int)button.Graphic, (int)button.Graphic + 2, button.ButtonID, GumpButtonType.Reply, 0 );
|
||||
AddButton( button.Position == ButtonPosition.Left ? 95 : 313, 455, (int)button.Graphic, (int)button.Graphic + 2, button.ButtonID, );
|
||||
|
||||
if ( m_Title != null )
|
||||
AddHtmlLocalized( 130, 68, 220, 48, 1114513, m_Title, 0x2710, false, false ); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
|
|
@ -131,7 +131,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
AddImage(379, 60, 0x15A9);
|
||||
AddImage(425, 0, 0x28C9);
|
||||
AddImage(90, 33, 0x232D);
|
||||
AddHtmlLocalized(130, 45, 270, 16, label, 0xFFFFFF, false, false);
|
||||
AddHtmlLocalized(130, 45, 270, 16, label, 0xFFFFFF);
|
||||
AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
}
|
||||
|
||||
|
|
@ -149,11 +149,10 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
|
||||
foreach (ButtonInfo button in m_Buttons)
|
||||
AddButton(button.Position == ButtonPosition.Left ? 95 : 313, 455, (int)button.Graphic,
|
||||
(int)button.Graphic + 2, button.ButtonID, GumpButtonType.Reply, 0);
|
||||
(int)button.Graphic + 2, button.ButtonID);
|
||||
|
||||
if (m_Title != null)
|
||||
AddHtmlLocalized(130, 68, 220, 48, 1114513, m_Title, 0x2710, false,
|
||||
false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
AddHtmlLocalized(130, 68, 220, 48, 1114513, m_Title, 0x2710); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -179,16 +178,14 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
|
||||
public void AddDescription(MLQuest quest)
|
||||
{
|
||||
AddHtmlLocalized(98, 140, 312, 16, quest.IsChainTriggered || quest.NextQuest != null ? 1075024 : 1072202, 0x2710,
|
||||
false, false); // Description [(quest chain)]
|
||||
AddHtmlLocalized(98, 140, 312, 16, quest.IsChainTriggered || quest.NextQuest != null ? 1075024 : 1072202, 0x2710); // Description [(quest chain)]
|
||||
TextDefinition.AddHtmlText(this, 98, 156, 312, 240, quest.Description, false, true, 0x15F90, 0xBDE784);
|
||||
}
|
||||
|
||||
public void AddObjectives(MLQuest quest)
|
||||
{
|
||||
AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710, false, false); // Objective:
|
||||
AddHtmlLocalized(98, 156, 312, 16, quest.ObjectiveType == ObjectiveType.All ? 1072208 : 1072209, 0x2710, false,
|
||||
false); // All of the following / Only one of the following
|
||||
AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710); // Objective:
|
||||
AddHtmlLocalized(98, 156, 312, 16, quest.ObjectiveType == ObjectiveType.All ? 1072208 : 1072209, 0x2710); // All of the following / Only one of the following
|
||||
|
||||
int y = 172;
|
||||
|
||||
|
|
@ -210,9 +207,8 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
{
|
||||
MLQuest quest = instance.Quest;
|
||||
|
||||
AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710, false, false); // Objective:
|
||||
AddHtmlLocalized(98, 156, 312, 16, quest.ObjectiveType == ObjectiveType.All ? 1072208 : 1072209, 0x2710, false,
|
||||
false); // All of the following / Only one of the following
|
||||
AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710); // Objective:
|
||||
AddHtmlLocalized(98, 156, 312, 16, quest.ObjectiveType == ObjectiveType.All ? 1072208 : 1072209, 0x2710); // All of the following / Only one of the following
|
||||
|
||||
int y = 172;
|
||||
|
||||
|
|
@ -222,14 +218,14 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
|
||||
public void AddRewardsPage(MLQuest quest) // For the quest log/offer gumps
|
||||
{
|
||||
AddHtmlLocalized(98, 140, 312, 16, 1072201, 0x2710, false, false); // Reward
|
||||
AddHtmlLocalized(98, 140, 312, 16, 1072201, 0x2710); // Reward
|
||||
|
||||
int y = 162;
|
||||
|
||||
if (quest.Rewards.Count > 1)
|
||||
{
|
||||
// TODO: Is this what this is for? Does "Only one of the following" occur?
|
||||
AddHtmlLocalized(98, 156, 312, 16, 1072208, 0x2710, false, false); // All of the following
|
||||
AddHtmlLocalized(98, 156, 312, 16, 1072208, 0x2710); // All of the following
|
||||
y += 16;
|
||||
}
|
||||
|
||||
|
|
@ -243,7 +239,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
if (quest.Rewards.Count > 1)
|
||||
{
|
||||
// TODO: Is this what this is for? Does "Only one of the following" occur?
|
||||
AddHtmlLocalized(100, 140, 312, 16, 1072208, 0x2710, false, false); // All of the following
|
||||
AddHtmlLocalized(100, 140, 312, 16, 1072208, 0x2710); // All of the following
|
||||
y += 16;
|
||||
}
|
||||
|
||||
|
|
@ -292,4 +288,4 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
pm.CloseGump<QuestCancelConfirmGump>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,12 +8,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
private bool m_CloseGumps;
|
||||
private MLQuestInstance m_Instance;
|
||||
|
||||
public QuestCancelConfirmGump(MLQuestInstance instance)
|
||||
: this(instance, true)
|
||||
{
|
||||
}
|
||||
|
||||
public QuestCancelConfirmGump(MLQuestInstance instance, bool closeGumps)
|
||||
public QuestCancelConfirmGump(MLQuestInstance instance, bool closeGumps = true)
|
||||
: base(120, 50)
|
||||
{
|
||||
m_Instance = instance;
|
||||
|
|
@ -50,7 +45,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
AddImage(2, 248, 0x2716);
|
||||
AddImage(2, 2, 0x2716);
|
||||
|
||||
AddHtmlLocalized(25, 22, 200, 20, 1049000, 0x7D00, false, false); // Confirm Quest Cancellation
|
||||
AddHtmlLocalized(25, 22, 200, 20, 1049000, 0x7D00); // Confirm Quest Cancellation
|
||||
AddImage(25, 40, 0xBBF);
|
||||
|
||||
/*
|
||||
|
|
@ -60,24 +55,23 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
* <BR>
|
||||
* Are you certain you wish to cancel at this time?
|
||||
*/
|
||||
AddHtmlLocalized(25, 55, 300, 120, 1060836, 0xFFFFFF, false, false);
|
||||
AddHtmlLocalized(25, 55, 300, 120, 1060836, 0xFFFFFF);
|
||||
|
||||
MLQuest quest = instance.Quest;
|
||||
|
||||
if (quest.IsChainTriggered || quest.NextQuest != null)
|
||||
{
|
||||
AddRadio(25, 145, 0x25F8, 0x25FB, false, 2);
|
||||
AddHtmlLocalized(60, 150, 280, 20, 1075023, 0xFFFFFF, false,
|
||||
false); // Yes, I want to quit this entire chain!
|
||||
AddHtmlLocalized(60, 150, 280, 20, 1075023, 0xFFFFFF); // Yes, I want to quit this entire chain!
|
||||
}
|
||||
|
||||
AddRadio(25, 180, 0x25F8, 0x25FB, true, 1);
|
||||
AddHtmlLocalized(60, 185, 280, 20, 1049005, 0xFFFFFF, false, false); // Yes, I really want to quit this quest!
|
||||
AddHtmlLocalized(60, 185, 280, 20, 1049005, 0xFFFFFF); // Yes, I really want to quit this quest!
|
||||
|
||||
AddRadio(25, 215, 0x25F8, 0x25FB, false, 0);
|
||||
AddHtmlLocalized(60, 220, 280, 20, 1049006, 0xFFFFFF, false, false); // No, I don't want to quit.
|
||||
AddHtmlLocalized(60, 220, 280, 20, 1049006, 0xFFFFFF); // No, I don't want to quit.
|
||||
|
||||
AddButton(265, 220, 0xF7, 0xF8, 7, GumpButtonType.Reply, 0);
|
||||
AddButton(265, 220, 0xF7, 0xF8, 7);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
|
|
@ -100,4 +94,4 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,12 +9,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
private bool m_CloseGumps;
|
||||
private MLQuestInstance m_Instance;
|
||||
|
||||
public QuestLogDetailedGump(MLQuestInstance instance)
|
||||
: this(instance, true)
|
||||
{
|
||||
}
|
||||
|
||||
public QuestLogDetailedGump(MLQuestInstance instance, bool closeGumps)
|
||||
public QuestLogDetailedGump(MLQuestInstance instance, bool closeGumps = true)
|
||||
: base(1046026) // Quest Log
|
||||
{
|
||||
m_Instance = instance;
|
||||
|
|
@ -39,7 +34,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
AddDescription(quest);
|
||||
|
||||
if (instance.Failed) // only displayed on the first page
|
||||
AddHtmlLocalized(160, 80, 250, 16, 500039, 0x3C00, false, false); // Failed!
|
||||
AddHtmlLocalized(160, 80, 250, 16, 500039, 0x3C00); // Failed!
|
||||
|
||||
BuildPage();
|
||||
AddObjectivesProgress(instance);
|
||||
|
|
|
|||
|
|
@ -10,12 +10,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
private bool m_CloseGumps;
|
||||
private PlayerMobile m_Owner;
|
||||
|
||||
public QuestLogGump(PlayerMobile pm)
|
||||
: this(pm, true)
|
||||
{
|
||||
}
|
||||
|
||||
public QuestLogGump(PlayerMobile pm, bool closeGumps)
|
||||
public QuestLogGump(PlayerMobile pm, bool closeGumps = true)
|
||||
: base(1046026) // Quest Log
|
||||
{
|
||||
m_Owner = pm;
|
||||
|
|
|
|||
|
|
@ -38,16 +38,14 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
AddBackground(0, 0, 240, 135, 0x2422);
|
||||
|
||||
if (targetRace == Race.Human)
|
||||
AddHtmlLocalized(15, 15, 210, 75, 1073643, 0, false,
|
||||
false); // Are you sure you wish to embrace your humanity?
|
||||
AddHtmlLocalized(15, 15, 210, 75, 1073643, 0); // Are you sure you wish to embrace your humanity?
|
||||
else if (targetRace == Race.Elf)
|
||||
AddHtmlLocalized(15, 15, 210, 75, 1073642, 0, false,
|
||||
false); // Are you sure you want to follow the elven ways?
|
||||
AddHtmlLocalized(15, 15, 210, 75, 1073642, 0); // Are you sure you want to follow the elven ways?
|
||||
else
|
||||
AddHtml(15, 15, 210, 75, $"Are you sure you want to change your race to {targetRace.Name}?", false, false);
|
||||
AddHtml(15, 15, 210, 75, $"Are you sure you want to change your race to {targetRace.Name}?");
|
||||
|
||||
AddButton(160, 95, 0xF7, 0xF8, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(90, 95, 0xF2, 0xF1, 0, GumpButtonType.Reply, 0);
|
||||
AddButton(160, 95, 0xF7, 0xF8, 1);
|
||||
AddButton(90, 95, 0xF2, 0xF1, 0);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
|
|
@ -186,7 +184,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
return;
|
||||
}
|
||||
|
||||
if (!CanChange(pm, targetRace) || owner != null && !owner.CheckComplete(pm))
|
||||
if (!CanChange(pm, targetRace) || owner?.CheckComplete(pm) == false)
|
||||
return;
|
||||
|
||||
int hue = pvSrc.ReadUInt16();
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ namespace Server.Items
|
|||
public class Bleach : PigmentsOfTokuno
|
||||
{
|
||||
[Constructible]
|
||||
public Bleach() : base(PigmentType.None)
|
||||
public Bleach()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,7 @@ namespace Server.Items
|
|||
public class GamanHorns : Item
|
||||
{
|
||||
[Constructible]
|
||||
public GamanHorns() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GamanHorns(int amount) : base(0x1084)
|
||||
public GamanHorns(int amount = 1) : base(0x1084)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Stackable = true;
|
||||
|
|
@ -36,4 +31,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,7 @@ namespace Server.Items
|
|||
public class PixieLeg : ChickenLeg
|
||||
{
|
||||
[Constructible]
|
||||
public PixieLeg() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public PixieLeg(int amount) : base(amount)
|
||||
public PixieLeg(int amount = 1) : base(amount)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 0x1C2;
|
||||
|
|
@ -34,4 +29,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,21 +24,8 @@ namespace Server.Engines.MLQuests.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public List<MLQuest> MLQuests
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_MLQuests == null)
|
||||
{
|
||||
m_MLQuests = MLQuestSystem.FindQuestList(GetType());
|
||||
|
||||
if (m_MLQuests == null)
|
||||
m_MLQuests = MLQuestSystem.EmptyList;
|
||||
}
|
||||
|
||||
return m_MLQuests;
|
||||
}
|
||||
}
|
||||
public List<MLQuest> MLQuests => m_MLQuests ??
|
||||
(m_MLQuests = MLQuestSystem.FindQuestList(GetType()) ?? MLQuestSystem.EmptyList);
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
|
|
@ -101,21 +88,8 @@ namespace Server.Engines.MLQuests.Items
|
|||
|
||||
public override bool Nontransferable => true;
|
||||
|
||||
public List<MLQuest> MLQuests
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_MLQuests == null)
|
||||
{
|
||||
m_MLQuests = MLQuestSystem.FindQuestList(GetType());
|
||||
|
||||
if (m_MLQuests == null)
|
||||
m_MLQuests = MLQuestSystem.EmptyList;
|
||||
}
|
||||
|
||||
return m_MLQuests;
|
||||
}
|
||||
}
|
||||
public List<MLQuest> MLQuests => m_MLQuests ??
|
||||
(m_MLQuests = MLQuestSystem.FindQuestList(GetType()) ?? MLQuestSystem.EmptyList);
|
||||
|
||||
public override void HandleInvalidTransfer(Mobile from)
|
||||
{
|
||||
|
|
@ -163,4 +137,4 @@ namespace Server.Engines.MLQuests.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,7 @@ namespace Server.Items
|
|||
public class SapOfSosaria : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SapOfSosaria() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SapOfSosaria(int amount) : base(0x1848)
|
||||
public SapOfSosaria(int amount = 1) : base(0x1848)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Stackable = true;
|
||||
|
|
@ -35,4 +30,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,7 @@ namespace Server.Items
|
|||
public class SeveredElfEars : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SeveredElfEars() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SeveredElfEars(int amount) : base(Utility.RandomList(0x312D, 0x312E))
|
||||
public SeveredElfEars(int amount = 1) : base(Utility.RandomList(0x312D, 0x312E))
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
|
|
@ -33,4 +28,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,7 @@ namespace Server.Items
|
|||
public class SeveredHumanEars : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SeveredHumanEars() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SeveredHumanEars(int amount) : base(Utility.RandomList(0x312F, 0x3130))
|
||||
public SeveredHumanEars(int amount = 1) : base(Utility.RandomList(0x312F, 0x3130))
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
|
|
@ -33,4 +28,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,18 +10,13 @@ namespace Server.Engines.MLQuests.Items
|
|||
|
||||
[Constructible]
|
||||
public MLQuestTeleporter()
|
||||
: this(Point3D.Zero, null, null, null)
|
||||
: this(Point3D.Zero)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public MLQuestTeleporter(Point3D pointDest, Map mapDest)
|
||||
: this(pointDest, mapDest, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public MLQuestTeleporter(Point3D pointDest, Map mapDest, Type questType, TextDefinition message)
|
||||
public MLQuestTeleporter(
|
||||
Point3D pointDest, Map mapDest = null, Type questType = null, TextDefinition message = null)
|
||||
: base(pointDest, mapDest)
|
||||
{
|
||||
m_QuestType = questType;
|
||||
|
|
@ -110,18 +105,13 @@ namespace Server.Engines.MLQuests.Items
|
|||
|
||||
[Constructible]
|
||||
public TicketTeleporter()
|
||||
: this(Point3D.Zero, null, null, null)
|
||||
: this(Point3D.Zero)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public TicketTeleporter(Point3D pointDest, Map mapDest)
|
||||
: this(pointDest, mapDest, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public TicketTeleporter(Point3D pointDest, Map mapDest, Type ticketType, TextDefinition message)
|
||||
public TicketTeleporter(
|
||||
Point3D pointDest, Map mapDest = null, Type ticketType = null, TextDefinition message = null)
|
||||
: base(pointDest, mapDest)
|
||||
{
|
||||
m_TicketType = ticketType;
|
||||
|
|
@ -154,7 +144,7 @@ namespace Server.Engines.MLQuests.Items
|
|||
|
||||
if (m_TicketType == null)
|
||||
return true;
|
||||
|
||||
|
||||
Container pack = m.Backpack;
|
||||
Item ticket = pack?.FindItemByType(m_TicketType, false) ?? m.Items.Find(item => m_TicketType.IsInstanceOfType(item));
|
||||
|
||||
|
|
@ -201,4 +191,4 @@ namespace Server.Engines.MLQuests.Items
|
|||
Message = TextDefinition.Deserialize(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,7 @@ namespace Server.Items
|
|||
public class UnicornRibs : Item
|
||||
{
|
||||
[Constructible]
|
||||
public UnicornRibs() : this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public UnicornRibs(int amount) : base(0x9F1)
|
||||
public UnicornRibs(int amount = 1) : base(0x9F1)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 0x14B;
|
||||
|
|
@ -36,4 +31,4 @@ namespace Server.Items
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Engines.MLQuests.Gumps;
|
||||
using Server.Engines.MLQuests.Objectives;
|
||||
using Server.Engines.MLQuests.Rewards;
|
||||
|
|
@ -247,12 +248,7 @@ namespace Server.Engines.MLQuests
|
|||
{
|
||||
string name = $"MLQS-{GetType().Name}";
|
||||
|
||||
// Auto cleanup on regeneration
|
||||
List<Item> toDelete = new List<Item>();
|
||||
|
||||
foreach (Item item in map.GetItemsInRange(loc, 0))
|
||||
if (item is Spawner && item.Name == name)
|
||||
toDelete.Add(item);
|
||||
IEnumerable<Item> toDelete = map.GetItemsInRange(loc, 0).Where(item => item is Spawner && item.Name == name);
|
||||
|
||||
foreach (Item item in toDelete)
|
||||
item.Delete();
|
||||
|
|
@ -264,11 +260,7 @@ namespace Server.Engines.MLQuests
|
|||
public void PutDeco(Item deco, Point3D loc, Map map)
|
||||
{
|
||||
// Auto cleanup on regeneration
|
||||
List<Item> toDelete = new List<Item>();
|
||||
|
||||
foreach (Item item in map.GetItemsInRange(loc, 0))
|
||||
if (item.ItemID == deco.ItemID && item.Z == loc.Z)
|
||||
toDelete.Add(item);
|
||||
IEnumerable<Item> toDelete = map.GetItemsInRange(loc, 0).Where(item => item.ItemID == deco.ItemID && item.Z == loc.Z);
|
||||
|
||||
foreach (Item item in toDelete)
|
||||
item.Delete();
|
||||
|
|
@ -278,4 +270,4 @@ namespace Server.Engines.MLQuests
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ namespace Server.Engines.MLQuests
|
|||
{
|
||||
MLQuest quest = MLQuestSystem.ReadQuestRef(reader);
|
||||
|
||||
if (quest != null && quest.IsChainTriggered)
|
||||
if (quest?.IsChainTriggered == true)
|
||||
ChainOffers.Add(quest);
|
||||
}
|
||||
|
||||
|
|
@ -272,4 +272,4 @@ namespace Server.Engines.MLQuests
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ namespace Server.Engines.MLQuests
|
|||
|
||||
public void ClaimRewards()
|
||||
{
|
||||
if (Quest == null || Player == null || Player.Deleted || !ClaimReward || Removed)
|
||||
if (Quest == null || Player?.Deleted != false || !ClaimReward || Removed)
|
||||
return;
|
||||
|
||||
List<Item> rewards = new List<Item>();
|
||||
|
|
@ -400,11 +400,10 @@ namespace Server.Engines.MLQuests
|
|||
|
||||
private void StopTimer()
|
||||
{
|
||||
if (m_Timer != null)
|
||||
{
|
||||
m_Timer.Stop();
|
||||
m_Timer = null;
|
||||
}
|
||||
if (m_Timer == null)
|
||||
return;
|
||||
m_Timer.Stop();
|
||||
m_Timer = null;
|
||||
}
|
||||
|
||||
public void OnQuesterDeleted()
|
||||
|
|
@ -442,10 +441,7 @@ namespace Server.Engines.MLQuests
|
|||
|
||||
MLQuestSystem.WriteQuestRef(writer, Quest);
|
||||
|
||||
if (m_Quester == null || m_Quester.Deleted)
|
||||
writer.Write(Serial.MinusOne);
|
||||
else
|
||||
writer.Write(m_Quester.Serial);
|
||||
writer.Write(m_Quester?.Deleted != false ? Serial.MinusOne : m_Quester.Serial);
|
||||
|
||||
writer.Write(ClaimReward);
|
||||
writer.Write(Objectives.Length);
|
||||
|
|
@ -485,4 +481,4 @@ namespace Server.Engines.MLQuests
|
|||
return instance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ namespace Server.Engines.MLQuests
|
|||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
if (quest == null)
|
||||
|
|
@ -128,7 +129,7 @@ namespace Server.Engines.MLQuests
|
|||
|
||||
if (AutoGenerateNew)
|
||||
foreach (MLQuest quest in Quests.Values)
|
||||
if (quest != null && !quest.Deserialized)
|
||||
if (quest?.Deserialized == false)
|
||||
quest.Generate();
|
||||
|
||||
MLQuestPersistence.EnsureExistence();
|
||||
|
|
@ -555,7 +556,7 @@ namespace Server.Engines.MLQuests
|
|||
|
||||
foreach (MLQuest quest in quests)
|
||||
{
|
||||
if (quest.IsChainTriggered || context != null && context.IsDoingQuest(quest))
|
||||
if (quest.IsChainTriggered || context?.IsDoingQuest(quest) == true)
|
||||
continue;
|
||||
|
||||
/*
|
||||
|
|
@ -569,10 +570,7 @@ namespace Server.Engines.MLQuests
|
|||
m_EligiblePool.Add(quest);
|
||||
}
|
||||
|
||||
if (m_EligiblePool.Count == 0)
|
||||
return fallback;
|
||||
|
||||
return m_EligiblePool[Utility.Random(m_EligiblePool.Count)];
|
||||
return m_EligiblePool.Count == 0 ? fallback : m_EligiblePool[Utility.Random(m_EligiblePool.Count)];
|
||||
}
|
||||
|
||||
public static void TurnToFace(IQuestGiver quester, Mobile mob)
|
||||
|
|
@ -590,7 +588,7 @@ namespace Server.Engines.MLQuests
|
|||
else if (quester is Item item)
|
||||
MessageHelper.SendLocalizedMessageTo(item, pm, cliloc, SpeechColor);
|
||||
else
|
||||
pm.SendLocalizedMessage(cliloc, "", SpeechColor);
|
||||
pm.SendLocalizedMessage(cliloc);
|
||||
}
|
||||
|
||||
public static void Tell(IQuestGiver quester, PlayerMobile pm, int cliloc, string args)
|
||||
|
|
@ -602,7 +600,7 @@ namespace Server.Engines.MLQuests
|
|||
else if (quester is Item item)
|
||||
MessageHelper.SendLocalizedMessageTo(item, pm, cliloc, args, SpeechColor);
|
||||
else
|
||||
pm.SendLocalizedMessage(cliloc, args, SpeechColor);
|
||||
pm.SendLocalizedMessage(cliloc, args);
|
||||
}
|
||||
|
||||
public static void Tell(IQuestGiver quester, PlayerMobile pm, string message)
|
||||
|
|
@ -630,7 +628,7 @@ namespace Server.Engines.MLQuests
|
|||
|
||||
public static void WriteQuestRef(GenericWriter writer, MLQuest quest)
|
||||
{
|
||||
writer.Write(quest != null && quest.SaveEnabled ? quest.GetType().FullName : null);
|
||||
writer.Write(quest?.SaveEnabled == true ? quest.GetType().FullName : null);
|
||||
}
|
||||
|
||||
public static MLQuest ReadQuestRef(GenericReader reader)
|
||||
|
|
@ -709,4 +707,4 @@ namespace Server.Engines.MLQuests
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ namespace Server.Engines.MLQuests.Mobiles
|
|||
|
||||
public void TalkTo(PlayerMobile pm)
|
||||
{
|
||||
if (pm == null || m_Timer != null && m_Timer.Running)
|
||||
if (pm == null || m_Timer?.Running == true)
|
||||
return;
|
||||
|
||||
int completed = CompletedCount(pm);
|
||||
|
|
@ -423,4 +423,4 @@ namespace Server.Engines.MLQuests.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
public static void WriteTimeRemaining(Gump g, ref int y, TimeSpan timeRemaining)
|
||||
{
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1062379, 0x15F90, false, false); // Est. time remaining:
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1062379, 0x15F90); // Est. time remaining:
|
||||
g.AddLabel(223, y, 0x481, timeRemaining.TotalSeconds.ToString("F0"));
|
||||
y += 16;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
|
@ -7,12 +8,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
public class CollectObjective : BaseObjective
|
||||
{
|
||||
public CollectObjective()
|
||||
: this(0, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public CollectObjective(int amount, Type type, TextDefinition name)
|
||||
public CollectObjective(int amount = 0, Type type = null, TextDefinition name = null)
|
||||
{
|
||||
DesiredAmount = amount;
|
||||
AcceptedType = type;
|
||||
|
|
@ -37,7 +33,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
public bool CheckType(Type type)
|
||||
{
|
||||
return AcceptedType != null && AcceptedType.IsAssignableFrom(type);
|
||||
return AcceptedType?.IsAssignableFrom(type) == true;
|
||||
}
|
||||
|
||||
public virtual bool CheckItem(Item item)
|
||||
|
|
@ -58,12 +54,12 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
string amount = DesiredAmount.ToString();
|
||||
|
||||
g.AddHtmlLocalized(98, y, 350, 16, 1072205, 0x15F90, false, false); // Obtain
|
||||
g.AddHtmlLocalized(98, y, 350, 16, 1072205, 0x15F90); // Obtain
|
||||
g.AddLabel(143, y, 0x481, amount);
|
||||
|
||||
if (Name.Number > 0)
|
||||
{
|
||||
g.AddHtmlLocalized(143 + amount.Length * 15, y, 190, 18, Name.Number, 0x77BF, false, false);
|
||||
g.AddHtmlLocalized(143 + amount.Length * 15, y, 190, 18, Name.Number, 0x77BF);
|
||||
g.AddItem(350, y, LabelToItemID(Name.Number));
|
||||
}
|
||||
else if (Name.String != null)
|
||||
|
|
@ -74,7 +70,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
else
|
||||
{
|
||||
if (Name.Number > 0)
|
||||
g.AddHtmlLocalized(98, y, 312, 32, Name.Number, 0x15F90, false, false);
|
||||
g.AddHtmlLocalized(98, y, 312, 32, Name.Number, 0x15F90);
|
||||
else if (Name.String != null)
|
||||
g.AddLabel(98, y, 0x481, Name.String);
|
||||
}
|
||||
|
|
@ -122,13 +118,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
return 0;
|
||||
|
||||
Item[] items = pack.FindItemsByType(Objective.AcceptedType, false); // Note: subclasses are included
|
||||
int total = 0;
|
||||
|
||||
foreach (Item item in items)
|
||||
if (item.QuestItem && Objective.CheckItem(item))
|
||||
total += item.Amount;
|
||||
|
||||
return total;
|
||||
return items.Where(item => item.QuestItem && Objective.CheckItem(item)).Sum(item => item.Amount);
|
||||
}
|
||||
|
||||
public override bool AllowsQuestItem(Item item, Type type)
|
||||
|
|
@ -211,14 +201,14 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
base.WriteToGump(g, ref y);
|
||||
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 3000087, 0x15F90, false, false); // Total
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 3000087, 0x15F90); // Total
|
||||
g.AddLabel(223, y, 0x481, GetCurrentTotal().ToString());
|
||||
y += 16;
|
||||
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1074782, 0x15F90, false, false); // Return to
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1074782, 0x15F90); // Return to
|
||||
g.AddLabel(223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor(Instance.QuesterType));
|
||||
y += 16;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
|
@ -8,12 +9,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
public class DeliverObjective : BaseObjective
|
||||
{
|
||||
public DeliverObjective(Type delivery, int amount, TextDefinition name, Type destination)
|
||||
: this(delivery, amount, name, destination, true)
|
||||
{
|
||||
}
|
||||
|
||||
public DeliverObjective(Type delivery, int amount, TextDefinition name, Type destination, bool spawnsDelivery)
|
||||
public DeliverObjective(Type delivery, int amount, TextDefinition name, Type destination, bool spawnsDelivery = true)
|
||||
{
|
||||
Delivery = delivery;
|
||||
Amount = amount;
|
||||
|
|
@ -69,12 +65,12 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
string amount = Amount.ToString();
|
||||
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072207, 0x15F90, false, false); // Deliver
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072207, 0x15F90); // Deliver
|
||||
g.AddLabel(143, y, 0x481, amount);
|
||||
|
||||
if (Name.Number > 0)
|
||||
{
|
||||
g.AddHtmlLocalized(143 + amount.Length * 15, y, 190, 18, Name.Number, 0x77BF, false, false);
|
||||
g.AddHtmlLocalized(143 + amount.Length * 15, y, 190, 18, Name.Number, 0x77BF);
|
||||
g.AddItem(350, y, CollectObjective.LabelToItemID(Name.Number));
|
||||
}
|
||||
else if (Name.String != null)
|
||||
|
|
@ -84,7 +80,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
y += 32;
|
||||
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1072379, 0x15F90, false, false); // Deliver to
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1072379, 0x15F90); // Deliver to
|
||||
g.AddLabel(223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor(Destination));
|
||||
|
||||
y += 16;
|
||||
|
|
@ -100,13 +96,8 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
public class TimedDeliverObjective : DeliverObjective
|
||||
{
|
||||
public TimedDeliverObjective(TimeSpan duration, Type delivery, int amount, TextDefinition name, Type destination)
|
||||
: this(duration, delivery, amount, name, destination, true)
|
||||
{
|
||||
}
|
||||
|
||||
public TimedDeliverObjective(TimeSpan duration, Type delivery, int amount, TextDefinition name, Type destination,
|
||||
bool spawnsDelivery)
|
||||
bool spawnsDelivery = true)
|
||||
: base(delivery, amount, name, destination, spawnsDelivery)
|
||||
{
|
||||
Duration = duration;
|
||||
|
|
@ -158,12 +149,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
return 0;
|
||||
|
||||
Item[] items = pack.FindItemsByType(Objective.Delivery, false); // Note: subclasses are included
|
||||
int total = 0;
|
||||
|
||||
foreach (Item item in items)
|
||||
total += item.Amount;
|
||||
|
||||
return total;
|
||||
return items.Sum(item => item.Amount);
|
||||
}
|
||||
|
||||
public override bool OnBeforeClaimReward()
|
||||
|
|
@ -240,4 +226,4 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
writer.Write(HasCompleted);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,12 +7,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
public class EscortObjective : BaseObjective
|
||||
{
|
||||
public EscortObjective()
|
||||
: this(null)
|
||||
{
|
||||
}
|
||||
|
||||
public EscortObjective(QuestArea destination)
|
||||
public EscortObjective(QuestArea destination = null)
|
||||
{
|
||||
Destination = destination;
|
||||
}
|
||||
|
|
@ -60,10 +55,10 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
public override void WriteToGump(Gump g, ref int y)
|
||||
{
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072206, 0x15F90, false, false); // Escort to
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072206, 0x15F90); // Escort to
|
||||
|
||||
if (Destination.Name.Number > 0)
|
||||
g.AddHtmlLocalized(173, y, 312, 20, Destination.Name.Number, 0xFFFFFF, false, false);
|
||||
g.AddHtmlLocalized(173, y, 312, 20, Destination.Name.Number, 0xFFFFFF);
|
||||
else if (Destination.Name.String != null)
|
||||
g.AddLabel(173, y, 0x481, Destination.Name.String);
|
||||
|
||||
|
|
@ -212,7 +207,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
MLQuestInstance instance = Instance;
|
||||
PlayerMobile pm = instance.Player;
|
||||
|
||||
if (m_Escort != null && !m_Escort.Deleted)
|
||||
if (m_Escort?.Deleted == false)
|
||||
{
|
||||
if (!pm.Alive)
|
||||
m_Escort.Say(500901); // Ack! My escort has come to haunt me!
|
||||
|
|
@ -268,4 +263,4 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
writer.Write(HasCompleted);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
args = ThresholdFixed % 10 == 0 ? $"#{skillLabel}\t{ThresholdFixed / 10}" : $"#{skillLabel}\t{(double)ThresholdFixed / 10:0.0}";
|
||||
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1077485, args, 0x15F90, false, false); // Increase ~1_SKILL~ to ~2_VALUE~
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1077485, args, 0x15F90); // Increase ~1_SKILL~ to ~2_VALUE~
|
||||
y += 16;
|
||||
}
|
||||
|
||||
|
|
@ -154,7 +154,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
if (IsCompleted())
|
||||
{
|
||||
g.AddHtmlLocalized(113, y, 312, 20, 1055121, 0xFFFFFF, false, false); // Complete
|
||||
g.AddHtmlLocalized(113, y, 312, 20, 1055121, 0xFFFFFF); // Complete
|
||||
y += 16;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,17 +6,9 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
public class KillObjective : BaseObjective
|
||||
{
|
||||
public KillObjective()
|
||||
: this(0, null, null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public KillObjective(int amount, Type[] types, TextDefinition name)
|
||||
: this(amount, types, name, null)
|
||||
{
|
||||
}
|
||||
|
||||
public KillObjective(int amount, Type[] types, TextDefinition name, QuestArea area)
|
||||
public KillObjective(
|
||||
int amount = 0, Type[] types = null, TextDefinition name = null, QuestArea area = null)
|
||||
{
|
||||
DesiredAmount = amount;
|
||||
AcceptedTypes = types;
|
||||
|
|
@ -36,11 +28,11 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
string amount = DesiredAmount.ToString();
|
||||
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072204, 0x15F90, false, false); // Slay
|
||||
g.AddHtmlLocalized(98, y, 312, 16, 1072204, 0x15F90); // Slay
|
||||
g.AddLabel(133, y, 0x481, amount);
|
||||
|
||||
if (Name.Number > 0)
|
||||
g.AddHtmlLocalized(133 + amount.Length * 15, y, 190, 18, Name.Number, 0x77BF, false, false);
|
||||
g.AddHtmlLocalized(133 + amount.Length * 15, y, 190, 18, Name.Number, 0x77BF);
|
||||
else if (Name.String != null)
|
||||
g.AddLabel(133 + amount.Length * 15, y, 0x481, Name.String);
|
||||
|
||||
|
|
@ -50,10 +42,10 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
if (Area != null)
|
||||
{
|
||||
g.AddHtmlLocalized(103, y, 312, 20, 1018327, 0x15F90, false, false); // Location
|
||||
g.AddHtmlLocalized(103, y, 312, 20, 1018327, 0x15F90); // Location
|
||||
|
||||
if (Area.Name.Number > 0)
|
||||
g.AddHtmlLocalized(223, y, 312, 20, Area.Name.Number, 0xFFFFFF, false, false);
|
||||
g.AddHtmlLocalized(223, y, 312, 20, Area.Name.Number, 0xFFFFFF);
|
||||
else if (Area.Name.String != null)
|
||||
g.AddLabel(223, y, 0x481, Area.Name.String);
|
||||
|
||||
|
|
@ -73,12 +65,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
public class TimedKillObjective : KillObjective
|
||||
{
|
||||
public TimedKillObjective(TimeSpan duration, int amount, Type[] types, TextDefinition name)
|
||||
: this(duration, amount, types, name, null)
|
||||
{
|
||||
}
|
||||
|
||||
public TimedKillObjective(TimeSpan duration, int amount, Type[] types, TextDefinition name, QuestArea area)
|
||||
public TimedKillObjective(TimeSpan duration, int amount, Type[] types, TextDefinition name, QuestArea area = null)
|
||||
: base(amount, types, name, area)
|
||||
{
|
||||
Duration = duration;
|
||||
|
|
@ -112,7 +99,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
foreach (Type acceptedType in Objective.AcceptedTypes)
|
||||
if (acceptedType.IsAssignableFrom(type))
|
||||
{
|
||||
if (Objective.Area != null && !Objective.Area.Contains(mob))
|
||||
if (Objective.Area?.Contains(mob) == false)
|
||||
return false;
|
||||
|
||||
PlayerMobile pm = Instance.Player;
|
||||
|
|
@ -140,11 +127,11 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
base.WriteToGump(g, ref y);
|
||||
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 3000087, 0x15F90, false, false); // Total
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 3000087, 0x15F90); // Total
|
||||
g.AddLabel(223, y, 0x481, Slain.ToString());
|
||||
y += 16;
|
||||
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1074782, 0x15F90, false, false); // Return to
|
||||
g.AddHtmlLocalized(103, y, 120, 16, 1074782, 0x15F90); // Return to
|
||||
g.AddLabel(223, y, 0x481, QuesterNameAttribute.GetQuesterNameFor(Instance.QuesterType));
|
||||
y += 16;
|
||||
}
|
||||
|
|
@ -156,4 +143,4 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
writer.Write(Slain);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,12 +4,8 @@ namespace Server.Engines.MLQuests
|
|||
{
|
||||
public class QuestArea
|
||||
{
|
||||
public QuestArea(TextDefinition name, string region)
|
||||
: this(name, region, null)
|
||||
{
|
||||
}
|
||||
|
||||
public QuestArea(TextDefinition name, string region, Map forceMap)
|
||||
public QuestArea(TextDefinition name, string region, Map forceMap = null)
|
||||
{
|
||||
Name = name;
|
||||
RegionName = region;
|
||||
|
|
@ -55,4 +51,4 @@ namespace Server.Engines.MLQuests
|
|||
ForceMap == null ? "-null-" : ForceMap.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,17 +40,7 @@ namespace Server.Engines.MLQuests.Rewards
|
|||
|
||||
private Type m_Type;
|
||||
|
||||
public ItemReward()
|
||||
: this(null, null)
|
||||
{
|
||||
}
|
||||
|
||||
public ItemReward(TextDefinition name, Type type)
|
||||
: this(name, type, 1)
|
||||
{
|
||||
}
|
||||
|
||||
public ItemReward(TextDefinition name, Type type, int amount)
|
||||
public ItemReward(TextDefinition name = null, Type type = null, int amount = 1)
|
||||
: base(name)
|
||||
{
|
||||
m_Type = type;
|
||||
|
|
@ -105,4 +95,4 @@ namespace Server.Engines.MLQuests.Rewards
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue