From f2d44e0283941e991b39cbdd018b5f80db8619f7 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Thu, 27 May 2021 19:50:22 -0700 Subject: [PATCH] fix(codegen): Reverts & Disables codegen (for now) (#625) After speaking with the C# devs, it is clear that code gen is not ready. I can get around this by doing the following: 1. Creating a library 2. Splitting out the schema writing from the source generator 3. Moving the schema loading to `AdditionalFiles` 4. Writing a new post-build application using Roslyn to write the schema files after building. --- .../EntitySerializationGenerator.cs | 7 - .../Rules/ArrayMigrationRule.cs | 10 +- .../Rules/HashSetMigrationRule.cs | 8 +- .../Rules/ListMigrationRule.cs | 8 +- Projects/Server/Server.csproj | 56 +++--- .../Christmas/2010/Addons/FireFliesDeed.cs | 76 ++++++- .../Christmas/2010/Items/AngelDecoration.cs | 22 +- .../Christmas/2010/Items/RockingHorse.cs | 22 +- .../Easter/2011/Items/DragonEasterEgg.cs | 22 +- .../Halloween/2006/Engines/TrickOrTreat.cs | 27 ++- .../Halloween/2006/Items/HalloweenPumpkin.cs | 27 ++- .../Halloween/2006/Items/PumpkinScarecrow.cs | 22 +- .../Halloween/2006/Items/RuinedTapestry.cs | 22 +- .../Halloween/2006/Items/TwilightLantern.cs | 22 +- .../Halloween/2009/Foods/CreepyCake.cs | 23 ++- .../Halloween/2009/Foods/HarvestWine.cs | 27 ++- .../Halloween/2009/Foods/MrPlainsCookies.cs | 22 +- .../Halloween/2009/Foods/MurkyMilk.cs | 26 ++- .../Halloween/2009/Foods/PumpkinPizza.cs | 23 ++- .../Halloween/2009/Items/GrimWarning.cs | 26 ++- .../Halloween/2009/Items/SkullsOnPike.cs | 26 ++- .../2010/Items/ChairInAGhostCostume.cs | 25 ++- .../Halloween/2010/Items/ColoredSmallWebs.cs | 25 ++- .../2010/Items/ExcellentIronMaiden.cs | 25 ++- .../2010/Items/HalloweenGuillotine.cs | 22 +- .../Halloween/2011/Items/BasePaintedMask.cs | 13 +- .../Halloween/2011/Items/ClownMask.cs | 25 ++- .../Halloween/2011/Items/DaemonMask.cs | 22 +- .../Halloween/2011/Items/PlagueMask.cs | 22 +- .../Halloween/2011/Mobiles/PumpkinHead.cs | 20 +- .../Halloween/2012/Engines/PlayerZombies.cs | 5 +- .../Halloween/2012/Items/EvilJesterMask.cs | 25 ++- .../Halloween/2012/Items/PorcelainMask.cs | 25 ++- .../Halloween/HolidaySettings.cs | 9 +- .../Halloween/Treats/Jellybeans.cs | 26 ++- .../Halloween/Treats/Lollipops.cs | 26 ++- .../Halloween/Treats/NougatSwirl.cs | 26 ++- .../Holiday Stuff/Halloween/Treats/Taffy.cs | 26 ++- .../Halloween/Treats/WrappedCandy.cs | 26 ++- .../2010/Items/AnimatedHeartShapedBox.cs | 22 +- .../Valentine/2011/Items/StValentinesBears.cs | 188 ++++++++++++++---- .../Valentine/2012/Items/CupidStatue.cs | 26 ++- .../Valentine/2012/Items/CupidsArrow.cs | 77 +++++-- .../Valentine/2012/Items/HeartShapedBox.cs | 25 ++- .../Server.Engines.Events.NaughtyTwin.v0.json | 5 - ...erver.Items.AnimatedHeartShapedBox.v0.json | 5 - .../Server.Items.ChairInAGhostCostume.v0.json | 5 - .../Server.Items.ColoredSmallWebs.v0.json | 5 - .../Server.Items.CreepyCake.v0.json | 5 - .../Server.Items.CupidStatue.v0.json | 5 - .../Server.Items.CupidsArrow.v0.json | 22 -- .../Server.Items.DragonEasterEgg.v0.json | 5 - .../Server.Items.ExcellentIronMaiden.v0.json | 5 - .../Migrations/Server.Items.Fireflies.v0.json | 5 - .../Server.Items.FirefliesDeed.v0.json | 5 - .../Server.Items.GrimWarning.v0.json | 5 - .../Server.Items.HalloweenGuillotine.v0.json | 5 - .../Server.Items.HalloweenPumpkin.v1.json | 5 - .../Server.Items.HarvestWine.v0.json | 5 - .../Server.Items.HeartShapedBox.v0.json | 5 - ...rver.Items.Holiday.AngelDecoration.v0.json | 5 - ...er.Items.Holiday.PaintedDaemonMask.v0.json | 5 - ...Items.Holiday.PaintedEvilClownMask.v0.json | 5 - ...tems.Holiday.PaintedEvilJesterMask.v0.json | 5 - ...er.Items.Holiday.PaintedPlagueMask.v0.json | 5 - ...Items.Holiday.PaintedPorcelainMask.v0.json | 5 - .../Server.Items.Holiday.RockingHorse.v0.json | 5 - .../Server.Items.JellyBeans.v0.json | 5 - .../Migrations/Server.Items.Lollipops.v0.json | 5 - .../Server.Items.MrPlainsCookies.v0.json | 5 - .../Migrations/Server.Items.MurkyMilk.v0.json | 5 - .../Server.Items.NougatSwirl.v0.json | 5 - .../Server.Items.PumpkinPizza.v0.json | 5 - .../Server.Items.PumpkinScarecrow.v0.json | 5 - .../Server.Items.RuinedTapestry.v0.json | 5 - .../Server.Items.SkullsOnPike.v0.json | 5 - .../Server.Items.StValentinesBear.v0.json | 38 ---- .../Server.Items.StValentinesPanda.v0.json | 5 - ...Server.Items.StValentinesPolarBear.v0.json | 5 - .../Migrations/Server.Items.Taffy.v0.json | 5 - .../Server.Items.TwilightLantern.v0.json | 5 - .../Server.Items.WrappedCandy.v0.json | 5 - .../Server.Mobiles.PumpkinHead.v0.json | 5 - Projects/UOContent/UOContent.csproj | 40 ++-- 84 files changed, 1053 insertions(+), 487 deletions(-) delete mode 100644 Projects/UOContent/Migrations/Server.Engines.Events.NaughtyTwin.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.AnimatedHeartShapedBox.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.ChairInAGhostCostume.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.ColoredSmallWebs.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.CreepyCake.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.CupidStatue.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.CupidsArrow.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.DragonEasterEgg.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.ExcellentIronMaiden.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.Fireflies.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.FirefliesDeed.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.GrimWarning.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.HalloweenGuillotine.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.HalloweenPumpkin.v1.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.HarvestWine.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.HeartShapedBox.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.Holiday.AngelDecoration.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.Holiday.PaintedDaemonMask.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.Holiday.PaintedEvilClownMask.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.Holiday.PaintedEvilJesterMask.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.Holiday.PaintedPlagueMask.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.Holiday.PaintedPorcelainMask.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.Holiday.RockingHorse.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.JellyBeans.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.Lollipops.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.MrPlainsCookies.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.MurkyMilk.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.NougatSwirl.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.PumpkinPizza.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.PumpkinScarecrow.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.RuinedTapestry.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.SkullsOnPike.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.StValentinesBear.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.StValentinesPanda.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.StValentinesPolarBear.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.Taffy.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.TwilightLantern.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Items.WrappedCandy.v0.json delete mode 100644 Projects/UOContent/Migrations/Server.Mobiles.PumpkinHead.v0.json diff --git a/Projects/SerializationGenerator/EntitySerializationGenerator.cs b/Projects/SerializationGenerator/EntitySerializationGenerator.cs index 417ee1f2f..79db7143a 100755 --- a/Projects/SerializationGenerator/EntitySerializationGenerator.cs +++ b/Projects/SerializationGenerator/EntitySerializationGenerator.cs @@ -27,13 +27,6 @@ namespace SerializationGenerator { public void Initialize(GeneratorInitializationContext context) { -#if DEBUG - if (!Debugger.IsAttached) - { - Debugger.Launch(); - } -#endif - context.RegisterForPostInitialization(i => { SerializerSyntaxReceiver.AttributeTypes.Add("Server.SerializableAttribute"); diff --git a/Projects/SerializationGenerator/SerializableMigration/Rules/ArrayMigrationRule.cs b/Projects/SerializationGenerator/SerializableMigration/Rules/ArrayMigrationRule.cs index 3576aff0a..46b64c43c 100644 --- a/Projects/SerializationGenerator/SerializableMigration/Rules/ArrayMigrationRule.cs +++ b/Projects/SerializationGenerator/SerializableMigration/Rules/ArrayMigrationRule.cs @@ -70,7 +70,7 @@ namespace SerializationGenerator Array.Copy(ruleArguments, 2, arrayElementRuleArguments, 0, ruleArguments.Length - 2); var propertyIndex = $"{property.Name}Index"; - source.AppendLine($"{indent}{property.Name} = new {ruleArguments[0]}[reader.ReadEncodedInt()];"); + source.AppendLine($"{indent}{property.Name} = new {ruleArguments[0]}[reader.ReadInt()];"); source.AppendLine($"{indent}for (var {propertyIndex} = 0; {propertyIndex} < {property.Name}.Length; {propertyIndex}++)"); source.AppendLine($"{indent}{{"); @@ -101,9 +101,11 @@ namespace SerializationGenerator var arrayElementRuleArguments = new string[ruleArguments.Length - 2]; Array.Copy(ruleArguments, 2, arrayElementRuleArguments, 0, ruleArguments.Length - 2); - var propertyIndex = $"{property.Name}Index"; - source.AppendLine($"{indent}writer.WriteEncodedInt({property.Name}.Length);"); - source.AppendLine($"{indent}for (var {propertyIndex} = 0; {propertyIndex} < {property.Name}.Length; {propertyIndex}++)"); + var propertyName = property.Name; + var propertyVarPrefix = $"{char.ToLower(propertyName[0])}{propertyName.Substring(1, propertyName.Length - 1)}"; + var propertyIndex = $"{propertyVarPrefix}Index"; + source.AppendLine($"{indent}writer.Write({property.Name}.Length);"); + source.AppendLine($"{indent}for (var {propertyIndex} = 0; {propertyIndex} < {propertyVarPrefix}.Length; {propertyIndex}++)"); source.AppendLine($"{indent}{{"); var serializableArrayElement = new SerializableProperty diff --git a/Projects/SerializationGenerator/SerializableMigration/Rules/HashSetMigrationRule.cs b/Projects/SerializationGenerator/SerializableMigration/Rules/HashSetMigrationRule.cs index 6f9c0836d..53639d085 100644 --- a/Projects/SerializationGenerator/SerializableMigration/Rules/HashSetMigrationRule.cs +++ b/Projects/SerializationGenerator/SerializableMigration/Rules/HashSetMigrationRule.cs @@ -76,12 +76,10 @@ namespace SerializationGenerator var propertyVarPrefix = $"{char.ToLower(propertyName[0])}{propertyName.Substring(1, propertyName.Length - 1)}"; var propertyIndex = $"{propertyVarPrefix}Index"; var propertyEntry = $"{propertyVarPrefix}Entry"; - var propertyCount = $"{propertyVarPrefix}Count"; source.AppendLine($"{indent}{ruleArguments[0]} {propertyEntry};"); - source.AppendLine($"{indent}var {propertyCount} = reader.ReadEncodedInt();"); - source.AppendLine($"{indent}{property.Name} = new System.Collections.Generic.HashSet<{ruleArguments[0]}>({propertyCount});"); - source.AppendLine($"{indent}for (var {propertyIndex} = 0; i < {propertyCount}; {propertyIndex}++)"); + source.AppendLine($"{indent}{propertyName} = new System.Collections.Generic.HashSet<{ruleArguments[0]}>(reader.ReadInt());"); + source.AppendLine($"{indent}for (var {propertyIndex} = 0; i < {propertyName}.Count; {propertyIndex}++)"); source.AppendLine($"{indent}{{"); var serializableSetElement = new SerializableProperty @@ -115,7 +113,7 @@ namespace SerializationGenerator var propertyName = property.Name; var propertyVarPrefix = $"{char.ToLower(propertyName[0])}{propertyName.Substring(1, propertyName.Length - 1)}"; var propertyEntry = $"{propertyVarPrefix}Entry"; - source.AppendLine($"{indent}writer.WriteEncodedInt({property.Name}.Count);"); + source.AppendLine($"{indent}writer.Write({property.Name}.Count);"); source.AppendLine($"{indent}foreach (var {propertyEntry} in {property.Name});"); source.AppendLine($"{indent}{{"); diff --git a/Projects/SerializationGenerator/SerializableMigration/Rules/ListMigrationRule.cs b/Projects/SerializationGenerator/SerializableMigration/Rules/ListMigrationRule.cs index c613c58cb..5d069976f 100644 --- a/Projects/SerializationGenerator/SerializableMigration/Rules/ListMigrationRule.cs +++ b/Projects/SerializationGenerator/SerializableMigration/Rules/ListMigrationRule.cs @@ -76,12 +76,10 @@ namespace SerializationGenerator var propertyVarPrefix = $"{char.ToLower(propertyName[0])}{propertyName.Substring(1, propertyName.Length - 1)}"; var propertyIndex = $"{propertyVarPrefix}Index"; var propertyEntry = $"{propertyVarPrefix}Entry"; - var propertyCount = $"{propertyVarPrefix}Count"; source.AppendLine($"{indent}{ruleArguments[0]} {propertyEntry};"); - source.AppendLine($"{indent}var {propertyCount} = reader.ReadEncodedInt();"); - source.AppendLine($"{indent}{propertyName} = new System.Collections.Generic.List<{ruleArguments[0]}>({propertyCount});"); - source.AppendLine($"{indent}for (var {propertyIndex} = 0; {propertyIndex} < {propertyCount}; {propertyIndex}++)"); + source.AppendLine($"{indent}{propertyName} = new System.Collections.Generic.List<{ruleArguments[0]}>(reader.ReadInt());"); + source.AppendLine($"{indent}for (var {propertyIndex} = 0; {propertyIndex} < {propertyName}.Count; {propertyIndex}++)"); source.AppendLine($"{indent}{{"); var serializableListElement = new SerializableProperty @@ -114,7 +112,7 @@ namespace SerializationGenerator var propertyName = property.Name; var propertyEntry = $"{char.ToLower(propertyName[0])}{propertyName.Substring(1, propertyName.Length - 1)}Entry"; - source.AppendLine($"{indent}writer.WriteEncodedInt({propertyName}.Count);"); + source.AppendLine($"{indent}writer.Write({propertyName}.Count);"); source.AppendLine($"{indent}foreach (var {propertyEntry} in {propertyName})"); source.AppendLine($"{indent}{{"); diff --git a/Projects/Server/Server.csproj b/Projects/Server/Server.csproj index 289e87dde..33988e457 100755 --- a/Projects/Server/Server.csproj +++ b/Projects/Server/Server.csproj @@ -41,32 +41,32 @@ - - - TargetFramework=netstandard2.0 - Analyzer - false - all - - - - - - - - - - - - - - - - - - - - - .\Migrations\ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs b/Projects/UOContent/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs index a3729eac2..c83a6d4ae 100644 --- a/Projects/UOContent/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs +++ b/Projects/UOContent/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs @@ -6,8 +6,7 @@ using Server.Targeting; namespace Server.Items { - [Serializable(0)] - public partial class Fireflies : Item, IAddon + public class Fireflies : Item, IAddon { [Constructible] public Fireflies(int itemID = 0x1596) @@ -17,11 +16,35 @@ namespace Server.Items Movable = false; } + public Fireflies(Serial serial) + : base(serial) + { + } + public override int LabelNumber => 1150061; - public bool FacingSouth => ItemID == 0x2336; + public bool FacingSouth + { + get + { + if (ItemID == 0x2336) + { + return true; + } - public Item Deed => new FirefliesDeed(); + return false; + } + } + + public Item Deed + { + get + { + var deed = new FirefliesDeed(); + + return deed; + } + } public bool CouldFit(IPoint3D p, Map map) { @@ -30,9 +53,12 @@ namespace Server.Items return false; } - return FacingSouth ? - BaseAddon.IsWall(p.X, p.Y - 1, p.Z, map) : - BaseAddon.IsWall(p.X - 1, p.Y, p.Z, map); + if (FacingSouth) + { + return BaseAddon.IsWall(p.X, p.Y - 1, p.Z, map); // north wall + } + + return BaseAddon.IsWall(p.X - 1, p.Y, p.Z, map); // west wall } public override void OnDoubleClick(Mobile from) @@ -58,10 +84,23 @@ namespace Server.Items from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. } } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.WriteEncodedInt(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadEncodedInt(); + } } - [Serializable(0)] - public partial class FirefliesDeed : Item + public class FirefliesDeed : Item { [Constructible] public FirefliesDeed() @@ -71,6 +110,11 @@ namespace Server.Items Weight = 1.0; } + public FirefliesDeed(Serial serial) + : base(serial) + { + } + public override int LabelNumber => 1150061; public override void OnDoubleClick(Mobile from) @@ -99,6 +143,20 @@ namespace Server.Items } } + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.WriteEncodedInt(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadEncodedInt(); + } + private class FacingGump : Gump { private readonly FirefliesDeed m_Deed; diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/AngelDecoration.cs b/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/AngelDecoration.cs index 2242706da..455f9cf42 100644 --- a/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/AngelDecoration.cs +++ b/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/AngelDecoration.cs @@ -1,8 +1,7 @@ namespace Server.Items.Holiday { - [Serializable(0, false)] [TypeAlias("Server.Items.AngelDecoration"), Flippable(0x46FA, 0x46FB)] - public partial class AngelDecoration : Item + public class AngelDecoration : Item { public AngelDecoration() : base(0x46FA) { @@ -10,5 +9,24 @@ Weight = 30; } + + public AngelDecoration(Serial serial) + : base(serial) + { + } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/RockingHorse.cs b/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/RockingHorse.cs index a33fbf70a..1aea4b544 100644 --- a/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/RockingHorse.cs +++ b/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/RockingHorse.cs @@ -1,8 +1,7 @@ namespace Server.Items.Holiday { - [Serializable(0, false)] [TypeAlias("Server.Items.RockingHorse"), Flippable(0x4214, 0x4215)] - public partial class RockingHorse : Item + public class RockingHorse : Item { public RockingHorse() : base(0x4214) { @@ -10,5 +9,24 @@ Weight = 30; } + + public RockingHorse(Serial serial) + : base(serial) + { + } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Easter/2011/Items/DragonEasterEgg.cs b/Projects/UOContent/Holiday Stuff/Easter/2011/Items/DragonEasterEgg.cs index 5d936e8ca..1e2575f53 100644 --- a/Projects/UOContent/Holiday Stuff/Easter/2011/Items/DragonEasterEgg.cs +++ b/Projects/UOContent/Holiday Stuff/Easter/2011/Items/DragonEasterEgg.cs @@ -1,7 +1,6 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class DragonEasterEgg : Item, IDyable + public class DragonEasterEgg : Item, IDyable { [Constructible] public DragonEasterEgg() @@ -9,6 +8,11 @@ { } + public DragonEasterEgg(Serial serial) + : base(serial) + { + } + public override int LabelNumber => 1097278; public bool Dye(Mobile from, DyeTub sender) @@ -22,5 +26,19 @@ return true; } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2006/Engines/TrickOrTreat.cs b/Projects/UOContent/Holiday Stuff/Halloween/2006/Engines/TrickOrTreat.cs index 4ea5d3753..fb4123331 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2006/Engines/TrickOrTreat.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2006/Engines/TrickOrTreat.cs @@ -230,8 +230,7 @@ namespace Server.Engines.Events } } - [Serializable(0, false)] - public partial class NaughtyTwin : BaseCreature + public class NaughtyTwin : BaseCreature { private static readonly Point3D[] Felucca_Locations = { @@ -287,6 +286,11 @@ namespace Server.Engines.Events } } + public NaughtyTwin(Serial serial) + : base(serial) + { + } + public override void OnThink() { if (m_From?.Deleted != false) @@ -300,7 +304,12 @@ namespace Server.Engines.Events Type[] types = { typeof(WrappedCandy), typeof(Lollipops), typeof(NougatSwirl), typeof(Taffy), typeof(JellyBeans) }; - return TrickOrTreat.CheckMobile(target) ? target.Backpack.FindItemByType(types) : null; + if (TrickOrTreat.CheckMobile(target)) + { + return target.Backpack.FindItemByType(types); + } + + return null; } public static void StealCandyOrGate(Mobile target) @@ -336,5 +345,17 @@ namespace Server.Engines.Events _ => Felucca_Locations.RandomElement() }; } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + writer.Write(0); + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/HalloweenPumpkin.cs b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/HalloweenPumpkin.cs index 8acec3394..77a772fba 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/HalloweenPumpkin.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/HalloweenPumpkin.cs @@ -2,16 +2,11 @@ namespace Server.Items { - [Serializable(1, false)] - public partial class HalloweenPumpkin : Item + public class HalloweenPumpkin : Item { private static readonly string[] m_Staff = { - "Owyn", - "Luthius", - "Kamron", - "Jaedan", - "Vorspire" + "Ryan", "Mark", "Eos", "Athena", "Xavier", "Krrios", "Zippy" }; [Constructible] @@ -23,6 +18,11 @@ namespace Server.Items : Utility.RandomList(0xc6a, 0xc6b, 0xc6c); } + public HalloweenPumpkin(Serial serial) + : base(serial) + { + } + public override void OnDoubleClick(Mobile from) { if (!from.InRange(GetWorldLocation(), 2)) @@ -78,8 +78,19 @@ namespace Server.Items return true; } - private void Deserialize(IGenericReader reader, int version) + public override void Serialize(IGenericWriter writer) { + base.Serialize(writer); + + writer.Write(1); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + if (version == 0 && Name == null && ItemID == 0x4698) { AssignRandomName(); diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/PumpkinScarecrow.cs b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/PumpkinScarecrow.cs index 2d27e9e53..b706cc945 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/PumpkinScarecrow.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/PumpkinScarecrow.cs @@ -1,7 +1,6 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class PumpkinScarecrow : Item + public class PumpkinScarecrow : Item { [Constructible] public PumpkinScarecrow() @@ -9,6 +8,25 @@ { } + public PumpkinScarecrow(Serial serial) + : base(serial) + { + } + public override int LabelNumber => 1096947; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/RuinedTapestry.cs b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/RuinedTapestry.cs index af265221c..e253e368c 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/RuinedTapestry.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/RuinedTapestry.cs @@ -1,7 +1,6 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class RuinedTapestry : Item + public class RuinedTapestry : Item { [Constructible] public RuinedTapestry() @@ -9,6 +8,25 @@ { } + public RuinedTapestry(Serial serial) + : base(serial) + { + } + public override string DefaultName => "Ruined Tapestry "; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/TwilightLantern.cs b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/TwilightLantern.cs index 456804a67..1be9fd5e9 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/TwilightLantern.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/TwilightLantern.cs @@ -1,11 +1,15 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class TwilightLantern : Lantern + public class TwilightLantern : Lantern { [Constructible] public TwilightLantern() => Hue = Utility.RandomBool() ? 244 : 997; + public TwilightLantern(Serial serial) + : base(serial) + { + } + public override string DefaultName => "Twilight Lantern"; public override bool AllowEquippedCast(Mobile from) => true; @@ -16,5 +20,19 @@ list.Add(1060482); // Spell Channeling } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/CreepyCake.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/CreepyCake.cs index e644f119f..efbf6a15c 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/CreepyCake.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/CreepyCake.cs @@ -4,12 +4,31 @@ first seen halloween 2009. subsequently in 2010, 2011 and 2012. GM Beggar-only Semi-Rare Treats */ - [Serializable(0, false)] - public partial class CreepyCake : Food + + public class CreepyCake : Food { [Constructible] public CreepyCake() : base(0x9e9, 1) => Hue = 0x3E4; + public CreepyCake(Serial serial) + : base(serial) + { + } + public override string DefaultName => "Creepy Cake"; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/HarvestWine.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/HarvestWine.cs index d657d6dcb..f90775732 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/HarvestWine.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/HarvestWine.cs @@ -4,13 +4,34 @@ first seen halloween 2009. subsequently in 2010, 2011 and 2012. GM Beggar-only Semi-Rare Treats */ - [Serializable(0, false)] - public partial class HarvestWine : BeverageBottle + + public class HarvestWine : BeverageBottle { [Constructible] - public HarvestWine() : base(BeverageType.Wine) => Hue = 0xe0; + public HarvestWine() + : base(BeverageType.Wine) => + Hue = 0xe0; + + public HarvestWine(Serial serial) + : base(serial) + { + } public override string DefaultName => "Harvest Wine"; public override double DefaultWeight => 1; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MrPlainsCookies.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MrPlainsCookies.cs index 74f3cca82..7580e24cd 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MrPlainsCookies.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MrPlainsCookies.cs @@ -1,7 +1,6 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class MrPlainsCookies : Food + public class MrPlainsCookies : Food { [Constructible] public MrPlainsCookies() : base(0x160C, 1) @@ -11,6 +10,25 @@ Hue = 0xF4; } + public MrPlainsCookies(Serial serial) + : base(serial) + { + } + public override string DefaultName => "Mr Plain's Cookies"; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MurkyMilk.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MurkyMilk.cs index 1a93b89fb..a97710af8 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MurkyMilk.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MurkyMilk.cs @@ -4,19 +4,39 @@ first seen halloween 2009. subsequently in 2010, 2011 and 2012. GM Beggar-only Semi-Rare Treats */ - [Serializable(0, false)] - public partial class MurkyMilk : Pitcher + + public class MurkyMilk : Pitcher { [Constructible] - public MurkyMilk() : base(BeverageType.Milk) + public MurkyMilk() + : base(BeverageType.Milk) { Hue = 0x3e5; Quantity = MaxQuantity; ItemID = Utility.RandomBool() ? 0x09F0 : 0x09AD; } + public MurkyMilk(Serial serial) + : base(serial) + { + } + public override string DefaultName => "Murky Milk"; public override int MaxQuantity => 5; public override double DefaultWeight => 1; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/PumpkinPizza.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/PumpkinPizza.cs index 29c02dcbc..971f1509e 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/PumpkinPizza.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/PumpkinPizza.cs @@ -4,12 +4,31 @@ first seen halloween 2009. subsequently in 2010, 2011 and 2012. GM Beggar-only Semi-Rare Treats */ - [Serializable(0, false)] - public partial class PumpkinPizza : CheesePizza + + public class PumpkinPizza : CheesePizza { [Constructible] public PumpkinPizza() => Hue = 0xF3; + public PumpkinPizza(Serial serial) + : base(serial) + { + } + public override string DefaultName => "Pumpkin Pizza"; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/GrimWarning.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/GrimWarning.cs index 9376063eb..a25f057d0 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/GrimWarning.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/GrimWarning.cs @@ -4,14 +4,34 @@ first seen halloween 2009. subsequently in 2010, 2011 and 2012. GM Beggar-only Semi-Rare Treats */ - [Serializable(0, false)] - public partial class GrimWarning : Item + + public class GrimWarning : Item { [Constructible] - public GrimWarning() : base(0x42BD) + public GrimWarning() + : base(0x42BD) + { + } + + public GrimWarning(Serial serial) + : base(serial) { } public override double DefaultWeight => 1; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/SkullsOnPike.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/SkullsOnPike.cs index e391394fc..1dd0b85aa 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/SkullsOnPike.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/SkullsOnPike.cs @@ -4,14 +4,34 @@ first seen halloween 2009. subsequently in 2010, 2011 and 2012. GM Beggar-only Semi-Rare Treats */ - [Serializable(0, false)] - public partial class SkullsOnPike : Item + + public class SkullsOnPike : Item { [Constructible] - public SkullsOnPike() : base(0x42B5) + public SkullsOnPike() + : base(0x42B5) + { + } + + public SkullsOnPike(Serial serial) + : base(serial) { } public override double DefaultWeight => 1; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ChairInAGhostCostume.cs b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ChairInAGhostCostume.cs index 73a5981b1..07c9dee6c 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ChairInAGhostCostume.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ChairInAGhostCostume.cs @@ -1,13 +1,32 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class ChairInAGhostCostume : Item + public class ChairInAGhostCostume : Item { [Constructible] - public ChairInAGhostCostume() : base(0x3F26) + public ChairInAGhostCostume() + : base(0x3F26) + { + } + + public ChairInAGhostCostume(Serial serial) + : base(serial) { } public override double DefaultWeight => 5; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ColoredSmallWebs.cs b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ColoredSmallWebs.cs index d4dec3a11..d0c7e06b3 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ColoredSmallWebs.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ColoredSmallWebs.cs @@ -1,12 +1,31 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class ColoredSmallWebs : Item + public class ColoredSmallWebs : Item { [Constructible] - public ColoredSmallWebs() : base(Utility.RandomBool() ? 0x10d6 : 0x10d7) => + public ColoredSmallWebs() + : base(Utility.RandomBool() ? 0x10d6 : 0x10d7) => Hue = Utility.RandomBool() ? 0x455 : 0x4E9; + public ColoredSmallWebs(Serial serial) + : base(serial) + { + } + public override double DefaultWeight => 5; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ExcellentIronMaiden.cs b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ExcellentIronMaiden.cs index 502eb1755..f67b95b25 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ExcellentIronMaiden.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ExcellentIronMaiden.cs @@ -1,13 +1,32 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class ExcellentIronMaiden : Item + public class ExcellentIronMaiden : Item { [Constructible] - public ExcellentIronMaiden() : base(0x3f15) + public ExcellentIronMaiden() + : base(0x3f15) + { + } + + public ExcellentIronMaiden(Serial serial) + : base(serial) { } public override double DefaultWeight => 5; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/HalloweenGuillotine.cs b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/HalloweenGuillotine.cs index 6effbfe54..349123540 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/HalloweenGuillotine.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/HalloweenGuillotine.cs @@ -1,13 +1,31 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class HalloweenGuillotine : Item + public class HalloweenGuillotine : Item { [Constructible] public HalloweenGuillotine() : base(0x3F27) { } + public HalloweenGuillotine(Serial serial) + : base(serial) + { + } + public override double DefaultWeight => 5; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs index e1edd6e05..91db7652c 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs @@ -7,14 +7,15 @@ namespace Server.Items.Holiday { private static readonly string[] m_Staffers = { - "Owyn", - "Luthius", - "Kamron", - "Jaedan", - "Vorspire" + "Ryan", + "Mark", + "Krrios", + "Zippy", + "Athena", + "Eos", + "Xavier" }; - // Todo: Requires private-only modifiers private string m_Staffer; public BasePaintedMask(int itemid) : this(m_Staffers.RandomElement(), itemid) diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/ClownMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/ClownMask.cs index 6d3819aea..2618a0c28 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/ClownMask.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/ClownMask.cs @@ -1,13 +1,32 @@ namespace Server.Items.Holiday { - [Serializable(0, false)] - public partial class PaintedEvilClownMask : BasePaintedMask + public class PaintedEvilClownMask : BasePaintedMask { [Constructible] - public PaintedEvilClownMask() : base(0x4a90) + public PaintedEvilClownMask() + : base(0x4a90) + { + } + + public PaintedEvilClownMask(Serial serial) + : base(serial) { } public override string MaskName => "Evil Clown Mask"; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/DaemonMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/DaemonMask.cs index e94e9b598..bcd867f69 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/DaemonMask.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/DaemonMask.cs @@ -1,7 +1,6 @@ namespace Server.Items.Holiday { - [Serializable(0, false)] - public partial class PaintedDaemonMask : BasePaintedMask + public class PaintedDaemonMask : BasePaintedMask { [Constructible] public PaintedDaemonMask() @@ -9,6 +8,25 @@ { } + public PaintedDaemonMask(Serial serial) + : base(serial) + { + } + public override string MaskName => "Daemon Mask"; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/PlagueMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/PlagueMask.cs index ff03d1bcb..f8eb3d1bf 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/PlagueMask.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/PlagueMask.cs @@ -1,7 +1,6 @@ namespace Server.Items.Holiday { - [Serializable(0, false)] - public partial class PaintedPlagueMask : BasePaintedMask + public class PaintedPlagueMask : BasePaintedMask { [Constructible] public PaintedPlagueMask() @@ -9,6 +8,25 @@ { } + public PaintedPlagueMask(Serial serial) + : base(serial) + { + } + public override string MaskName => "Plague Mask"; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2011/Mobiles/PumpkinHead.cs b/Projects/UOContent/Holiday Stuff/Halloween/2011/Mobiles/PumpkinHead.cs index 814eb1a5b..e1ac7c6b8 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2011/Mobiles/PumpkinHead.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2011/Mobiles/PumpkinHead.cs @@ -4,8 +4,7 @@ using Server.Items.Holiday; namespace Server.Mobiles { - [Serializable(0, false)] - public partial class PumpkinHead : BaseCreature + public class PumpkinHead : BaseCreature { [Constructible] public PumpkinHead() @@ -48,6 +47,11 @@ namespace Server.Mobiles VirtualArmor = 49; } + public PumpkinHead(Serial serial) + : base(serial) + { + } + public override string CorpseName => "a killer pumpkin corpse"; public override bool AutoDispel => true; public override bool BardImmune => true; @@ -115,5 +119,17 @@ namespace Server.Mobiles base.OnDamage(amount, from, willKill); } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + writer.Write(0); + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs b/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs index aa261e8ee..385312dab 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs @@ -175,9 +175,8 @@ namespace Server.Engines.Events public class ZombieSkeleton : BaseCreature { - private const string _name = "Zombie Skeleton"; + private static readonly string m_Name = "Zombie Skeleton"; - // TODO: Requires private modifier private PlayerMobile m_DeadPlayer; public ZombieSkeleton(PlayerMobile player = null) @@ -185,7 +184,7 @@ namespace Server.Engines.Events { m_DeadPlayer = player; - Name = player != null ? $"{player.Name}'s {_name}" : _name; + Name = player != null ? $"{player.Name}'s {m_Name}" : m_Name; Body = 0x93; BaseSoundID = 0x1c3; diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/EvilJesterMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/EvilJesterMask.cs index ac7e9d8ea..78fadd5ab 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/EvilJesterMask.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/EvilJesterMask.cs @@ -1,13 +1,32 @@ namespace Server.Items.Holiday { - [Serializable(0, false)] - public partial class PaintedEvilJesterMask : BasePaintedMask + public class PaintedEvilJesterMask : BasePaintedMask { [Constructible] - public PaintedEvilJesterMask() : base(0x4BA5) + public PaintedEvilJesterMask() + : base(0x4BA5) + { + } + + public PaintedEvilJesterMask(Serial serial) + : base(serial) { } public override string MaskName => "Evil Jester Mask"; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/PorcelainMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/PorcelainMask.cs index 630fa6aba..be726de42 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/PorcelainMask.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/PorcelainMask.cs @@ -1,13 +1,32 @@ namespace Server.Items.Holiday { - [Serializable(0, false)] - public partial class PaintedPorcelainMask : BasePaintedMask + public class PaintedPorcelainMask : BasePaintedMask { [Constructible] - public PaintedPorcelainMask() : base(0x4BA7) + public PaintedPorcelainMask() + : base(0x4BA7) + { + } + + public PaintedPorcelainMask(Serial serial) + : base(serial) { } public override string MaskName => "Porcelain Mask"; + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(1); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs b/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs index 05b39d443..8e00fe9bc 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs @@ -30,12 +30,13 @@ namespace Server.Events.Halloween typeof(NougatSwirl) }; - // YY MM DD - public static DateTime StartHalloween => new(2021, 10, 24); + public static DateTime StartHalloween // YY MM DD + => new(2012, 10, 24); - public static DateTime FinishHalloween => new(2021, 11, 15); + public static DateTime FinishHalloween => new(2012, 11, 15); - public static Item RandomGMBeggerItem => m_GMBeggarTreats.RandomElement().CreateInstance(); + public static Item RandomGMBeggerItem => + m_GMBeggarTreats.RandomElement().CreateInstance(); public static Item RandomTreat => m_Treats.RandomElement().CreateInstance(); } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Jellybeans.cs b/Projects/UOContent/Holiday Stuff/Halloween/Treats/Jellybeans.cs index 5e6d763c8..c3a21e483 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Jellybeans.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/Treats/Jellybeans.cs @@ -1,11 +1,31 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class JellyBeans : CandyCane + public class JellyBeans : CandyCane { [Constructible] - public JellyBeans(int amount = 1) : base(0x468C) => Stackable = true; + public JellyBeans(int amount = 1) + : base(0x468C) => + Stackable = true; + + public JellyBeans(Serial serial) + : base(serial) + { + } public override int LabelNumber => 1096932; /* jellybeans */ + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Lollipops.cs b/Projects/UOContent/Holiday Stuff/Halloween/Treats/Lollipops.cs index a768fff99..e60b54772 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Lollipops.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/Treats/Lollipops.cs @@ -1,10 +1,30 @@ namespace Server.Items { [TypeAlias("Server.Items.Lollipop")] - [Serializable(0, false)] - public partial class Lollipops : CandyCane + public class Lollipops : CandyCane { [Constructible] - public Lollipops(int amount = 1) : base(0x468D + Utility.Random(3)) => Stackable = true; + public Lollipops(int amount = 1) + : base(0x468D + Utility.Random(3)) => + Stackable = true; + + public Lollipops(Serial serial) + : base(serial) + { + } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/Treats/NougatSwirl.cs b/Projects/UOContent/Holiday Stuff/Halloween/Treats/NougatSwirl.cs index eb9942868..320fd76ef 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/Treats/NougatSwirl.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/Treats/NougatSwirl.cs @@ -1,11 +1,31 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class NougatSwirl : CandyCane + public class NougatSwirl : CandyCane { [Constructible] - public NougatSwirl(int amount = 1) : base(0x4690) => Stackable = true; + public NougatSwirl(int amount = 1) + : base(0x4690) => + Stackable = true; + + public NougatSwirl(Serial serial) + : base(serial) + { + } public override int LabelNumber => 1096936; /* nougat swirl */ + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Taffy.cs b/Projects/UOContent/Holiday Stuff/Halloween/Treats/Taffy.cs index 2b2571604..12ee251cf 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Taffy.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/Treats/Taffy.cs @@ -1,11 +1,31 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class Taffy : CandyCane + public class Taffy : CandyCane { [Constructible] - public Taffy(int amount = 1) : base(0x469D) => Stackable = true; + public Taffy(int amount = 1) + : base(0x469D) => + Stackable = true; + + public Taffy(Serial serial) + : base(serial) + { + } public override int LabelNumber => 1096949; /* taffy */ + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Halloween/Treats/WrappedCandy.cs b/Projects/UOContent/Holiday Stuff/Halloween/Treats/WrappedCandy.cs index eb86ac43d..0a70610c1 100644 --- a/Projects/UOContent/Holiday Stuff/Halloween/Treats/WrappedCandy.cs +++ b/Projects/UOContent/Holiday Stuff/Halloween/Treats/WrappedCandy.cs @@ -1,11 +1,31 @@ namespace Server.Items { - [Serializable(0, false)] - public partial class WrappedCandy : CandyCane + public class WrappedCandy : CandyCane { [Constructible] - public WrappedCandy(int amount = 1) : base(0x469e) => Stackable = true; + public WrappedCandy(int amount = 1) + : base(0x469e) => + Stackable = true; + + public WrappedCandy(Serial serial) + : base(serial) + { + } public override int LabelNumber => 1096950; /* wrapped candy */ + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Valentine/2010/Items/AnimatedHeartShapedBox.cs b/Projects/UOContent/Holiday Stuff/Valentine/2010/Items/AnimatedHeartShapedBox.cs index e9e320e0c..30dd26702 100644 --- a/Projects/UOContent/Holiday Stuff/Valentine/2010/Items/AnimatedHeartShapedBox.cs +++ b/Projects/UOContent/Holiday Stuff/Valentine/2010/Items/AnimatedHeartShapedBox.cs @@ -1,10 +1,28 @@ namespace Server.Items { - [Serializable(0, false)] [Flippable(0x49CC, 0x49D0)] - public partial class AnimatedHeartShapedBox : HeartShapedBox + public class AnimatedHeartShapedBox : HeartShapedBox { [Constructible] public AnimatedHeartShapedBox() => ItemID = 0x49CC; + + public AnimatedHeartShapedBox(Serial serial) + : base(serial) + { + } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs b/Projects/UOContent/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs index f7e77b081..0d63edd82 100644 --- a/Projects/UOContent/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs +++ b/Projects/UOContent/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs @@ -4,62 +4,104 @@ using Server.Network; namespace Server.Items { - [Serializable(0, false)] - public abstract partial class StValentinesBear : Item + public abstract class StValentinesBear : Item { - [InternString] - [InvalidateProperties] - [SerializableField(0)] - [SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")] - private string _owner; + private string m_Line1; + private string m_Line2; + private string m_Line3; - [InternString] - [InvalidateProperties] - [SerializableField(1)] - [SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")] - private string _line1; + private string m_Owner; - [InternString] - [InvalidateProperties] - [SerializableField(2)] - [SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")] - private string _line2; - - [InternString] - [InvalidateProperties] - [SerializableField(3)] - [SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")] - private string _line3; - - public StValentinesBear(int itemid, string name) : base(itemid) + public StValentinesBear(int itemid, string name) + : base(itemid) { - _owner = name; + m_Owner = name; LootType = LootType.Blessed; } - public override string DefaultName => _owner != null ? $"{_owner}'s St. Valentine Bear" : "St. Valentine Bear"; + public StValentinesBear(Serial serial) + : base(serial) + { + } + + public override string DefaultName + { + get + { + if (m_Owner != null) + { + return $"{m_Owner}'s St. Valentine Bear"; + } + + return "St. Valentine Bear"; + } + } + + [CommandProperty(AccessLevel.GameMaster)] + public string Owner + { + get => m_Owner; + set + { + m_Owner = value; + InvalidateProperties(); + } + } + + [CommandProperty(AccessLevel.GameMaster)] + public string Line1 + { + get => m_Line1; + set + { + m_Line1 = value; + InvalidateProperties(); + } + } + + [CommandProperty(AccessLevel.GameMaster)] + public string Line2 + { + get => m_Line2; + set + { + m_Line2 = value; + InvalidateProperties(); + } + } + + [CommandProperty(AccessLevel.GameMaster)] + public string Line3 + { + get => m_Line3; + set + { + m_Line3 = value; + InvalidateProperties(); + } + } [CommandProperty(AccessLevel.GameMaster)] public DateTime EditLimit { get; set; } - public bool IsSigned => _line1 != null || _line2 != null || _line3 != null; + public bool IsSigned => m_Line1 != null || m_Line2 != null || m_Line3 != null; public bool CanSign => !IsSigned || Core.Now <= EditLimit; public override void AddNameProperty(ObjectPropertyList list) { - if (_owner != null) + if (m_Owner != null) { - list.Add(1150295, _owner); // ~1_NAME~'s St. Valentine Bear + list.Add(1150295, m_Owner); // ~1_NAME~'s St. Valentine Bear } else { list.Add(1150294); // St. Valentine Bear } - AddLine(list, 1150301, _line1); // [ ~1_LINE0~ ] - AddLine(list, 1150302, _line2); // [ ~1_LINE1~ ] - AddLine(list, 1150303, _line3); // [ ~1_LINE2~ ] + AddLine(list, 1150301, m_Line1); // [ ~1_LINE0~ ] + AddLine(list, 1150302, m_Line2); // [ ~1_LINE1~ ] + AddLine(list, 1150303, m_Line3); // [ ~1_LINE2~ ] } private static void AddLine(ObjectPropertyList list, int cliloc, string line) @@ -74,9 +116,9 @@ namespace Server.Items { base.OnSingleClick(from); - ShowLine(from, 1150301, _line1); // [ ~1_LINE0~ ] - ShowLine(from, 1150302, _line2); // [ ~1_LINE1~ ] - ShowLine(from, 1150303, _line3); // [ ~1_LINE2~ ] + ShowLine(from, 1150301, m_Line1); // [ ~1_LINE0~ ] + ShowLine(from, 1150302, m_Line2); // [ ~1_LINE1~ ] + ShowLine(from, 1150303, m_Line3); // [ ~1_LINE2~ ] } private void ShowLine(Mobile from, int cliloc, string line) @@ -103,6 +145,30 @@ namespace Server.Items from.SendGump(new InternalGump(this)); } + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); + + writer.Write(m_Owner); + writer.Write(m_Line1); + writer.Write(m_Line2); + writer.Write(m_Line3); + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + + m_Owner = Utility.Intern(reader.ReadString()); + m_Line1 = Utility.Intern(reader.ReadString()); + m_Line2 = Utility.Intern(reader.ReadString()); + m_Line3 = Utility.Intern(reader.ReadString()); + } + private class InternalGump : Gump { private readonly StValentinesBear m_Bear; @@ -190,23 +256,61 @@ namespace Server.Items } } - [Serializable(0, false)] [Flippable(0x48E0, 0x48E1)] - public partial class StValentinesPanda : StValentinesBear + public class StValentinesPanda : StValentinesBear { [Constructible] - public StValentinesPanda(string name = null) : base(0x48E0, name) + public StValentinesPanda(string name = null) + : base(0x48E0, name) { } + + public StValentinesPanda(Serial serial) + : base(serial) + { + } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } - [Serializable(0, false)] [Flippable(0x48E2, 0x48E3)] - public partial class StValentinesPolarBear : StValentinesBear + public class StValentinesPolarBear : StValentinesBear { [Constructible] - public StValentinesPolarBear(string name = null) : base(0x48E2, name) + public StValentinesPolarBear(string name = null) + : base(0x48E2, name) { } + + public StValentinesPolarBear(Serial serial) + : base(serial) + { + } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidStatue.cs b/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidStatue.cs index a86ba5a56..05f2ec76f 100644 --- a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidStatue.cs +++ b/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidStatue.cs @@ -1,12 +1,32 @@ namespace Server.Items { - [Serializable(0, false)] [Flippable(0x4F7C, 0x4F7D)] - public partial class CupidStatue : Item + public class CupidStatue : Item { [Constructible] - public CupidStatue() : base(0x4F7D) => LootType = LootType.Blessed; + public CupidStatue() + : base(0x4F7D) => + LootType = LootType.Blessed; + + public CupidStatue(Serial serial) + : base(serial) + { + } public override int LabelNumber => 1099220; // cupid statue + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs b/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs index 96b479324..178f0a550 100644 --- a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs +++ b/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs @@ -1,30 +1,49 @@ +using System; using Server.Targeting; namespace Server.Items { - [Serializable(0, false)] - public partial class CupidsArrow : Item + public class CupidsArrow : Item { - [InternString] - [InvalidateProperties] - [SerializableField(0)] - [SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")] - private string _from; - - [InternString] - [InvalidateProperties] - [SerializableField(1)] - [SerializableFieldAttr("[CommandProperty(AccessLevel.GameMaster)]")] - private string _to; + private string m_From; + private string m_To; [Constructible] - public CupidsArrow() : base(0x4F7F) => LootType = LootType.Blessed; + public CupidsArrow() + : base(0x4F7F) => + LootType = LootType.Blessed; + public CupidsArrow(Serial serial) + : base(serial) + { + } // TODO: Check messages public override int LabelNumber => 1152270; // Cupid's Arrow 2012 - public bool IsSigned => _from != null && _to != null; + [CommandProperty(AccessLevel.GameMaster)] + public string From + { + get => m_From; + set + { + m_From = value; + InvalidateProperties(); + } + } + + [CommandProperty(AccessLevel.GameMaster)] + public string To + { + get => m_To; + set + { + m_To = value; + InvalidateProperties(); + } + } + + public bool IsSigned => m_From != null && m_To != null; public override void AddNameProperty(ObjectPropertyList list) { @@ -32,7 +51,7 @@ namespace Server.Items if (IsSigned) { - list.Add(1152273, $"{_from}\t{_to}"); // ~1_val~ is madly in love with ~2_val~ + list.Add(1152273, $"{m_From}\t{m_To}"); // ~1_val~ is madly in love with ~2_val~ } } @@ -53,7 +72,7 @@ namespace Server.Items if (IsSigned) { - LabelTo(from, 1152273, $"{_from}\t{_to}"); // ~1_val~ is madly in love with ~2_val~ + LabelTo(from, 1152273, $"{m_From}\t{m_To}"); // ~1_val~ is madly in love with ~2_val~ } } @@ -91,8 +110,8 @@ namespace Server.Items return; } - _from = from.Name; - _to = m.Name; + m_From = from.Name; + m_To = m.Name; InvalidateProperties(); @@ -103,5 +122,25 @@ namespace Server.Items from.SendMessage("That is not a person."); } } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); + + writer.Write(m_From); + writer.Write(m_To); + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + + m_From = Utility.Intern(reader.ReadString()); + m_To = Utility.Intern(reader.ReadString()); + } } } diff --git a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/HeartShapedBox.cs b/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/HeartShapedBox.cs index 5f749777f..1f2d176e0 100644 --- a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/HeartShapedBox.cs +++ b/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/HeartShapedBox.cs @@ -1,13 +1,18 @@ namespace Server.Items { - [Serializable(0, false)] [Flippable(0x49CA, 0x49CB)] - public partial class HeartShapedBox : BaseContainer + public class HeartShapedBox : BaseContainer { private static int m_DropSound; [Constructible] - public HeartShapedBox() : base(0x49CA) + public HeartShapedBox() + : base(0x49CA) + { + } + + public HeartShapedBox(Serial serial) + : base(serial) { } @@ -29,5 +34,19 @@ namespace Server.Items { m_DropSound = from.Female ? 0x430 : 0x320; } + + public override void Serialize(IGenericWriter writer) + { + base.Serialize(writer); + + writer.Write(0); // version + } + + public override void Deserialize(IGenericReader reader) + { + base.Deserialize(reader); + + var version = reader.ReadInt(); + } } } diff --git a/Projects/UOContent/Migrations/Server.Engines.Events.NaughtyTwin.v0.json b/Projects/UOContent/Migrations/Server.Engines.Events.NaughtyTwin.v0.json deleted file mode 100644 index d541a3e26..000000000 --- a/Projects/UOContent/Migrations/Server.Engines.Events.NaughtyTwin.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Engines.Events.NaughtyTwin", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.AnimatedHeartShapedBox.v0.json b/Projects/UOContent/Migrations/Server.Items.AnimatedHeartShapedBox.v0.json deleted file mode 100644 index 687e27481..000000000 --- a/Projects/UOContent/Migrations/Server.Items.AnimatedHeartShapedBox.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.AnimatedHeartShapedBox", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.ChairInAGhostCostume.v0.json b/Projects/UOContent/Migrations/Server.Items.ChairInAGhostCostume.v0.json deleted file mode 100644 index 4dbef51b9..000000000 --- a/Projects/UOContent/Migrations/Server.Items.ChairInAGhostCostume.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.ChairInAGhostCostume", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.ColoredSmallWebs.v0.json b/Projects/UOContent/Migrations/Server.Items.ColoredSmallWebs.v0.json deleted file mode 100644 index cacf67138..000000000 --- a/Projects/UOContent/Migrations/Server.Items.ColoredSmallWebs.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.ColoredSmallWebs", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.CreepyCake.v0.json b/Projects/UOContent/Migrations/Server.Items.CreepyCake.v0.json deleted file mode 100644 index 0c258d786..000000000 --- a/Projects/UOContent/Migrations/Server.Items.CreepyCake.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.CreepyCake", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.CupidStatue.v0.json b/Projects/UOContent/Migrations/Server.Items.CupidStatue.v0.json deleted file mode 100644 index 45f1d06a7..000000000 --- a/Projects/UOContent/Migrations/Server.Items.CupidStatue.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.CupidStatue", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.CupidsArrow.v0.json b/Projects/UOContent/Migrations/Server.Items.CupidsArrow.v0.json deleted file mode 100644 index 7b159fdee..000000000 --- a/Projects/UOContent/Migrations/Server.Items.CupidsArrow.v0.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.CupidsArrow", - "properties": [ - { - "name": "From", - "type": "string", - "rule": "PrimitiveTypeMigrationRule", - "ruleArguments": [ - "InternString" - ] - }, - { - "name": "To", - "type": "string", - "rule": "PrimitiveTypeMigrationRule", - "ruleArguments": [ - "InternString" - ] - } - ] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.DragonEasterEgg.v0.json b/Projects/UOContent/Migrations/Server.Items.DragonEasterEgg.v0.json deleted file mode 100644 index 0ffb9ee7d..000000000 --- a/Projects/UOContent/Migrations/Server.Items.DragonEasterEgg.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.DragonEasterEgg", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.ExcellentIronMaiden.v0.json b/Projects/UOContent/Migrations/Server.Items.ExcellentIronMaiden.v0.json deleted file mode 100644 index d66387ce2..000000000 --- a/Projects/UOContent/Migrations/Server.Items.ExcellentIronMaiden.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.ExcellentIronMaiden", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.Fireflies.v0.json b/Projects/UOContent/Migrations/Server.Items.Fireflies.v0.json deleted file mode 100644 index 634cfae85..000000000 --- a/Projects/UOContent/Migrations/Server.Items.Fireflies.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.Fireflies", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.FirefliesDeed.v0.json b/Projects/UOContent/Migrations/Server.Items.FirefliesDeed.v0.json deleted file mode 100644 index a037fc4d5..000000000 --- a/Projects/UOContent/Migrations/Server.Items.FirefliesDeed.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.FirefliesDeed", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.GrimWarning.v0.json b/Projects/UOContent/Migrations/Server.Items.GrimWarning.v0.json deleted file mode 100644 index 624049fad..000000000 --- a/Projects/UOContent/Migrations/Server.Items.GrimWarning.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.GrimWarning", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.HalloweenGuillotine.v0.json b/Projects/UOContent/Migrations/Server.Items.HalloweenGuillotine.v0.json deleted file mode 100644 index a3f72ca8e..000000000 --- a/Projects/UOContent/Migrations/Server.Items.HalloweenGuillotine.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.HalloweenGuillotine", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.HalloweenPumpkin.v1.json b/Projects/UOContent/Migrations/Server.Items.HalloweenPumpkin.v1.json deleted file mode 100644 index b5f1b62f3..000000000 --- a/Projects/UOContent/Migrations/Server.Items.HalloweenPumpkin.v1.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 1, - "type": "Server.Items.HalloweenPumpkin", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.HarvestWine.v0.json b/Projects/UOContent/Migrations/Server.Items.HarvestWine.v0.json deleted file mode 100644 index 07274503d..000000000 --- a/Projects/UOContent/Migrations/Server.Items.HarvestWine.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.HarvestWine", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.HeartShapedBox.v0.json b/Projects/UOContent/Migrations/Server.Items.HeartShapedBox.v0.json deleted file mode 100644 index 9da6b366d..000000000 --- a/Projects/UOContent/Migrations/Server.Items.HeartShapedBox.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.HeartShapedBox", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.Holiday.AngelDecoration.v0.json b/Projects/UOContent/Migrations/Server.Items.Holiday.AngelDecoration.v0.json deleted file mode 100644 index 89024d3b0..000000000 --- a/Projects/UOContent/Migrations/Server.Items.Holiday.AngelDecoration.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.Holiday.AngelDecoration", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedDaemonMask.v0.json b/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedDaemonMask.v0.json deleted file mode 100644 index 55f9192c6..000000000 --- a/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedDaemonMask.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.Holiday.PaintedDaemonMask", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedEvilClownMask.v0.json b/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedEvilClownMask.v0.json deleted file mode 100644 index 120547e9d..000000000 --- a/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedEvilClownMask.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.Holiday.PaintedEvilClownMask", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedEvilJesterMask.v0.json b/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedEvilJesterMask.v0.json deleted file mode 100644 index f49e693cc..000000000 --- a/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedEvilJesterMask.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.Holiday.PaintedEvilJesterMask", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedPlagueMask.v0.json b/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedPlagueMask.v0.json deleted file mode 100644 index f21926126..000000000 --- a/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedPlagueMask.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.Holiday.PaintedPlagueMask", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedPorcelainMask.v0.json b/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedPorcelainMask.v0.json deleted file mode 100644 index d053fae9b..000000000 --- a/Projects/UOContent/Migrations/Server.Items.Holiday.PaintedPorcelainMask.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.Holiday.PaintedPorcelainMask", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.Holiday.RockingHorse.v0.json b/Projects/UOContent/Migrations/Server.Items.Holiday.RockingHorse.v0.json deleted file mode 100644 index 4da4fadb2..000000000 --- a/Projects/UOContent/Migrations/Server.Items.Holiday.RockingHorse.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.Holiday.RockingHorse", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.JellyBeans.v0.json b/Projects/UOContent/Migrations/Server.Items.JellyBeans.v0.json deleted file mode 100644 index 4749ce9a6..000000000 --- a/Projects/UOContent/Migrations/Server.Items.JellyBeans.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.JellyBeans", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.Lollipops.v0.json b/Projects/UOContent/Migrations/Server.Items.Lollipops.v0.json deleted file mode 100644 index 5781c14fb..000000000 --- a/Projects/UOContent/Migrations/Server.Items.Lollipops.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.Lollipops", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.MrPlainsCookies.v0.json b/Projects/UOContent/Migrations/Server.Items.MrPlainsCookies.v0.json deleted file mode 100644 index e2cf2eb4f..000000000 --- a/Projects/UOContent/Migrations/Server.Items.MrPlainsCookies.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.MrPlainsCookies", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.MurkyMilk.v0.json b/Projects/UOContent/Migrations/Server.Items.MurkyMilk.v0.json deleted file mode 100644 index 7cf98cae7..000000000 --- a/Projects/UOContent/Migrations/Server.Items.MurkyMilk.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.MurkyMilk", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.NougatSwirl.v0.json b/Projects/UOContent/Migrations/Server.Items.NougatSwirl.v0.json deleted file mode 100644 index 9437a68ed..000000000 --- a/Projects/UOContent/Migrations/Server.Items.NougatSwirl.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.NougatSwirl", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.PumpkinPizza.v0.json b/Projects/UOContent/Migrations/Server.Items.PumpkinPizza.v0.json deleted file mode 100644 index df8ed5200..000000000 --- a/Projects/UOContent/Migrations/Server.Items.PumpkinPizza.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.PumpkinPizza", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.PumpkinScarecrow.v0.json b/Projects/UOContent/Migrations/Server.Items.PumpkinScarecrow.v0.json deleted file mode 100644 index c3c38d753..000000000 --- a/Projects/UOContent/Migrations/Server.Items.PumpkinScarecrow.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.PumpkinScarecrow", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.RuinedTapestry.v0.json b/Projects/UOContent/Migrations/Server.Items.RuinedTapestry.v0.json deleted file mode 100644 index eb499bc7f..000000000 --- a/Projects/UOContent/Migrations/Server.Items.RuinedTapestry.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.RuinedTapestry", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.SkullsOnPike.v0.json b/Projects/UOContent/Migrations/Server.Items.SkullsOnPike.v0.json deleted file mode 100644 index 62759f142..000000000 --- a/Projects/UOContent/Migrations/Server.Items.SkullsOnPike.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.SkullsOnPike", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.StValentinesBear.v0.json b/Projects/UOContent/Migrations/Server.Items.StValentinesBear.v0.json deleted file mode 100644 index 4c88d7100..000000000 --- a/Projects/UOContent/Migrations/Server.Items.StValentinesBear.v0.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.StValentinesBear", - "properties": [ - { - "name": "Owner", - "type": "string", - "rule": "PrimitiveTypeMigrationRule", - "ruleArguments": [ - "InternString" - ] - }, - { - "name": "Line1", - "type": "string", - "rule": "PrimitiveTypeMigrationRule", - "ruleArguments": [ - "InternString" - ] - }, - { - "name": "Line2", - "type": "string", - "rule": "PrimitiveTypeMigrationRule", - "ruleArguments": [ - "InternString" - ] - }, - { - "name": "Line3", - "type": "string", - "rule": "PrimitiveTypeMigrationRule", - "ruleArguments": [ - "InternString" - ] - } - ] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.StValentinesPanda.v0.json b/Projects/UOContent/Migrations/Server.Items.StValentinesPanda.v0.json deleted file mode 100644 index c2acaf93e..000000000 --- a/Projects/UOContent/Migrations/Server.Items.StValentinesPanda.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.StValentinesPanda", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.StValentinesPolarBear.v0.json b/Projects/UOContent/Migrations/Server.Items.StValentinesPolarBear.v0.json deleted file mode 100644 index 2d3260fdd..000000000 --- a/Projects/UOContent/Migrations/Server.Items.StValentinesPolarBear.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.StValentinesPolarBear", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.Taffy.v0.json b/Projects/UOContent/Migrations/Server.Items.Taffy.v0.json deleted file mode 100644 index fdb7359c3..000000000 --- a/Projects/UOContent/Migrations/Server.Items.Taffy.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.Taffy", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.TwilightLantern.v0.json b/Projects/UOContent/Migrations/Server.Items.TwilightLantern.v0.json deleted file mode 100644 index 36a407032..000000000 --- a/Projects/UOContent/Migrations/Server.Items.TwilightLantern.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.TwilightLantern", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Items.WrappedCandy.v0.json b/Projects/UOContent/Migrations/Server.Items.WrappedCandy.v0.json deleted file mode 100644 index 4d539e060..000000000 --- a/Projects/UOContent/Migrations/Server.Items.WrappedCandy.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Items.WrappedCandy", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/Migrations/Server.Mobiles.PumpkinHead.v0.json b/Projects/UOContent/Migrations/Server.Mobiles.PumpkinHead.v0.json deleted file mode 100644 index 906e5644e..000000000 --- a/Projects/UOContent/Migrations/Server.Mobiles.PumpkinHead.v0.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "version": 0, - "type": "Server.Mobiles.PumpkinHead", - "properties": [] -} \ No newline at end of file diff --git a/Projects/UOContent/UOContent.csproj b/Projects/UOContent/UOContent.csproj index 6bf1e220d..48e83e195 100644 --- a/Projects/UOContent/UOContent.csproj +++ b/Projects/UOContent/UOContent.csproj @@ -39,24 +39,24 @@ - - - - - - - - - - - - - - - - - - - .\Migrations\ - + + + + + + + + + + + + + + + + + + + +