Formatting FIxes (#58)
This commit is contained in:
parent
57fb9fb525
commit
096d39609e
1318 changed files with 11633 additions and 22129 deletions
|
|
@ -3,10 +3,7 @@
|
|||
// Base class for escorts providing the AwardHumanInNeed option
|
||||
public class BaseEscort : MLQuest
|
||||
{
|
||||
public BaseEscort()
|
||||
{
|
||||
CompletionNotice = CompletionNoticeShort;
|
||||
}
|
||||
public BaseEscort() => CompletionNotice = CompletionNoticeShort;
|
||||
|
||||
public virtual bool AwardHumanInNeed => true;
|
||||
|
||||
|
|
|
|||
|
|
@ -131,10 +131,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
|
||||
public override bool ShowDetailed => false;
|
||||
|
||||
public override bool CheckItem(Item item)
|
||||
{
|
||||
return item is Pitcher pitcher && pitcher.Content == BeverageType.Water && pitcher.Quantity > 0;
|
||||
}
|
||||
public override bool CheckItem(Item item) => item is Pitcher pitcher && pitcher.Content == BeverageType.Water && pitcher.Quantity > 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -413,20 +410,11 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
{
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x82;
|
||||
}
|
||||
public override int GetAttackSound() => 0x82;
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x83;
|
||||
}
|
||||
public override int GetHurtSound() => 0x83;
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x84;
|
||||
}
|
||||
public override int GetDeathSound() => 0x84;
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
|
|
@ -446,10 +434,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
public class BravehornsMate : Hind
|
||||
{
|
||||
[Constructible]
|
||||
public BravehornsMate()
|
||||
{
|
||||
Tamable = false;
|
||||
}
|
||||
public BravehornsMate() => Tamable = false;
|
||||
|
||||
public BravehornsMate(Serial serial)
|
||||
: base(serial)
|
||||
|
|
|
|||
|
|
@ -38,10 +38,8 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
{
|
||||
[Constructible]
|
||||
public BatteredBucket()
|
||||
: base(0x2004, TimeSpan.FromMinutes(10))
|
||||
{
|
||||
: base(0x2004, TimeSpan.FromMinutes(10)) =>
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public BatteredBucket(Serial serial)
|
||||
: base(serial)
|
||||
|
|
|
|||
|
|
@ -1510,10 +1510,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
public class GustarShroud : BaseOuterTorso
|
||||
{
|
||||
[Constructible]
|
||||
public GustarShroud() : base(0x2684)
|
||||
{
|
||||
Hue = 0x479;
|
||||
}
|
||||
public GustarShroud() : base(0x2684) => Hue = 0x479;
|
||||
|
||||
public GustarShroud(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
@ -1988,10 +1985,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
m_SBInfos.Add(new SBNinja());
|
||||
}
|
||||
|
||||
public override bool GetGender()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool GetGender() => false;
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
|
|
@ -2235,10 +2229,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
m_SBInfos.Add(new SBSamurai());
|
||||
}
|
||||
|
||||
public override bool GetGender()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool GetGender() => false;
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -175,10 +175,7 @@ namespace Server.Engines.MLQuests.Definitions
|
|||
{
|
||||
}
|
||||
|
||||
public override bool CheckItem(Item item)
|
||||
{
|
||||
return item.ItemID == 6585; // Only large pieces count
|
||||
}
|
||||
public override bool CheckItem(Item item) => item.ItemID == 6585;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -49,56 +49,6 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
private string m_Title;
|
||||
private List<ButtonInfo> m_Buttons;
|
||||
|
||||
#if false
|
||||
// OSI clone, inefficient layout
|
||||
public BaseQuestGump( int label ) : base( 75, 25 )
|
||||
{
|
||||
m_Page = 0;
|
||||
m_MaxPages = 0;
|
||||
m_Label = label;
|
||||
m_Title = null;
|
||||
m_Buttons = new List<ButtonInfo>( 2 );
|
||||
}
|
||||
|
||||
public void BuildPage()
|
||||
{
|
||||
AddPage( ++m_Page );
|
||||
|
||||
Closable = false;
|
||||
AddImageTiled( 50, 20, 400, 460, 0x1404 );
|
||||
AddImageTiled( 50, 29, 30, 450, 0x28DC );
|
||||
AddImageTiled( 34, 140, 17, 339, 0x242F );
|
||||
AddImage( 48, 135, 0x28AB );
|
||||
AddImage( -16, 285, 0x28A2 );
|
||||
AddImage( 0, 10, 0x28B5 );
|
||||
AddImage( 25, 0, 0x28B4 );
|
||||
AddImageTiled( 83, 15, 350, 15, 0x280A );
|
||||
AddImage( 34, 479, 0x2842 );
|
||||
AddImage( 442, 479, 0x2840 );
|
||||
AddImageTiled( 51, 479, 392, 17, 0x2775 );
|
||||
AddImageTiled( 415, 29, 44, 450, 0xA2D );
|
||||
AddImageTiled( 415, 29, 30, 450, 0x28DC );
|
||||
AddLabel( 100, 50, 0x481, "" );
|
||||
AddImage( 370, 50, 0x589 );
|
||||
AddImage( 379, 60, 0x15A9 );
|
||||
AddImage( 425, 0, 0x28C9 );
|
||||
AddImage( 90, 33, 0x232D );
|
||||
AddHtmlLocalized( 130, 45, 270, 16, m_Label, 0xFFFFFF, false, false );
|
||||
AddImageTiled( 130, 65, 175, 1, 0x238D );
|
||||
|
||||
if ( m_Page > 1 )
|
||||
AddButton( 130, 430, (int)ButtonGraphic.Previous, (int)ButtonGraphic.Previous + 2, 0, GumpButtonType.Page, m_Page - 1 );
|
||||
|
||||
if ( m_Page < m_MaxPages )
|
||||
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, );
|
||||
|
||||
if ( m_Title != null )
|
||||
AddHtmlLocalized( 130, 68, 220, 48, 1114513, m_Title, 0x2710, false, false ); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
}
|
||||
#else
|
||||
// RunUO optimized version
|
||||
public BaseQuestGump(int label)
|
||||
: base(75, 25)
|
||||
|
|
@ -154,7 +104,6 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
if (m_Title != null)
|
||||
AddHtmlLocalized(130, 68, 220, 48, 1114513, m_Title, 0x2710); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
}
|
||||
#endif
|
||||
|
||||
public void SetPageCount(int maxPages)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,10 +75,7 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
PacketHandlers.RegisterExtended(0x2A, true, RaceChangeReply);
|
||||
}
|
||||
|
||||
public static bool IsPending(NetState state)
|
||||
{
|
||||
return state != null && m_Pending.ContainsKey(state);
|
||||
}
|
||||
public static bool IsPending(NetState state) => state != null && m_Pending.ContainsKey(state);
|
||||
|
||||
private static void Offer(IRaceChanger owner, PlayerMobile from, Race targetRace)
|
||||
{
|
||||
|
|
@ -277,10 +274,8 @@ namespace Server.Engines.MLQuests.Gumps
|
|||
{
|
||||
[Constructible]
|
||||
public RaceChangeDeed()
|
||||
: base(0x14F0)
|
||||
{
|
||||
: base(0x14F0) =>
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public RaceChangeDeed(Serial serial)
|
||||
: base(serial)
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class ABauble : Item
|
||||
{
|
||||
[Constructible]
|
||||
public ABauble() : base(0x23B)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public ABauble() : base(0x23B) => LootType = LootType.Blessed;
|
||||
|
||||
public ABauble(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@ namespace Server.Items
|
|||
public class APersonalLetterAddressedToAhie : TransientItem
|
||||
{
|
||||
[Constructible]
|
||||
public APersonalLetterAddressedToAhie() : base(0x14ED, TimeSpan.FromMinutes(30))
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public APersonalLetterAddressedToAhie() : base(0x14ED, TimeSpan.FromMinutes(30)) => LootType = LootType.Blessed;
|
||||
|
||||
public APersonalLetterAddressedToAhie(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class AnOldNecklace : Necklace
|
||||
{
|
||||
[Constructible]
|
||||
public AnOldNecklace()
|
||||
{
|
||||
Hue = 0x222;
|
||||
}
|
||||
public AnOldNecklace() => Hue = 0x222;
|
||||
|
||||
public AnOldNecklace(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class AnOldRing : GoldRing
|
||||
{
|
||||
[Constructible]
|
||||
public AnOldRing()
|
||||
{
|
||||
Hue = 0x222;
|
||||
}
|
||||
public AnOldRing() => Hue = 0x222;
|
||||
|
||||
public AnOldRing(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class AndrosGratitude : SmithHammer
|
||||
{
|
||||
[Constructible]
|
||||
public AndrosGratitude() : base(10)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public AndrosGratitude() : base(10) => LootType = LootType.Blessed;
|
||||
|
||||
public AndrosGratitude(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class BasinOfCrystalClearWater : Item
|
||||
{
|
||||
[Constructible]
|
||||
public BasinOfCrystalClearWater() : base(0x1008)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public BasinOfCrystalClearWater() : base(0x1008) => LootType = LootType.Blessed;
|
||||
|
||||
public BasinOfCrystalClearWater(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,10 +9,8 @@ namespace Server.Engines.MLQuests.Items
|
|||
private static readonly Map MapDest = Map.Malas;
|
||||
|
||||
public BedlamTeleporter()
|
||||
: base(0x124D)
|
||||
{
|
||||
: base(0x124D) =>
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public BedlamTeleporter(Serial serial)
|
||||
: base(serial)
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class Bleach : PigmentsOfTokuno
|
||||
{
|
||||
[Constructible]
|
||||
public Bleach()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public Bleach() => LootType = LootType.Blessed;
|
||||
|
||||
public Bleach(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class BridesLetter : Item
|
||||
{
|
||||
[Constructible]
|
||||
public BridesLetter() : base(0x14ED)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public BridesLetter() : base(0x14ED) => LootType = LootType.Blessed;
|
||||
|
||||
public BridesLetter(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class CompletedTuitionReimbursementForm : Item
|
||||
{
|
||||
[Constructible]
|
||||
public CompletedTuitionReimbursementForm() : base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public CompletedTuitionReimbursementForm() : base(0x14F0) => LootType = LootType.Blessed;
|
||||
|
||||
public CompletedTuitionReimbursementForm(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,10 +8,7 @@ namespace Server.Engines.MLQuests.Items
|
|||
{
|
||||
protected static readonly Type[] m_TalismanType = { typeof(RandomTalisman) };
|
||||
|
||||
public BaseCraftmansSatchel()
|
||||
{
|
||||
Hue = Utility.RandomBrightHue();
|
||||
}
|
||||
public BaseCraftmansSatchel() => Hue = Utility.RandomBrightHue();
|
||||
|
||||
public BaseCraftmansSatchel(Serial serial)
|
||||
: base(serial)
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@ namespace Server.Items
|
|||
public class CrateForSledge : TransientItem
|
||||
{
|
||||
[Constructible]
|
||||
public CrateForSledge() : base(0x1FFF, TimeSpan.FromHours(1))
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public CrateForSledge() : base(0x1FFF, TimeSpan.FromHours(1)) => LootType = LootType.Blessed;
|
||||
|
||||
public CrateForSledge(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class FragmentOfAMap : Item
|
||||
{
|
||||
[Constructible]
|
||||
public FragmentOfAMap() : base(0x14ED)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public FragmentOfAMap() : base(0x14ED) => LootType = LootType.Blessed;
|
||||
|
||||
public FragmentOfAMap(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class FragmentOfAMapDelivery : Item
|
||||
{
|
||||
[Constructible]
|
||||
public FragmentOfAMapDelivery() : base(0x14ED)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public FragmentOfAMapDelivery() : base(0x14ED) => LootType = LootType.Blessed;
|
||||
|
||||
public FragmentOfAMapDelivery(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class FriendsOfTheLibraryApplication : Item
|
||||
{
|
||||
[Constructible]
|
||||
public FriendsOfTheLibraryApplication() : base(0xEC0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public FriendsOfTheLibraryApplication() : base(0xEC0) => LootType = LootType.Blessed;
|
||||
|
||||
public FriendsOfTheLibraryApplication(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class GiftForArielle : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftForArielle() : base(0x1882)
|
||||
{
|
||||
Hue = 0x2C4;
|
||||
}
|
||||
public GiftForArielle() : base(0x1882) => Hue = 0x2C4;
|
||||
|
||||
public GiftForArielle(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class MiniatureMushroom : Food
|
||||
{
|
||||
[Constructible]
|
||||
public MiniatureMushroom() : base(0xD16)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public MiniatureMushroom() : base(0xD16) => LootType = LootType.Blessed;
|
||||
|
||||
public MiniatureMushroom(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class NotarizedApplication : Item
|
||||
{
|
||||
[Constructible]
|
||||
public NotarizedApplication() : base(0x14EF)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public NotarizedApplication() : base(0x14EF) => LootType = LootType.Blessed;
|
||||
|
||||
public NotarizedApplication(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class PeppercornFishsteak : FishSteak
|
||||
{
|
||||
[Constructible]
|
||||
public PeppercornFishsteak()
|
||||
{
|
||||
Hue = 0x222;
|
||||
}
|
||||
public PeppercornFishsteak() => Hue = 0x222;
|
||||
|
||||
public PeppercornFishsteak(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class PortraitOfTheBride : Item
|
||||
{
|
||||
[Constructible]
|
||||
public PortraitOfTheBride() : base(0xE9F)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public PortraitOfTheBride() : base(0xE9F) => LootType = LootType.Blessed;
|
||||
|
||||
public PortraitOfTheBride(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@
|
|||
public class RedLeatherBook : BlueBook
|
||||
{
|
||||
[Constructible]
|
||||
public RedLeatherBook()
|
||||
{
|
||||
Hue = 0x485;
|
||||
}
|
||||
public RedLeatherBook() => Hue = 0x485;
|
||||
|
||||
public RedLeatherBook(Serial serial)
|
||||
: base(serial)
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class ReginasLetter : Item
|
||||
{
|
||||
[Constructible]
|
||||
public ReginasLetter() : base(0x14ED)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public ReginasLetter() : base(0x14ED) => LootType = LootType.Blessed;
|
||||
|
||||
public ReginasLetter(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class ReginasRing : SilverRing
|
||||
{
|
||||
[Constructible]
|
||||
public ReginasRing()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public ReginasRing() => LootType = LootType.Blessed;
|
||||
|
||||
public ReginasRing(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class SealedNotesForJamal : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SealedNotesForJamal() : base(0xEF9)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public SealedNotesForJamal() : base(0xEF9) => LootType = LootType.Blessed;
|
||||
|
||||
public SealedNotesForJamal(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class SealingWaxOrderAddressedToPetrus : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SealingWaxOrderAddressedToPetrus() : base(0xEBF)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public SealingWaxOrderAddressedToPetrus() : base(0xEBF) => LootType = LootType.Blessed;
|
||||
|
||||
public SealingWaxOrderAddressedToPetrus(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class SignedTuitionReimbursementForm : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SignedTuitionReimbursementForm() : base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public SignedTuitionReimbursementForm() : base(0x14F0) => LootType = LootType.Blessed;
|
||||
|
||||
public SignedTuitionReimbursementForm(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@ namespace Server.Items
|
|||
public class SpeckledPoisonSac : TransientItem
|
||||
{
|
||||
[Constructible]
|
||||
public SpeckledPoisonSac() : base(0x23A, TimeSpan.FromHours(1))
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public SpeckledPoisonSac() : base(0x23A, TimeSpan.FromHours(1)) => LootType = LootType.Blessed;
|
||||
|
||||
public SpeckledPoisonSac(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class SpiritBottle : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SpiritBottle() : base(0xEFB)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public SpiritBottle() : base(0xEFB) => LootType = LootType.Blessed;
|
||||
|
||||
public SpiritBottle(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class StoutWhip : Item
|
||||
{
|
||||
[Constructible]
|
||||
public StoutWhip() : base(0x166F)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public StoutWhip() : base(0x166F) => LootType = LootType.Blessed;
|
||||
|
||||
public StoutWhip(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,10 +3,7 @@ namespace Server.Items
|
|||
public class TuitionReimbursementForm : Item
|
||||
{
|
||||
[Constructible]
|
||||
public TuitionReimbursementForm() : base(0xE3A)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
public TuitionReimbursementForm() : base(0xE3A) => LootType = LootType.Blessed;
|
||||
|
||||
public TuitionReimbursementForm(Serial serial) : base(serial)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -101,15 +101,9 @@ namespace Server.Engines.MLQuests
|
|||
Console.WriteLine("INFO: Generating quest: {0}", GetType());
|
||||
}
|
||||
|
||||
public MLQuestInstance CreateInstance(IQuestGiver quester, PlayerMobile pm)
|
||||
{
|
||||
return new MLQuestInstance(this, quester, pm);
|
||||
}
|
||||
public MLQuestInstance CreateInstance(IQuestGiver quester, PlayerMobile pm) => new MLQuestInstance(this, quester, pm);
|
||||
|
||||
public bool CanOffer(IQuestGiver quester, PlayerMobile pm, bool message)
|
||||
{
|
||||
return CanOffer(quester, pm, MLQuestSystem.GetContext(pm), message);
|
||||
}
|
||||
public bool CanOffer(IQuestGiver quester, PlayerMobile pm, bool message) => CanOffer(quester, pm, MLQuestSystem.GetContext(pm), message);
|
||||
|
||||
public virtual bool CanOffer(IQuestGiver quester, PlayerMobile pm, MLQuestContext context, bool message)
|
||||
{
|
||||
|
|
@ -215,10 +209,7 @@ namespace Server.Engines.MLQuests
|
|||
{
|
||||
}
|
||||
|
||||
public virtual TimeSpan GetRestartDelay()
|
||||
{
|
||||
return TimeSpan.FromSeconds(Utility.Random(1, 5) * 30);
|
||||
}
|
||||
public virtual TimeSpan GetRestartDelay() => TimeSpan.FromSeconds(Utility.Random(1, 5) * 30);
|
||||
|
||||
public static void Serialize(GenericWriter writer, MLQuest quest)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -202,10 +202,7 @@ namespace Server.Engines.MLQuests
|
|||
return quest != null && IsDoingQuest(quest);
|
||||
}
|
||||
|
||||
public bool IsDoingQuest(MLQuest quest)
|
||||
{
|
||||
return FindInstance(quest) != null;
|
||||
}
|
||||
public bool IsDoingQuest(MLQuest quest) => FindInstance(quest) != null;
|
||||
|
||||
public void Serialize(GenericWriter writer)
|
||||
{
|
||||
|
|
@ -230,10 +227,7 @@ namespace Server.Engines.MLQuests
|
|||
writer.WriteEncodedInt((int)m_Flags);
|
||||
}
|
||||
|
||||
public bool GetFlag(MLQuestFlag flag)
|
||||
{
|
||||
return (m_Flags & flag) != 0;
|
||||
}
|
||||
public bool GetFlag(MLQuestFlag flag) => (m_Flags & flag) != 0;
|
||||
|
||||
public void SetFlag(MLQuestFlag flag, bool value)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -422,10 +422,7 @@ namespace Server.Engines.MLQuests
|
|||
Quest.OnPlayerDeath(this);
|
||||
}
|
||||
|
||||
private bool GetFlag(MLQuestInstanceFlags flag)
|
||||
{
|
||||
return (m_Flags & flag) != 0;
|
||||
}
|
||||
private bool GetFlag(MLQuestInstanceFlags flag) => (m_Flags & flag) != 0;
|
||||
|
||||
private void SetFlag(MLQuestInstanceFlags flag, bool value)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,15 +5,10 @@ namespace Server.Engines.MLQuests
|
|||
private static MLQuestPersistence m_Instance;
|
||||
|
||||
private MLQuestPersistence()
|
||||
: base(1)
|
||||
{
|
||||
: base(1) =>
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public MLQuestPersistence(Serial serial) : base(serial)
|
||||
{
|
||||
m_Instance = this;
|
||||
}
|
||||
public MLQuestPersistence(Serial serial) : base(serial) => m_Instance = this;
|
||||
|
||||
public override string DefaultName => "ML quests persistence - Internal";
|
||||
|
||||
|
|
|
|||
|
|
@ -36,61 +36,61 @@ namespace Server.Engines.MLQuests
|
|||
Type baseQuesterType = typeof(IQuestGiver);
|
||||
|
||||
if (File.Exists(cfgPath))
|
||||
using (StreamReader sr = new StreamReader(cfgPath))
|
||||
{
|
||||
using StreamReader sr = new StreamReader(cfgPath);
|
||||
string line;
|
||||
|
||||
while ((line = sr.ReadLine()) != null)
|
||||
{
|
||||
string line;
|
||||
if (line.Length == 0 || line.StartsWith("#"))
|
||||
continue;
|
||||
|
||||
while ((line = sr.ReadLine()) != null)
|
||||
string[] split = line.Split('\t');
|
||||
|
||||
Type type = AssemblyHandler.FindTypeByName(split[0]);
|
||||
|
||||
if (type == null || !baseQuestType.IsAssignableFrom(type))
|
||||
{
|
||||
if (line.Length == 0 || line.StartsWith("#"))
|
||||
continue;
|
||||
if (Debug)
|
||||
Console.WriteLine("Warning: {1} quest type '{0}'", split[0],
|
||||
type == null ? "Unknown" : "Invalid");
|
||||
|
||||
string[] split = line.Split('\t');
|
||||
continue;
|
||||
}
|
||||
|
||||
Type type = AssemblyHandler.FindTypeByName(split[0]);
|
||||
MLQuest quest = null;
|
||||
|
||||
if (type == null || !baseQuestType.IsAssignableFrom(type))
|
||||
try
|
||||
{
|
||||
quest = Activator.CreateInstance(type) as MLQuest;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
if (quest == null)
|
||||
continue;
|
||||
|
||||
Register(type, quest);
|
||||
|
||||
for (int i = 1; i < split.Length; ++i)
|
||||
{
|
||||
Type questerType = AssemblyHandler.FindTypeByName(split[i]);
|
||||
|
||||
if (questerType == null || !baseQuesterType.IsAssignableFrom(questerType))
|
||||
{
|
||||
if (Debug)
|
||||
Console.WriteLine("Warning: {1} quest type '{0}'", split[0],
|
||||
type == null ? "Unknown" : "Invalid");
|
||||
Console.WriteLine("Warning: {1} quester type '{0}'", split[i],
|
||||
questerType == null ? "Unknown" : "Invalid");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
MLQuest quest = null;
|
||||
|
||||
try
|
||||
{
|
||||
quest = Activator.CreateInstance(type) as MLQuest;
|
||||
}
|
||||
catch
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
if (quest == null)
|
||||
continue;
|
||||
|
||||
Register(type, quest);
|
||||
|
||||
for (int i = 1; i < split.Length; ++i)
|
||||
{
|
||||
Type questerType = AssemblyHandler.FindTypeByName(split[i]);
|
||||
|
||||
if (questerType == null || !baseQuesterType.IsAssignableFrom(questerType))
|
||||
{
|
||||
if (Debug)
|
||||
Console.WriteLine("Warning: {1} quester type '{0}'", split[i],
|
||||
questerType == null ? "Unknown" : "Invalid");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
RegisterQuestGiver(quest, questerType);
|
||||
}
|
||||
RegisterQuestGiver(quest, questerType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Enabled => Core.ML;
|
||||
|
|
@ -653,10 +653,7 @@ namespace Server.Engines.MLQuests
|
|||
return result;
|
||||
}
|
||||
|
||||
public static List<MLQuest> FindQuestList(Type questerType)
|
||||
{
|
||||
return QuestGivers.TryGetValue(questerType, out List<MLQuest> result) ? result : EmptyList;
|
||||
}
|
||||
public static List<MLQuest> FindQuestList(Type questerType) => QuestGivers.TryGetValue(questerType, out List<MLQuest> result) ? result : EmptyList;
|
||||
|
||||
public class ViewQuestsCommand : BaseCommand
|
||||
{
|
||||
|
|
|
|||
|
|
@ -86,10 +86,7 @@ namespace Server.Engines.MLQuests.Mobiles
|
|||
DenyTalk(from);
|
||||
}
|
||||
|
||||
public virtual bool CanTalkTo(Mobile from)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual bool CanTalkTo(Mobile from) => true;
|
||||
|
||||
public virtual void DenyTalk(Mobile from)
|
||||
{
|
||||
|
|
@ -191,10 +188,7 @@ namespace Server.Engines.MLQuests.Mobiles
|
|||
m_Index = 0;
|
||||
}
|
||||
|
||||
private static TimeSpan GetDelay()
|
||||
{
|
||||
return TimeSpan.FromSeconds(Utility.RandomBool() ? 3 : 4);
|
||||
}
|
||||
private static TimeSpan GetDelay() => TimeSpan.FromSeconds(Utility.RandomBool() ? 3 : 4);
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
|
|
@ -297,10 +291,7 @@ namespace Server.Engines.MLQuests.Mobiles
|
|||
|
||||
public override string DefaultName => "Darius";
|
||||
|
||||
public override bool CanTalkTo(Mobile from)
|
||||
{
|
||||
return from.Race == Race.Human;
|
||||
}
|
||||
public override bool CanTalkTo(Mobile from) => from.Race == Race.Human;
|
||||
|
||||
public override void DenyTalk(Mobile from)
|
||||
{
|
||||
|
|
@ -394,10 +385,7 @@ namespace Server.Engines.MLQuests.Mobiles
|
|||
|
||||
public override string DefaultName => "Nedrick";
|
||||
|
||||
public override bool CanTalkTo(Mobile from)
|
||||
{
|
||||
return from.Race == Race.Elf;
|
||||
}
|
||||
public override bool CanTalkTo(Mobile from) => from.Race == Race.Elf;
|
||||
|
||||
public override void DenyTalk(Mobile from)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,10 +40,7 @@ namespace Server.Engines.MLQuests.Mobiles
|
|||
{
|
||||
}
|
||||
|
||||
public override bool GetGender()
|
||||
{
|
||||
return false; // male
|
||||
}
|
||||
public override bool GetGender() => false;
|
||||
|
||||
public override void CheckMorph()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,17 +9,11 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
public virtual bool IsTimed => false;
|
||||
public virtual TimeSpan Duration => TimeSpan.Zero;
|
||||
|
||||
public virtual bool CanOffer(IQuestGiver quester, PlayerMobile pm, bool message)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual bool CanOffer(IQuestGiver quester, PlayerMobile pm, bool message) => true;
|
||||
|
||||
public abstract void WriteToGump(Gump g, ref int y);
|
||||
|
||||
public virtual BaseObjectiveInstance CreateInstance(MLQuestInstance instance)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
public virtual BaseObjectiveInstance CreateInstance(MLQuestInstance instance) => null;
|
||||
}
|
||||
|
||||
public abstract class BaseObjectiveInstance
|
||||
|
|
@ -63,15 +57,9 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
y += 16;
|
||||
}
|
||||
|
||||
public virtual bool AllowsQuestItem(Item item, Type type)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public virtual bool AllowsQuestItem(Item item, Type type) => false;
|
||||
|
||||
public virtual bool IsCompleted()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public virtual bool IsCompleted() => false;
|
||||
|
||||
public virtual void CheckComplete()
|
||||
{
|
||||
|
|
@ -94,10 +82,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
}
|
||||
|
||||
public virtual bool OnBeforeClaimReward()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual bool OnBeforeClaimReward() => true;
|
||||
|
||||
public virtual void OnClaimReward()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,15 +31,9 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
public virtual bool ShowDetailed => true;
|
||||
|
||||
public bool CheckType(Type type)
|
||||
{
|
||||
return AcceptedType?.IsAssignableFrom(type) == true;
|
||||
}
|
||||
public bool CheckType(Type type) => AcceptedType?.IsAssignableFrom(type) == true;
|
||||
|
||||
public virtual bool CheckItem(Item item)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public virtual bool CheckItem(Item item) => true;
|
||||
|
||||
public static int LabelToItemID(int label)
|
||||
{
|
||||
|
|
@ -78,10 +72,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
y += 32;
|
||||
}
|
||||
|
||||
public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance)
|
||||
{
|
||||
return new CollectObjectiveInstance(this, instance);
|
||||
}
|
||||
public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance) => new CollectObjectiveInstance(this, instance);
|
||||
}
|
||||
|
||||
#region Timed
|
||||
|
|
@ -89,10 +80,8 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
public class TimedCollectObjective : CollectObjective
|
||||
{
|
||||
public TimedCollectObjective(TimeSpan duration, int amount, Type type, TextDefinition name)
|
||||
: base(amount, type, name)
|
||||
{
|
||||
: base(amount, type, name) =>
|
||||
Duration = duration;
|
||||
}
|
||||
|
||||
public override bool IsTimed => true;
|
||||
public override TimeSpan Duration{ get; }
|
||||
|
|
@ -103,10 +92,8 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
public class CollectObjectiveInstance : BaseObjectiveInstance
|
||||
{
|
||||
public CollectObjectiveInstance(CollectObjective objective, MLQuestInstance instance)
|
||||
: base(instance, objective)
|
||||
{
|
||||
: base(instance, objective) =>
|
||||
Objective = objective;
|
||||
}
|
||||
|
||||
public CollectObjective Objective{ get; set; }
|
||||
|
||||
|
|
@ -121,15 +108,9 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
return items.Where(item => item.QuestItem && Objective.CheckItem(item)).Sum(item => item.Amount);
|
||||
}
|
||||
|
||||
public override bool AllowsQuestItem(Item item, Type type)
|
||||
{
|
||||
return Objective.CheckType(type) && Objective.CheckItem(item);
|
||||
}
|
||||
public override bool AllowsQuestItem(Item item, Type type) => Objective.CheckType(type) && Objective.CheckItem(item);
|
||||
|
||||
public override bool IsCompleted()
|
||||
{
|
||||
return GetCurrentTotal() >= Objective.DesiredAmount;
|
||||
}
|
||||
public override bool IsCompleted() => GetCurrentTotal() >= Objective.DesiredAmount;
|
||||
|
||||
public override void OnQuestCancelled()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -86,10 +86,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
y += 16;
|
||||
}
|
||||
|
||||
public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance)
|
||||
{
|
||||
return new DeliverObjectiveInstance(this, instance);
|
||||
}
|
||||
public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance) => new DeliverObjectiveInstance(this, instance);
|
||||
}
|
||||
|
||||
#region Timed
|
||||
|
|
@ -98,10 +95,8 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
public TimedDeliverObjective(TimeSpan duration, Type delivery, int amount, TextDefinition name, Type destination,
|
||||
bool spawnsDelivery = true)
|
||||
: base(delivery, amount, name, destination, spawnsDelivery)
|
||||
{
|
||||
: base(delivery, amount, name, destination, spawnsDelivery) =>
|
||||
Duration = duration;
|
||||
}
|
||||
|
||||
public override bool IsTimed => true;
|
||||
public override TimeSpan Duration{ get; }
|
||||
|
|
@ -112,10 +107,8 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
public class DeliverObjectiveInstance : BaseObjectiveInstance
|
||||
{
|
||||
public DeliverObjectiveInstance(DeliverObjective objective, MLQuestInstance instance)
|
||||
: base(instance, objective)
|
||||
{
|
||||
: base(instance, objective) =>
|
||||
Objective = objective;
|
||||
}
|
||||
|
||||
public DeliverObjective Objective{ get; set; }
|
||||
|
||||
|
|
@ -130,10 +123,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
return destType?.IsAssignableFrom(type) == true;
|
||||
}
|
||||
|
||||
public override bool IsCompleted()
|
||||
{
|
||||
return HasCompleted;
|
||||
}
|
||||
public override bool IsCompleted() => HasCompleted;
|
||||
|
||||
public override void OnQuestAccepted()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,10 +7,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
{
|
||||
public class EscortObjective : BaseObjective
|
||||
{
|
||||
public EscortObjective(QuestArea destination = null)
|
||||
{
|
||||
Destination = destination;
|
||||
}
|
||||
public EscortObjective(QuestArea destination = null) => Destination = destination;
|
||||
|
||||
public QuestArea Destination{ get; set; }
|
||||
|
||||
|
|
@ -99,10 +96,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
|
||||
public override DataType ExtraDataType => DataType.EscortObjective;
|
||||
|
||||
public override bool IsCompleted()
|
||||
{
|
||||
return HasCompleted;
|
||||
}
|
||||
public override bool IsCompleted() => HasCompleted;
|
||||
|
||||
private void CheckDestination()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,15 +71,9 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
y += 16;
|
||||
}
|
||||
|
||||
public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance)
|
||||
{
|
||||
return new GainSkillObjectiveInstance(this, instance);
|
||||
}
|
||||
public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance) => new GainSkillObjectiveInstance(this, instance);
|
||||
|
||||
private bool GetFlag(GainSkillObjectiveFlags flag)
|
||||
{
|
||||
return (m_Flags & flag) != 0;
|
||||
}
|
||||
private bool GetFlag(GainSkillObjectiveFlags flag) => (m_Flags & flag) != 0;
|
||||
|
||||
private void SetFlag(GainSkillObjectiveFlags flag, bool value)
|
||||
{
|
||||
|
|
@ -94,17 +88,12 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
public class GainSkillObjectiveInstance : BaseObjectiveInstance
|
||||
{
|
||||
public GainSkillObjectiveInstance(GainSkillObjective objective, MLQuestInstance instance)
|
||||
: base(instance, objective)
|
||||
{
|
||||
: base(instance, objective) =>
|
||||
Objective = objective;
|
||||
}
|
||||
|
||||
public GainSkillObjective Objective{ get; set; }
|
||||
|
||||
public bool Handles(SkillName skill)
|
||||
{
|
||||
return Objective.Skill == skill;
|
||||
}
|
||||
public bool Handles(SkillName skill) => Objective.Skill == skill;
|
||||
|
||||
public override bool IsCompleted()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -55,10 +55,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
#endregion
|
||||
}
|
||||
|
||||
public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance)
|
||||
{
|
||||
return new KillObjectiveInstance(this, instance);
|
||||
}
|
||||
public override BaseObjectiveInstance CreateInstance(MLQuestInstance instance) => new KillObjectiveInstance(this, instance);
|
||||
}
|
||||
|
||||
#region Timed
|
||||
|
|
@ -66,10 +63,8 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
public class TimedKillObjective : KillObjective
|
||||
{
|
||||
public TimedKillObjective(TimeSpan duration, int amount, Type[] types, TextDefinition name, QuestArea area = null)
|
||||
: base(amount, types, name, area)
|
||||
{
|
||||
: base(amount, types, name, area) =>
|
||||
Duration = duration;
|
||||
}
|
||||
|
||||
public override bool IsTimed => true;
|
||||
public override TimeSpan Duration{ get; }
|
||||
|
|
@ -116,10 +111,7 @@ namespace Server.Engines.MLQuests.Objectives
|
|||
return false;
|
||||
}
|
||||
|
||||
public override bool IsCompleted()
|
||||
{
|
||||
return Slain >= Objective.DesiredAmount;
|
||||
}
|
||||
public override bool IsCompleted() => Slain >= Objective.DesiredAmount;
|
||||
|
||||
public override void WriteToGump(Gump g, ref int y)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,10 +21,7 @@ namespace Server.Engines.MLQuests
|
|||
|
||||
public Map ForceMap{ get; set; }
|
||||
|
||||
public bool Contains(Mobile mob)
|
||||
{
|
||||
return Contains(mob.Region);
|
||||
}
|
||||
public bool Contains(Mobile mob) => Contains(mob.Region);
|
||||
|
||||
public bool Contains(Region reg)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,10 +9,7 @@ namespace Server.Engines.MLQuests
|
|||
private static readonly Type m_Type = typeof(QuesterNameAttribute);
|
||||
private static readonly Dictionary<Type, string> m_Cache = new Dictionary<Type, string>();
|
||||
|
||||
public QuesterNameAttribute(string questerName)
|
||||
{
|
||||
QuesterName = questerName;
|
||||
}
|
||||
public QuesterNameAttribute(string questerName) => QuesterName = questerName;
|
||||
|
||||
public string QuesterName{ get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -6,10 +6,7 @@ namespace Server.Engines.MLQuests.Rewards
|
|||
{
|
||||
public abstract class BaseReward
|
||||
{
|
||||
public BaseReward(TextDefinition name)
|
||||
{
|
||||
Name = name;
|
||||
}
|
||||
public BaseReward(TextDefinition name) => Name = name;
|
||||
|
||||
public TextDefinition Name{ get; set; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue