diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2004/DecorativeTopiary.cs b/Projects/UOContent/Holiday Stuff/Christmas/2004/DecorativeTopiary.cs deleted file mode 100644 index 54431f0ad..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2004/DecorativeTopiary.cs +++ /dev/null @@ -1,26 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items; - -[SerializationGenerator(0, false)] -public partial class DecorativeTopiary : Item -{ - [Constructible] - public DecorativeTopiary() : base(0x2378) => LootType = LootType.Blessed; - - public override double DefaultWeight => 1.0; - - public override void OnSingleClick(Mobile from) - { - base.OnSingleClick(from); - - LabelTo(from, 1070880); // Winter 2004 - } - - public override void GetProperties(IPropertyList list) - { - base.GetProperties(list); - - list.Add(1070880); // Winter 2004 - } -} diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2004/FestiveCactus.cs b/Projects/UOContent/Holiday Stuff/Christmas/2004/FestiveCactus.cs deleted file mode 100644 index 4fba63754..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2004/FestiveCactus.cs +++ /dev/null @@ -1,26 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items; - -[SerializationGenerator(0, false)] -public partial class FestiveCactus : Item -{ - [Constructible] - public FestiveCactus() : base(0x2376) => LootType = LootType.Blessed; - - public override double DefaultWeight => 1.0; - - public override void OnSingleClick(Mobile from) - { - base.OnSingleClick(from); - - LabelTo(from, 1070880); // Winter 2004 - } - - public override void GetProperties(IPropertyList list) - { - base.GetProperties(list); - - list.Add(1070880); // Winter 2004 - } -} diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2004/LightOfTheWinterSolstice.cs b/Projects/UOContent/Holiday Stuff/Christmas/2004/LightOfTheWinterSolstice.cs deleted file mode 100644 index d41019847..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2004/LightOfTheWinterSolstice.cs +++ /dev/null @@ -1,43 +0,0 @@ -using ModernUO.Serialization; -using Server.Misc; - -namespace Server.Items; - -[Flippable(0x236E, 0x2371)] -[SerializationGenerator(0, false)] -public partial class LightOfTheWinterSolstice : Item -{ - [InternString] - [InvalidateProperties] - [SerializableField(0)] - [SerializedCommandProperty(AccessLevel.GameMaster)] - private string _dipper; - - [Constructible] - public LightOfTheWinterSolstice(string dipper = null) : base(0x236E) - { - _dipper = dipper?.Intern() ?? StaffInfo.GetRandomStaff(); - - LootType = LootType.Blessed; - Light = LightType.Circle300; - Hue = Utility.RandomDyedHue(); - } - - public override double DefaultWeight => 1.0; - - public override void OnSingleClick(Mobile from) - { - base.OnSingleClick(from); - - LabelTo(from, 1070881, _dipper); // Hand Dipped by ~1_name~ - LabelTo(from, 1070880); // Winter 2004 - } - - public override void GetProperties(IPropertyList list) - { - base.GetProperties(list); - - list.Add(1070881, _dipper); // Hand Dipped by ~1_name~ - list.Add(1070880); // Winter 2004 - } -} diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2004/Mistletoe.cs b/Projects/UOContent/Holiday Stuff/Christmas/2004/Mistletoe.cs deleted file mode 100644 index 1da2d19f4..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2004/Mistletoe.cs +++ /dev/null @@ -1,335 +0,0 @@ -using ModernUO.Serialization; -using Server.Gumps; -using Server.Multis; -using Server.Network; -using Server.Targeting; - -namespace Server.Items; - -[SerializationGenerator(0, false)] -public partial class MistletoeAddon : Item, IDyable, IAddon -{ - [Constructible] - public MistletoeAddon() : this(Utility.RandomDyedHue()) - { - } - - [Constructible] - public MistletoeAddon(int hue) : base(0x2375) - { - Hue = hue; - Movable = false; - } - - public bool CouldFit(IPoint3D p, Map map) - { - if (!map.CanFit(p.X, p.Y, p.Z, ItemData.Height)) - { - return false; - } - - if (ItemID == 0x2375) - { - 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 Item Deed => new MistletoeDeed(Hue); - - public virtual bool Dye(Mobile from, DyeTub sender) - { - if (Deleted) - { - return false; - } - - var house = BaseHouse.FindHouseAt(this); - - if (house?.IsCoOwner(from) == true) - { - if (from.InRange(GetWorldLocation(), 1)) - { - Hue = sender.DyedHue; - return true; - } - - from.SendLocalizedMessage(500295); // You are too far away to do that. - } - - return false; - } - - [AfterDeserialization(false)] - private void AfterDeserialization() - { - FixMovingCrate(); - } - - private void FixMovingCrate() - { - if (Deleted) - { - return; - } - - if (Movable || IsLockedDown) - { - var deed = Deed; - - if (Parent is Item item) - { - item.AddItem(deed); - deed.Location = Location; - } - else - { - deed.MoveToWorld(Location, Map); - } - - Delete(); - } - } - - public override void OnDoubleClick(Mobile from) - { - var house = BaseHouse.FindHouseAt(this); - - if (house?.IsCoOwner(from) != true) - { - return; - } - - if (from.InRange(GetWorldLocation(), 3)) - { - MistletoeAddonGump.DisplayTo(from, this); - } - else - { - from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. - } - } - - private class MistletoeAddonGump : StaticGump - { - private readonly MistletoeAddon _addon; - - public override bool Singleton => true; - - private MistletoeAddonGump(MistletoeAddon addon) : base(150, 50) => _addon = addon; - - public static void DisplayTo(Mobile from, MistletoeAddon addon) - { - if (from?.NetState == null || addon?.Deleted != false) - { - return; - } - - from.SendGump(new MistletoeAddonGump(addon)); - } - - protected override void BuildLayout(ref StaticGumpBuilder builder) - { - builder.AddPage(); - - builder.AddBackground(0, 0, 220, 170, 0x13BE); - builder.AddBackground(10, 10, 200, 150, 0xBB8); - builder.AddHtmlLocalized(20, 30, 180, 60, 1062839); // Do you wish to re-deed this decoration? - builder.AddHtmlLocalized(55, 100, 160, 25, 1011011); // CONTINUE - builder.AddButton(20, 100, 0xFA5, 0xFA7, 1); - builder.AddHtmlLocalized(55, 125, 160, 25, 1011012); // CANCEL - builder.AddButton(20, 125, 0xFA5, 0xFA7, 0); - } - - public override void OnResponse(NetState sender, in RelayInfo info) - { - if (_addon.Deleted || info.ButtonID != 1) - { - return; - } - - var from = sender.Mobile; - - if (from.InRange(_addon.GetWorldLocation(), 3)) - { - from.AddToBackpack(_addon.Deed); - _addon.Delete(); - } - else - { - from.SendLocalizedMessage(500295); // You are too far away to do that. - } - } - } -} - -[Flippable(0x14F0, 0x14EF)] -[SerializationGenerator(0, false)] -public partial class MistletoeDeed : Item -{ - [Constructible] - public MistletoeDeed(int hue = 0) : base(0x14F0) - { - Hue = hue; - LootType = LootType.Blessed; - } - - public override double DefaultWeight => 1.0; - - public override int LabelNumber => 1070882; // Mistletoe Deed - - public override void OnSingleClick(Mobile from) - { - base.OnSingleClick(from); - - LabelTo(from, 1070880); // Winter 2004 - } - - public override void GetProperties(IPropertyList list) - { - base.GetProperties(list); - - list.Add(1070880); // Winter 2004 - } - - public override void OnDoubleClick(Mobile from) - { - if (!IsChildOf(from.Backpack)) - { - from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it. - return; - } - - var house = BaseHouse.FindHouseAt(from); - - if (house?.IsCoOwner(from) == true) - { - from.SendLocalizedMessage(1062838); // Where would you like to place this decoration? - from.BeginTarget(-1, true, TargetFlags.None, Placement_OnTarget); - } - else - { - from.SendLocalizedMessage(502092); // You must be in your house to do this. - } - } - - public void Placement_OnTarget(Mobile from, object targeted) - { - if (targeted is not IPoint3D p) - { - return; - } - - var loc = new Point3D(p); - - var house = BaseHouse.FindHouseAt(loc, from.Map, 16); - - if (house?.IsCoOwner(from) != true) - { - from.SendLocalizedMessage(1042036); // That location is not in your house. - return; - } - - var northWall = BaseAddon.IsWall(loc.X, loc.Y - 1, loc.Z, from.Map); - var westWall = BaseAddon.IsWall(loc.X - 1, loc.Y, loc.Z, from.Map); - - if (northWall && westWall) - { - from.SendGump(new MistletoeDeedGump(loc, this)); - } - else - { - PlaceAddon(from, loc, northWall, westWall); - } - } - - private void PlaceAddon(Mobile from, Point3D loc, bool northWall, bool westWall) - { - if (Deleted) - { - return; - } - - var house = BaseHouse.FindHouseAt(loc, from.Map, 16); - - if (house?.IsCoOwner(from) != true) - { - from.SendLocalizedMessage(1042036); // That location is not in your house. - return; - } - - var itemID = 0; - - if (northWall) - { - itemID = 0x2374; - } - else if (westWall) - { - itemID = 0x2375; - } - else - { - from.SendLocalizedMessage(1070883); // The mistletoe must be placed next to a wall. - } - - if (itemID > 0) - { - var addon = new MistletoeAddon(Hue) - { - ItemID = itemID - }; - - addon.MoveToWorld(loc, from.Map); - - house.Addons.Add(addon); - Delete(); - } - } - - private class MistletoeDeedGump : StaticGump - { - private readonly MistletoeDeed _deed; - private readonly Point3D _loc; - - public override bool Singleton => false; - - public MistletoeDeedGump(Point3D loc, MistletoeDeed deed) : base(150, 50) - { - _loc = loc; - _deed = deed; - } - - protected override void BuildLayout(ref StaticGumpBuilder builder) - { - builder.AddBackground(0, 0, 300, 150, 0xA28); - - builder.AddPage(); - - builder.AddItem(90, 30, 0x2375); - builder.AddItem(180, 30, 0x2374); - builder.AddButton(50, 35, 0x868, 0x869, 1); - builder.AddButton(145, 35, 0x868, 0x869, 2); - } - - public override void OnResponse(NetState sender, in RelayInfo info) - { - if (_deed.Deleted || info.ButtonID == 0) - { - return; - } - - var from = sender.Mobile; - - if (info.ButtonID == 1) - { - _deed.PlaceAddon(from, _loc, false, true); - } - else - { - _deed.PlaceAddon(from, _loc, true, false); - } - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2004/PileOfGlacialSnow.cs b/Projects/UOContent/Holiday Stuff/Christmas/2004/PileOfGlacialSnow.cs deleted file mode 100644 index 136ee9f47..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2004/PileOfGlacialSnow.cs +++ /dev/null @@ -1,51 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items; - -[SerializationGenerator(0, false)] -public partial class PileOfGlacialSnow : Item -{ - [Constructible] - public PileOfGlacialSnow() : base(0x913) - { - Hue = 0x480; - LootType = LootType.Blessed; - } - - public override double DefaultWeight => 1.0; - - public override int LabelNumber => 1070874; // a Pile of Glacial Snow - - public override void OnSingleClick(Mobile from) - { - base.OnSingleClick(from); - LabelTo(from, 1070880); // Winter 2004 - } - - public override void GetProperties(IPropertyList list) - { - base.GetProperties(list); - list.Add(1070880); // Winter 2004 - } - - public override void OnDoubleClick(Mobile from) - { - if (!IsChildOf(from.Backpack)) - { - from.SendLocalizedMessage(1042010); // You must have the object in your backpack to use it. - } - else if (from.Mounted) - { - from.SendLocalizedMessage(1010097); // You cannot use this while mounted. - } - else if (from.CanBeginAction()) - { - from.SendLocalizedMessage(1005575); // You carefully pack the snow into a ball... - from.Target = new SnowTarget(); - } - else - { - from.SendLocalizedMessage(1005574); // The snow is not ready to be packed yet. Keep trying. - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2004/SnowPile.cs b/Projects/UOContent/Holiday Stuff/Christmas/2004/SnowPile.cs deleted file mode 100644 index 2f7624dad..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2004/SnowPile.cs +++ /dev/null @@ -1,39 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items; - -[SerializationGenerator(0, false)] -public partial class SnowPile : Item -{ - [Constructible] - public SnowPile() : base(0x913) - { - Hue = 0x481; - LootType = LootType.Blessed; - } - - public override double DefaultWeight => 1.0; - - public override int LabelNumber => 1005578; // a pile of snow - - public override void OnDoubleClick(Mobile from) - { - if (!IsChildOf(from.Backpack)) - { - from.SendLocalizedMessage(1042010); // You must have the object in your backpack to use it. - } - else if (from.Mounted) - { - from.SendLocalizedMessage(1010097); // You cannot use this while mounted. - } - else if (from.CanBeginAction()) - { - from.SendLocalizedMessage(1005575); // You carefully pack the snow into a ball... - from.Target = new SnowTarget(); - } - else - { - from.SendLocalizedMessage(1005574); // The snow is not ready to be packed yet. Keep trying. - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2004/SnowTarget.cs b/Projects/UOContent/Holiday Stuff/Christmas/2004/SnowTarget.cs deleted file mode 100644 index a6a26fad1..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2004/SnowTarget.cs +++ /dev/null @@ -1,62 +0,0 @@ -using System; -using Server.Engines.ConPVP; -using Server.Targeting; - -namespace Server.Items; - -public class SnowTarget : Target -{ - private static readonly Type[] _snowPileTypes = [typeof(SnowPile), typeof(PileOfGlacialSnow)]; - - public SnowTarget() : base(10, false, TargetFlags.None) - { - } - - protected override void OnTarget(Mobile from, object target) - { - if (target == from) - { - from.SendLocalizedMessage(1005576); // You can't throw this at yourself. - return; - } - - if (target is not Mobile targ) - { - // You can only throw a snowball at something that can throw one back. - from.SendLocalizedMessage(1005577); - return; - } - - var pack = targ.Backpack; - - if (from.Region.IsPartOf() || targ.Region.IsPartOf()) - { - from.SendMessage("You may not throw snow here."); - return; - } - - if (pack?.FindItemByType(_snowPileTypes) == null) - { - // You can only throw a snowball at something that can throw one back. - from.SendLocalizedMessage(1005577); - return; - } - - if (!from.BeginAction()) - { - from.SendLocalizedMessage(1005574); // The snow is not ready to be packed yet. Keep trying. - return; - } - - Timer.StartTimer(TimeSpan.FromSeconds(5.0), from.EndAction); - - from.PlaySound(0x145); - - from.Animate(9, 1, 1, true, false, 0); - - targ.SendLocalizedMessage(1010572); // You have just been hit by a snowball! - from.SendLocalizedMessage(1010573); // You throw the snowball and hit the target! - - Effects.SendMovingEffect(from, targ, 0x36E4, 7, 0, false, true, 0x47F); - } -} diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2004/SnowyTree.cs b/Projects/UOContent/Holiday Stuff/Christmas/2004/SnowyTree.cs deleted file mode 100644 index e1a231d85..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2004/SnowyTree.cs +++ /dev/null @@ -1,26 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items; - -[SerializationGenerator(0, false)] -public partial class SnowyTree : Item -{ - [Constructible] - public SnowyTree() : base(0x2377) => LootType = LootType.Blessed; - - public override double DefaultWeight => 1.0; - - public override void OnSingleClick(Mobile from) - { - base.OnSingleClick(from); - - LabelTo(from, 1070880); // Winter 2004 - } - - public override void GetProperties(IPropertyList list) - { - base.GetProperties(list); - - list.Add(1070880); // Winter 2004 - } -} diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2004/Winter2004.cs b/Projects/UOContent/Holiday Stuff/Christmas/2004/Winter2004.cs deleted file mode 100644 index e0cb14dc5..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2004/Winter2004.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using Server.Items; - -namespace Server.Misc; - -public class WinterGiftGiver2004 : GiftGiver -{ - public override DateTime Start => new(2004, 12, 24); - public override DateTime Finish => new(2005, 1, 1); - - public static void Initialize() - { - GiftGiving.Register(new WinterGiftGiver2004()); - } - - public override void GiveGift(Mobile mob) - { - var box = new GiftBox(); - - box.DropItem(new MistletoeDeed()); - box.DropItem(new PileOfGlacialSnow()); - box.DropItem(new LightOfTheWinterSolstice()); - - var random = Utility.Random(100); - - if (random < 60) - { - box.DropItem(new DecorativeTopiary()); - } - else if (random < 84) - { - box.DropItem(new FestiveCactus()); - } - else - { - box.DropItem(new SnowyTree()); - } - - switch (GiveGift(mob, box)) - { - case GiftResult.Backpack: - { - mob.SendMessage(0x482, "Happy Holidays from the team! Gift items have been placed in your backpack."); - break; - } - case GiftResult.BankBox: - { - mob.SendMessage(0x482, "Happy Holidays from the team! Gift items have been placed in your bank box."); - break; - } - } - } -} \ No newline at end of file diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs b/Projects/UOContent/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs deleted file mode 100644 index 9ff172543..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2010/Addons/FireFliesDeed.cs +++ /dev/null @@ -1,220 +0,0 @@ -using ModernUO.Serialization; -using Server.Gumps; -using Server.Multis; -using Server.Network; -using Server.Targeting; - -namespace Server.Items; - -[SerializationGenerator(0)] -public partial class Fireflies : Item, IAddon -{ - [Constructible] - public Fireflies(int itemID = 0x1596) : base(itemID) - { - LootType = LootType.Blessed; - Movable = false; - } - - public override int LabelNumber => 1150061; - - public bool FacingSouth => ItemID == 0x2336; - - public Item Deed => new FirefliesDeed(); - - public bool CouldFit(IPoint3D p, Map map) - { - if (map?.CanFit(p.X, p.Y, p.Z, ItemData.Height) != true) - { - return false; - } - - return FacingSouth - ? BaseAddon.IsWall(p.X, p.Y - 1, p.Z, map) - : BaseAddon.IsWall(p.X - 1, p.Y, p.Z, map); - } - - public override void OnDoubleClick(Mobile from) - { - if (!from.InRange(Location, 3)) - { - from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that. - return; - } - - var house = BaseHouse.FindHouseAt(this); - - if (house?.IsOwner(from) == true) - { - // Do you wish to re-deed this decoration? - RewardDemolitionGump.DisplayTo(from, this, 1049783); - } - else - { - // You can only re-deed this decoration if you are the house owner or originally placed the decoration. - from.SendLocalizedMessage(1049784); - } - } -} - -[SerializationGenerator(0)] -public partial class FirefliesDeed : Item -{ - [Constructible] - public FirefliesDeed() : base(0x14F0) => LootType = LootType.Blessed; - - public override double DefaultWeight => 1.0; - - public override int LabelNumber => 1150061; - - public override void OnDoubleClick(Mobile from) - { - if (!IsChildOf(from.Backpack)) - { - from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it. - return; - } - - var house = BaseHouse.FindHouseAt(from); - - if (house?.IsOwner(from) != true) - { - from.SendLocalizedMessage(502092); // You must be in your house to do this. - return; - } - - from.SendGump(new FacingGump(this)); - } - - private class FacingGump : StaticGump - { - private readonly FirefliesDeed _deed; - - public override bool Singleton => true; - - public FacingGump(FirefliesDeed deed) : base(150, 50) => _deed = deed; - - protected override void BuildLayout(ref StaticGumpBuilder builder) - { - builder.AddBackground(0, 0, 300, 150, 0xA28); - builder.AddPage(); - - builder.AddItem(90, 30, 0x2332); - builder.AddItem(180, 30, 0x2336); - - builder.AddButton(50, 35, 0x868, 0x869, (int)Buttons.East); - builder.AddButton(145, 35, 0x868, 0x869, (int)Buttons.South); - } - - public override void OnResponse(NetState sender, in RelayInfo info) - { - if (info.ButtonID == (int)Buttons.Cancel) - { - return; - } - - var itemId = info.ButtonID switch - { - (int)Buttons.East => 0x2332, - (int)Buttons.South => 0x2336, - _ => 0 - }; - - if (itemId == 0) - { - return; - } - - sender.Mobile.Target = new InternalTarget(_deed, itemId); - } - - private enum Buttons - { - Cancel, - South, - East - } - } - - private class InternalTarget : Target - { - private readonly FirefliesDeed _firefliesDeed; - private readonly int _itemId; - - public InternalTarget(FirefliesDeed _deed, int itemId) : base(-1, true, TargetFlags.None) - { - _firefliesDeed = _deed; - _itemId = itemId; - } - - protected override void OnTarget(Mobile from, object targeted) - { - if (_firefliesDeed?.Deleted != false) - { - return; - } - - if (!_firefliesDeed.IsChildOf(from.Backpack)) - { - from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it. - return; - } - - var house = BaseHouse.FindHouseAt(from); - - if (house?.IsOwner(from) != true) - { - from.SendLocalizedMessage(502092); // You must be in your house to do this. - return; - } - - var p = targeted as IPoint3D; - var map = from.Map; - - if (p == null || map == null || map == Map.Internal) - { - return; - } - - var p3d = new Point3D(p); - var id = TileData.ItemTable[_itemId & TileData.MaxItemValue]; - - if (!map.CanFit(p3d, id.Height)) - { - from.SendLocalizedMessage(500269); // You cannot build that there. - return; - } - - house = BaseHouse.FindHouseAt(p3d, map, id.Height); - - if (house?.IsOwner(from) != true) - { - from.SendLocalizedMessage(1042036); // That location is not in your house. - return; - } - - var north = BaseAddon.IsWall(p3d.X, p3d.Y - 1, p3d.Z, map); - var west = BaseAddon.IsWall(p3d.X - 1, p3d.Y, p3d.Z, map); - - if ((_itemId != 0x2336 || !north) && (_itemId != 0x2332 || !west)) - { - from.SendLocalizedMessage(1150065); // Holiday fireflies must be placed next to a wall. - return; - } - - foreach (var fireflies in Map.Malas.GetItemsAt(p3d)) - { - if (fireflies.Z == p3d.Z) - { - from.SendLocalizedMessage(1150065); // Holiday fireflies must be placed next to a wall. - return; - } - } - - var flies = new Fireflies(_itemId); - house.Addons.Add(flies); - flies.MoveToWorld(p3d, from.Map); - _firefliesDeed.Delete(); - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/AngelDecoration.cs b/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/AngelDecoration.cs deleted file mode 100644 index 06b662922..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/AngelDecoration.cs +++ /dev/null @@ -1,13 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items.Holiday; - -[Flippable(0x46FA, 0x46FB)] -[TypeAlias("Server.Items.AngelDecoration")] -[SerializationGenerator(0, false)] -public partial class AngelDecoration : Item -{ - public AngelDecoration() : base(0x46FA) => LootType = LootType.Blessed; - - public override double DefaultWeight => 30.0; -} diff --git a/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/RockingHorse.cs b/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/RockingHorse.cs deleted file mode 100644 index 7b5684f57..000000000 --- a/Projects/UOContent/Holiday Stuff/Christmas/2010/Items/RockingHorse.cs +++ /dev/null @@ -1,13 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items.Holiday; - -[Flippable(0x4214, 0x4215)] -[TypeAlias("Server.Items.RockingHorse")] -[SerializationGenerator(0, false)] -public partial class RockingHorse : Item -{ - public RockingHorse() : base(0x4214) => LootType = LootType.Blessed; - - public override double DefaultWeight => 30.0; -} diff --git a/Projects/UOContent/Holiday Stuff/Easter/2011/Items/DragonEasterEgg.cs b/Projects/UOContent/Holiday Stuff/Easter/2011/Items/DragonEasterEgg.cs deleted file mode 100644 index bd0212152..000000000 --- a/Projects/UOContent/Holiday Stuff/Easter/2011/Items/DragonEasterEgg.cs +++ /dev/null @@ -1,28 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class DragonEasterEgg : Item, IDyable - { - [Constructible] - public DragonEasterEgg() - : base(0x47E6) - { - } - - public override int LabelNumber => 1097278; - - public bool Dye(Mobile from, DyeTub sender) - { - if (Deleted || !sender.AllowDyables) - { - return false; - } - - Hue = sender.DyedHue; - - return true; - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2006/Engines/TrickOrTreat.cs b/Projects/UOContent/Holiday Stuff/Halloween/2006/Engines/TrickOrTreat.cs deleted file mode 100644 index f2e0c1116..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2006/Engines/TrickOrTreat.cs +++ /dev/null @@ -1,345 +0,0 @@ -using System; -using System.Runtime.CompilerServices; -using ModernUO.Serialization; -using Server.Collections; -using Server.Events.Halloween; -using Server.Items; -using Server.Mobiles; -using Server.Targeting; - -namespace Server.Engines.Events; - -public static class TrickOrTreat -{ - public static void Initialize() - { - var now = Core.Now; - - if (now >= HolidaySettings.StartHalloween && now <= HolidaySettings.FinishHalloween) - { - EventSink.Speech += EventSink_Speech; - } - } - - private static void EventSink_Speech(SpeechEventArgs e) - { - if (e.Speech.InsensitiveContains("trick or treat")) - { - e.Mobile.Target = new TrickOrTreatTarget(); - - e.Mobile.SendLocalizedMessage(1076764); /* Pick someone to Trick or Treat. */ - } - } - - public static void Bleeding(Mobile from) - { - if (!CheckMobile(from)) - { - return; - } - - if (from.Location == Point3D.Zero) - { - return; - } - - var amount = Utility.RandomMinMax(3, 7); - - for (var i = 0; i < amount; i++) - { - new Blood(Utility.RandomMinMax(0x122C, 0x122F)).MoveToWorld( - RandomPointOneAway(from.X, from.Y, from.Z, from.Map), - from.Map - ); - } - } - - public static void RemoveHueMod(Mobile target) - { - if (target?.Deleted == false) - { - target.SolidHueOverride = -1; - } - } - - public static void SolidHueMobile(Mobile target) - { - if (CheckMobile(target)) - { - target.SolidHueOverride = Utility.RandomMinMax(2501, 2644); - - Timer.StartTimer(TimeSpan.FromSeconds(10), () => RemoveHueMod(target)); - } - } - - public static void MakeTwin(Mobile from) - { - if (!CheckMobile(from)) - { - return; - } - - var twin = new NaughtyTwin(from); - - if (twin.Deleted) - { - return; - } - - using var items = PooledRefQueue.Create(); - for (var i = 0; i < from.Items.Count; i++) - { - var item = from.Items[i]; - if (item.Layer != Layer.Backpack && item.Layer != Layer.Mount && item.Layer != Layer.Bank) - { - items.Enqueue(item); - } - } - - if (items.Count > 0) - { - while (items.Count > 0) - { - twin.AddItem(Mobile.LiftItemDupe(items.Dequeue(), 1)); - } - - for (var i = 0; i < twin.Items.Count; i++) - { - var item = twin.Items[i]; - if (item.Layer != Layer.Backpack && item.Layer != Layer.Mount && item.Layer != Layer.Bank) - { - item.Movable = false; - } - } - } - - twin.Hue = from.Hue; - twin.Body = from.Body; - twin.Kills = from.Kills; - - var point = RandomPointOneAway(from.X, from.Y, from.Z, from.Map); - - twin.MoveToWorld(from.Map.CanSpawnMobile(point) ? point : from.Location, from.Map); - - Timer.StartTimer(TimeSpan.FromSeconds(5), () => DeleteTwin(twin)); - } - - public static void DeleteTwin(Mobile twin) - { - if (CheckMobile(twin)) - { - twin.Delete(); - } - } - - public static Point3D RandomPointOneAway(int x, int y, int z, Map map) - { - var loc = new Point3D(x + Utility.Random(-1, 3), y + Utility.Random(-1, 3), 0); - - loc.Z = map.CanFit(loc, 0) ? map.GetAverageZ(loc.X, loc.Y) : z; - - return loc; - } - - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool CheckMobile(Mobile mobile) => - mobile?.Map != null && !mobile.Deleted && mobile.Alive && mobile.Map != Map.Internal; - - private class TrickOrTreatTarget : Target - { - public TrickOrTreatTarget() : base(15, false, TargetFlags.None) - { - } - - protected override void OnTarget(Mobile from, object targ) - { - if (targ == null || !CheckMobile(from)) - { - return; - } - - if (targ is not Mobile) - { - from.SendLocalizedMessage(1076781); /* There is little chance of getting candy from that! */ - return; - } - - var begged = targ as BaseVendor; - - if (begged?.Deleted != false) - { - from.SendLocalizedMessage(1076765); /* That doesn't look friendly. */ - return; - } - - var now = Core.Now; - - if (CheckMobile(begged)) - { - if (begged.NextTrickOrTreat > now) - { - from.SendLocalizedMessage(1076767); /* That doesn't appear to have any more candy. */ - return; - } - - begged.NextTrickOrTreat = now + TimeSpan.FromMinutes(Utility.RandomMinMax(5, 10)); - - if (from.Backpack?.Deleted != false) - { - return; - } - - if (Utility.RandomDouble() < 0.90) - { - begged.Say( - Utility.Random(3) switch - { - 0 => 1076768, // Oooooh, aren't you cute! - 1 => 1076779, // All right...This better not spoil your dinner! - _ => 1076778 // Here you go! Enjoy! - } - ); - - if (Utility.RandomDouble() < 0.01 && from.Skills.Begging.Value >= 100) - { - from.AddToBackpack(HolidaySettings.RandomGMBeggerItem); - - from.SendLocalizedMessage(1076777); /* You receive a special treat! */ - } - else - { - from.AddToBackpack(HolidaySettings.RandomTreat); - - from.SendLocalizedMessage(1076769); /* You receive some candy. */ - } - } - else - { - begged.Say(1076770); /* TRICK! */ - - var action = Utility.Random(4); - - if (action == 0) - { - Timer.StartTimer(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1), 10, () => Bleeding(from)); - } - else if (action == 1) - { - Timer.StartTimer(TimeSpan.FromSeconds(2), () => SolidHueMobile(from)); - } - else - { - Timer.StartTimer(TimeSpan.FromSeconds(2), () => MakeTwin(from)); - } - } - } - } - } -} - -[SerializationGenerator(0, false)] -public partial class NaughtyTwin : BaseCreature -{ - private static readonly Point3D[] Felucca_Locations = - { - new(4467, 1283, 5), // Moonglow - new(1336, 1997, 5), // Britain - new(1499, 3771, 5), // Jhelom - new(771, 752, 5), // Yew - new(2701, 692, 5), // Minoc - new(1828, 2948, -20), // Trinsic - new(643, 2067, 5), // Skara Brae - new(3563, 2139, Map.Trammel.GetAverageZ(3563, 2139)) // (New) Magincia - }; - - private static readonly Point3D[] Malas_Locations = - { - new(1015, 527, -65), // Luna - new(1997, 1386, -85) // Umbra - }; - - private static readonly Point3D[] Ilshenar_Locations = - { - new(1215, 467, -13), // Compassion - new(722, 1366, -60), // Honesty - new(744, 724, -28), // Honor - new(281, 1016, 0), // Humility - new(987, 1011, -32), // Justice - new(1174, 1286, -30), // Sacrifice - new(1532, 1340, -3), // Spirituality - new(528, 216, -45), // Valor - new(1721, 218, 96) // Chaos - }; - - private static readonly Point3D[] Tokuno_Locations = - { - new(1169, 998, 41), // Isamu-Jima - new(802, 1204, 25), // Makoto-Jima - new(270, 628, 15) // Homare-Jima - }; - - private readonly Mobile m_From; - - public NaughtyTwin(Mobile from) : base(AIType.AI_Melee, FightMode.None) - { - if (TrickOrTreat.CheckMobile(from)) - { - Body = from.Body; - - m_From = from; - Name = $"{from.Name}\'s Naughty Twin"; - - Timer.StartTimer(TimeSpan.FromSeconds(1), () => StealCandyOrGate(m_From)); - } - } - - public override void OnThink() - { - if (m_From?.Deleted != false) - { - Delete(); - } - } - - public static Item FindCandyTypes(Mobile target) - { - Type[] types = - { typeof(WrappedCandy), typeof(Lollipops), typeof(NougatSwirl), typeof(Taffy), typeof(JellyBeans) }; - - return TrickOrTreat.CheckMobile(target) ? target.Backpack.FindItemByType(types) : null; - } - - public static void StealCandyOrGate(Mobile target) - { - if (TrickOrTreat.CheckMobile(target)) - { - if (Utility.RandomBool()) - { - var item = FindCandyTypes(target); - - target.SendLocalizedMessage(1113967); /* Your naughty twin steals some of your candy. */ - - if (item?.Deleted == false) - { - item.Delete(); - } - } - else - { - target.SendLocalizedMessage(1113972); /* Your naughty twin teleports you away with a naughty laugh! */ - target.MoveToWorld(RandomMoongate(target), target.Map); - } - } - } - - public static Point3D RandomMoongate(Mobile target) - { - return target.Map.MapID switch - { - 2 => Ilshenar_Locations.RandomElement(), - 3 => Malas_Locations.RandomElement(), - 4 => Tokuno_Locations.RandomElement(), - _ => Felucca_Locations.RandomElement() - }; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/HalloweenPumpkin.cs b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/HalloweenPumpkin.cs deleted file mode 100644 index 0b19bcec9..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/HalloweenPumpkin.cs +++ /dev/null @@ -1,64 +0,0 @@ -using ModernUO.Serialization; -using Server.Misc; -using Server.Mobiles; - -namespace Server.Items; - -[SerializationGenerator(0, false)] -public partial class HalloweenPumpkin : Item -{ - [InternString] - [SerializableField(0)] - private string _staffer; - - [Constructible] - public HalloweenPumpkin() - { - Weight = Utility.RandomMinMax(3, 20); - ItemID = Utility.RandomDouble() < 0.02 - ? Utility.RandomList(0x4694, 0x4698) - : Utility.RandomList(0xc6a, 0xc6b, 0xc6c); - } - - public override string DefaultName => _staffer != null ? $"{_staffer}'s Jack-O-Lantern" : "A Jack-O-Lantern"; - - public override void OnDoubleClick(Mobile from) - { - if (!from.InRange(GetWorldLocation(), 2)) - { - return; - } - - var douse = ItemID is 0x4695 or 0x4691; - - ItemID = ItemID switch - { - 0x4694 => 0x4691, - 0x4691 => 0x4694, - 0x4698 => 0x4695, - 0x4695 => 0x4698, - _ => ItemID - }; - - from.SendLocalizedMessage(douse ? 1113988 : 1113987); // You extinguish/light the Jack-O-Lantern - Effects.PlaySound(GetWorldLocation(), Map, douse ? 0x3be : 0x47); - } - - public override bool OnDragLift(Mobile from) - { - if (Name == null && ItemID is 0x4694 or 0x4691 or 0x4698 or 0x4695) - { - if (Utility.RandomBool()) - { - new PumpkinHead().MoveToWorld(GetWorldLocation(), Map); - - Delete(); - return false; - } - - _staffer = StaffInfo.GetRandomStaff(); - } - - return true; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/PumpkinScarecrow.cs b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/PumpkinScarecrow.cs deleted file mode 100644 index b6983203c..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/PumpkinScarecrow.cs +++ /dev/null @@ -1,16 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class PumpkinScarecrow : Item - { - [Constructible] - public PumpkinScarecrow() - : base(Utility.RandomBool() ? 0x469B : 0x469C) - { - } - - public override int LabelNumber => 1096947; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/RuinedTapestry.cs b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/RuinedTapestry.cs deleted file mode 100644 index db86b8f0a..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/RuinedTapestry.cs +++ /dev/null @@ -1,16 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class RuinedTapestry : Item - { - [Constructible] - public RuinedTapestry() - : base(Utility.RandomBool() ? 0x4699 : 0x469A) - { - } - - public override string DefaultName => "Ruined Tapestry "; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/TwilightLantern.cs b/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/TwilightLantern.cs deleted file mode 100644 index 039092fac..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2006/Items/TwilightLantern.cs +++ /dev/null @@ -1,22 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class TwilightLantern : Lantern - { - [Constructible] - public TwilightLantern() => Hue = Utility.RandomBool() ? 244 : 997; - - public override string DefaultName => "Twilight Lantern"; - - public override bool AllowEquippedCast(Mobile from) => true; - - public override void GetProperties(IPropertyList list) - { - base.GetProperties(list); - - list.Add(1060482); // Spell Channeling - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Engines/PumpkinPatch.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Engines/PumpkinPatch.cs deleted file mode 100644 index f19759704..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Engines/PumpkinPatch.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using Server.Events.Halloween; -using Server.Items; - -namespace Server.Engines.Events -{ - public static class PumpkinPatchSpawner - { - private static Timer _timer; - - private static readonly Rectangle2D[] m_PumpkinFields = - { - new(4557, 1471, 20, 10), - new(796, 2152, 36, 24), - new(816, 2251, 16, 8), - new(816, 2261, 16, 8), - new(816, 2271, 16, 8), - new(816, 2281, 16, 8), - new(835, 2344, 16, 16), - new(816, 2344, 16, 24) - }; - - public static void Initialize() - { - var now = Core.Now; - - // TODO: World timer to turn these on/off - if (now >= HolidaySettings.StartHalloween && now <= HolidaySettings.FinishHalloween) - { - _timer = Timer.DelayCall(TimeSpan.FromSeconds(30), 0, PumpkinPatchSpawnerCallback); - } - } - - private static void PumpkinPatchSpawnerCallback() - { - AddPumpkin(Map.Felucca); - AddPumpkin(Map.Trammel); - - if (Core.Now > HolidaySettings.FinishHalloween) - { - _timer.Stop(); - _timer = null; - } - } - - private static void AddPumpkin(Map map) - { - for (var i = 0; i < m_PumpkinFields.Length; i++) - { - var rect = m_PumpkinFields[i]; - - var spawncount = rect.Height * rect.Width / 20; - var pumpkins = 0; - foreach (var _ in map.GetItemsInBounds(rect)) - { - if (pumpkins++ >= spawncount) - { - break; - } - } - - if (spawncount > pumpkins) - { - new HalloweenPumpkin().MoveToWorld(Utility.RandomPointIn(rect, map), map); - } - } - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/CreepyCake.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/CreepyCake.cs deleted file mode 100644 index 268c25ae0..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/CreepyCake.cs +++ /dev/null @@ -1,17 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - /* - first seen halloween 2009. subsequently in 2010, - 2011 and 2012. GM Beggar-only Semi-Rare Treats - */ - [SerializationGenerator(0, false)] - public partial class CreepyCake : Food - { - [Constructible] - public CreepyCake() : base(0x9e9) => Hue = 0x3E4; - - public override string DefaultName => "Creepy Cake"; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/HarvestWine.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/HarvestWine.cs deleted file mode 100644 index ca0513ac4..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/HarvestWine.cs +++ /dev/null @@ -1,18 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - /* - first seen halloween 2009. subsequently in 2010, - 2011 and 2012. GM Beggar-only Semi-Rare Treats - */ - [SerializationGenerator(0, false)] - public partial class HarvestWine : BeverageBottle - { - [Constructible] - public HarvestWine() : base(BeverageType.Wine) => Hue = 0xe0; - - public override string DefaultName => "Harvest Wine"; - public override double DefaultWeight => 1; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MrPlainsCookies.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MrPlainsCookies.cs deleted file mode 100644 index ab1f44561..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MrPlainsCookies.cs +++ /dev/null @@ -1,18 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items; - -[SerializationGenerator(0, false)] -public partial class MrPlainsCookies : Food -{ - [Constructible] - public MrPlainsCookies() : base(0x160C) - { - FillFactor = 4; - Hue = 0xF4; - } - - public override double DefaultWeight => 1.0; - - public override string DefaultName => "Mr Plain's Cookies"; -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MurkyMilk.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MurkyMilk.cs deleted file mode 100644 index eb5ab5b87..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/MurkyMilk.cs +++ /dev/null @@ -1,24 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - /* - first seen halloween 2009. subsequently in 2010, - 2011 and 2012. GM Beggar-only Semi-Rare Treats - */ - [SerializationGenerator(0, false)] - public partial class MurkyMilk : Pitcher - { - [Constructible] - public MurkyMilk() : base(BeverageType.Milk) - { - Hue = 0x3e5; - Quantity = MaxQuantity; - ItemID = Utility.RandomBool() ? 0x09F0 : 0x09AD; - } - - public override string DefaultName => "Murky Milk"; - public override int MaxQuantity => 5; - public override double DefaultWeight => 1; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/PumpkinPizza.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/PumpkinPizza.cs deleted file mode 100644 index ef277242f..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Foods/PumpkinPizza.cs +++ /dev/null @@ -1,17 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - /* - first seen halloween 2009. subsequently in 2010, - 2011 and 2012. GM Beggar-only Semi-Rare Treats - */ - [SerializationGenerator(0, false)] - public partial class PumpkinPizza : CheesePizza - { - [Constructible] - public PumpkinPizza() => Hue = 0xF3; - - public override string DefaultName => "Pumpkin Pizza"; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/GrimWarning.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/GrimWarning.cs deleted file mode 100644 index 3a5eef292..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/GrimWarning.cs +++ /dev/null @@ -1,19 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - /* - first seen halloween 2009. subsequently in 2010, - 2011 and 2012. GM Beggar-only Semi-Rare Treats - */ - [SerializationGenerator(0, false)] - public partial class GrimWarning : Item - { - [Constructible] - public GrimWarning() : base(0x42BD) - { - } - - public override double DefaultWeight => 1; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/SkullsOnPike.cs b/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/SkullsOnPike.cs deleted file mode 100644 index 76d7bf978..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2009/Items/SkullsOnPike.cs +++ /dev/null @@ -1,19 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - /* - first seen halloween 2009. subsequently in 2010, - 2011 and 2012. GM Beggar-only Semi-Rare Treats - */ - [SerializationGenerator(0, false)] - public partial class SkullsOnPike : Item - { - [Constructible] - public SkullsOnPike() : base(0x42B5) - { - } - - public override double DefaultWeight => 1; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ChairInAGhostCostume.cs b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ChairInAGhostCostume.cs deleted file mode 100644 index 7b981aa3d..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ChairInAGhostCostume.cs +++ /dev/null @@ -1,15 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class ChairInAGhostCostume : Item - { - [Constructible] - public ChairInAGhostCostume() : base(0x3F26) - { - } - - public override double DefaultWeight => 5; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ColoredSmallWebs.cs b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ColoredSmallWebs.cs deleted file mode 100644 index 33f5c0891..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ColoredSmallWebs.cs +++ /dev/null @@ -1,14 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class ColoredSmallWebs : Item - { - [Constructible] - public ColoredSmallWebs() : base(Utility.RandomBool() ? 0x10d6 : 0x10d7) => - Hue = Utility.RandomBool() ? 0x455 : 0x4E9; - - public override double DefaultWeight => 5; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ExcellentIronMaiden.cs b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ExcellentIronMaiden.cs deleted file mode 100644 index 5213054b3..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/ExcellentIronMaiden.cs +++ /dev/null @@ -1,15 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class ExcellentIronMaiden : Item - { - [Constructible] - public ExcellentIronMaiden() : base(0x3f15) - { - } - - public override double DefaultWeight => 5; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/HalloweenGuillotine.cs b/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/HalloweenGuillotine.cs deleted file mode 100644 index 8eb576c92..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2010/Items/HalloweenGuillotine.cs +++ /dev/null @@ -1,15 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class HalloweenGuillotine : Item - { - [Constructible] - public HalloweenGuillotine() : base(0x3F27) - { - } - - public override double DefaultWeight => 5; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs deleted file mode 100644 index 62a3c670d..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/BasePaintedMask.cs +++ /dev/null @@ -1,24 +0,0 @@ -using ModernUO.Serialization; -using Server.Misc; - -namespace Server.Items.Holiday; - -[SerializationGenerator(0, false)] -[TypeAlias("Server.Items.ClownMask", "Server.Items.DaemonMask", "Server.Items.PlagueMask")] -public partial class BasePaintedMask : Item -{ - [InternString] - [SerializableField(0, setter: "private")] - private string _staffer; - - public BasePaintedMask(int itemid) : this(StaffInfo.GetRandomStaff(), itemid) - { - } - - public BasePaintedMask(string staffer, int itemid) : base(itemid + Utility.Random(2)) => - _staffer = staffer.Intern(); - - public override string DefaultName => _staffer != null ? $"{MaskName} hand painted by {_staffer}" : MaskName; - - public virtual string MaskName => "A Mask"; -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/ClownMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/ClownMask.cs deleted file mode 100644 index 735285b54..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/ClownMask.cs +++ /dev/null @@ -1,15 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items.Holiday -{ - [SerializationGenerator(0, false)] - public partial class PaintedEvilClownMask : BasePaintedMask - { - [Constructible] - public PaintedEvilClownMask() : base(0x4a90) - { - } - - public override string MaskName => "Evil Clown Mask"; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/DaemonMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/DaemonMask.cs deleted file mode 100644 index 9d38be46d..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/DaemonMask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items.Holiday -{ - [SerializationGenerator(0, false)] - public partial class PaintedDaemonMask : BasePaintedMask - { - [Constructible] - public PaintedDaemonMask() - : base(0x4a92) - { - } - - public override string MaskName => "Daemon Mask"; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/PlagueMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/PlagueMask.cs deleted file mode 100644 index 320ac732d..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2011/Items/PlagueMask.cs +++ /dev/null @@ -1,16 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items.Holiday -{ - [SerializationGenerator(0, false)] - public partial class PaintedPlagueMask : BasePaintedMask - { - [Constructible] - public PaintedPlagueMask() - : base(0x4A8E) - { - } - - public override string MaskName => "Plague Mask"; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2011/Mobiles/PumpkinHead.cs b/Projects/UOContent/Holiday Stuff/Halloween/2011/Mobiles/PumpkinHead.cs deleted file mode 100644 index 2a4101991..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2011/Mobiles/PumpkinHead.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using ModernUO.Serialization; -using Server.Items; -using Server.Items.Holiday; - -namespace Server.Mobiles -{ - [SerializationGenerator(0, false)] - public partial class PumpkinHead : BaseCreature - { - [Constructible] - public PumpkinHead() - : base(Utility.RandomBool() ? AIType.AI_Melee : AIType.AI_Mage) - { - Body = 1246 + Utility.Random(2); - - BaseSoundID = 268; - - SetStr(350); - SetDex(125); - SetInt(250); - - SetHits(500); - SetMana(1000); - - SetDamage(10, 15); - - SetDamageType(ResistanceType.Physical, 100); - - SetResistance(ResistanceType.Physical, 55); - SetResistance(ResistanceType.Fire, 50); - SetResistance(ResistanceType.Cold, 50); - SetResistance(ResistanceType.Poison, 65); - SetResistance(ResistanceType.Energy, 80); - - SetSkill(SkillName.DetectHidden, 100.0); - SetSkill(SkillName.Meditation, 120.0); - SetSkill(SkillName.Necromancy, 100.0); - SetSkill(SkillName.SpiritSpeak, 120.0); - SetSkill(SkillName.Magery, 160.0); - SetSkill(SkillName.EvalInt, 100.0); - SetSkill(SkillName.MagicResist, 100.0); - SetSkill(SkillName.Tactics, 100.0); - SetSkill(SkillName.Wrestling, 80.0); - - Fame = 5000; - Karma = -5000; - - VirtualArmor = 49; - } - - public override string CorpseName => "a killer pumpkin corpse"; - public override bool AutoDispel => true; - public override bool BardImmune => true; - public override bool Unprovokable => true; - public override bool AreaPeaceImmune => true; - public override string DefaultName => "a killer pumpkin"; - - public override void GenerateLoot() - { - if (Utility.RandomDouble() < .05) - { - switch (Utility.Random(5)) - { - case 0: - PackItem(new PaintedEvilClownMask()); - break; - case 1: - PackItem(new PaintedDaemonMask()); - break; - case 2: - PackItem(new PaintedPlagueMask()); - break; - case 3: - PackItem(new PaintedEvilJesterMask()); - break; - case 4: - PackItem(new PaintedPorcelainMask()); - break; - } - } - - PackItem(new WrappedCandy()); - AddLoot(LootPack.UltraRich, 2); - } - - public virtual void Lifted_Callback(Mobile from) - { - if (from?.Deleted == false && from is PlayerMobile) - { - Combatant = from; - Warmode = true; - } - } - - public override Item NewHarmfulItem() => - new Acid(TimeSpan.FromSeconds(10), 25, 30) - { - Name = "gooey nasty pumpkin hummus", - Hue = 144 - }; - - public override void OnDamage(int amount, Mobile from, bool willKill) - { - if (Utility.RandomBool()) - { - if (from?.Map != null && Map != Map.Internal && Map == from.Map && from.InRange(this, 12)) - { - SpillAcid(willKill ? this : from, willKill ? 3 : 1); - } - } - - base.OnDamage(amount, from, willKill); - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs b/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs deleted file mode 100644 index b02a4aba2..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2012/Engines/PlayerZombies.cs +++ /dev/null @@ -1,229 +0,0 @@ -using System; -using System.Collections.Generic; -using ModernUO.CodeGeneratedEvents; -using ModernUO.Serialization; -using Server.Events.Halloween; -using Server.Items; -using Server.Mobiles; - -namespace Server.Engines.Events -{ - public static class HalloweenHauntings - { - private static Timer _timer; - private static Timer _clearTimer; - - private const int TotalZombieLimit = 200; - private const int DeathQueueLimit = 200; - private const int QueueDelaySeconds = 120; - private const int QueueClearIntervalSeconds = 1800; - - private static HashSet _deathQueue; - - private static readonly Rectangle2D[] _cemetaries = - [ - new(1272, 3712, 30, 20), // Jhelom - new(1337, 1444, 48, 52), // Britain - new(2424, 1098, 20, 28), // Trinsic - new(2728, 840, 54, 54), // Vesper - new(4528, 1314, 20, 28), // Moonglow - new(712, 1104, 30, 22), // Yew - new(5824, 1464, 22, 6), // Fire Dungeon - new(5224, 3655, 14, 5), // T2A - - new(1272, 3712, 20, 30), // Jhelom - new(1337, 1444, 52, 48), // Britain - new(2424, 1098, 28, 20), // Trinsic - new(2728, 840, 54, 54), // Vesper - new(4528, 1314, 28, 20), // Moonglow - new(712, 1104, 22, 30), // Yew - new(5824, 1464, 6, 22), // Fire Dungeon - new(5224, 3655, 5, 14) // T2A - ]; - - internal static Dictionary _reAnimated; - - [OnEvent(nameof(PlayerMobile.PlayerDeathEvent))] - public static void OnPlayerDeathEvent(PlayerMobile pm) - { - var now = Core.Now; - - if (now < HolidaySettings.StartHalloween || now > HolidaySettings.FinishHalloween) - { - return; - } - - _timer ??= Timer.DelayCall(TimeSpan.FromSeconds(QueueDelaySeconds), 0, Timer_Callback); - _clearTimer ??= Timer.DelayCall(TimeSpan.FromSeconds(QueueClearIntervalSeconds), 0, Clear_Callback); - - if (_timer.Running) - { - _deathQueue ??= []; - - if (_deathQueue.Count < DeathQueueLimit) - { - _deathQueue.Add(pm); - } - } - } - - private static void Clear_Callback() - { - if (Core.Now > HolidaySettings.FinishHalloween) - { - _clearTimer.Stop(); - _clearTimer = null; - _reAnimated = null; - _deathQueue = null; - return; - } - - _reAnimated?.Clear(); - _deathQueue?.Clear(); - } - - private static void Timer_Callback() - { - if (Core.Now > HolidaySettings.FinishHalloween) - { - _timer.Stop(); - _timer = null; - return; - } - - if (_deathQueue == null) - { - return; - } - - PlayerMobile player = null; - foreach (var entry in _deathQueue) - { - if (_reAnimated?.ContainsKey(entry) != true) - { - player = entry; - break; - } - } - - if (player?.Deleted != false || _reAnimated?.Count >= TotalZombieLimit) - { - return; - } - - var map = Utility.RandomBool() ? Map.Trammel : Map.Felucca; - var home = Utility.RandomPointIn(_cemetaries.RandomElement(), map); - - if (map.CanSpawnMobile(home)) - { - var zombieskel = new ZombieSkeleton(player); - - _reAnimated ??= []; - _reAnimated.Add(player, zombieskel); - - zombieskel.Home = home; - zombieskel.RangeHome = 10; - - zombieskel.MoveToWorld(home, map); - _deathQueue.Remove(player); - } - } - } - - [SerializationGenerator(0, false)] - public partial class PlayerBones : BaseContainer - { - [Constructible] - public PlayerBones(string name) : base(Utility.RandomMinMax(0x0ECA, 0x0ED2)) - { - Name = $"{name}'s bones"; - - Hue = Utility.Random(10) switch - { - 0 => 0xa09, - 1 => 0xa93, - 2 => 0xa47, - _ => Hue - }; - } - } - - [SerializationGenerator(0, false)] - public partial class ZombieSkeleton : BaseCreature - { - [SerializableField(0, "private", "private")] - private PlayerMobile _deadPlayer; - - public override string DefaultName => _deadPlayer != null ? $"{_deadPlayer.Name}'s Zombie Skeleton" : "Zombie Skeleton"; - - public ZombieSkeleton(PlayerMobile player = null) : base(AIType.AI_Melee) - { - _deadPlayer = player; - - Body = 0x93; - BaseSoundID = 0x1c3; - - SetStr(500); - SetDex(500); - SetInt(500); - - SetHits(2500); - SetMana(500); - SetStam(500); - - SetDamage(8, 18); - - SetDamageType(ResistanceType.Physical, 40); - SetDamageType(ResistanceType.Cold, 60); - - SetResistance(ResistanceType.Fire, 50); - SetResistance(ResistanceType.Energy, 50); - SetResistance(ResistanceType.Physical, 50); - SetResistance(ResistanceType.Cold, 50); - SetResistance(ResistanceType.Poison, 50); - - SetSkill(SkillName.MagicResist, 65.1, 80.0); - SetSkill(SkillName.Tactics, 95.1, 100); - SetSkill(SkillName.Wrestling, 85.1, 95); - - Fame = 1000; - Karma = -1000; - - VirtualArmor = 18; - } - - public override string CorpseName => "a rotting corpse"; - - public override bool BleedImmune => true; - - public override Poison PoisonImmune => Poison.Regular; - - public override void GenerateLoot() - { - var deadPlayerExists = _deadPlayer?.Deleted == false; - - PackItem( - Utility.Random(deadPlayerExists ? 8 : 10) switch - { - 0 => new LeftArm(), - 1 => new RightArm(), - 2 => new Torso(), - 3 => new Bone(), - 4 => new RibCage(), - 9 => deadPlayerExists ? new PlayerBones(_deadPlayer.Name) : null, - _ => null // 5-8, 10 (50%) - } - ); - - AddLoot(LootPack.Meager); - } - - public override void OnDelete() - { - if (_deadPlayer?.Deleted == false) - { - HalloweenHauntings._reAnimated?.Remove(_deadPlayer); - } - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/EvilJesterMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/EvilJesterMask.cs deleted file mode 100644 index 7cd77753d..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/EvilJesterMask.cs +++ /dev/null @@ -1,15 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items.Holiday -{ - [SerializationGenerator(0, false)] - public partial class PaintedEvilJesterMask : BasePaintedMask - { - [Constructible] - public PaintedEvilJesterMask() : base(0x4BA5) - { - } - - public override string MaskName => "Evil Jester Mask"; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/PorcelainMask.cs b/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/PorcelainMask.cs deleted file mode 100644 index 8a194e968..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/2012/Items/PorcelainMask.cs +++ /dev/null @@ -1,15 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items.Holiday -{ - [SerializationGenerator(0, false)] - public partial class PaintedPorcelainMask : BasePaintedMask - { - [Constructible] - public PaintedPorcelainMask() : base(0x4BA7) - { - } - - public override string MaskName => "Porcelain Mask"; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs b/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs deleted file mode 100644 index 06efc9174..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/HolidaySettings.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using Server.Items; - -namespace Server.Events.Halloween -{ - internal class HolidaySettings - { - private static readonly Type[] m_GMBeggarTreats = - { - typeof(CreepyCake), - typeof(PumpkinPizza), - typeof(GrimWarning), - typeof(HarvestWine), - typeof(MurkyMilk), - typeof(MrPlainsCookies), - typeof(SkullsOnPike), - typeof(ChairInAGhostCostume), - typeof(ExcellentIronMaiden), - typeof(HalloweenGuillotine), - typeof(ColoredSmallWebs) - }; - - private static readonly Type[] m_Treats = - { - typeof(Lollipops), - typeof(WrappedCandy), - typeof(JellyBeans), - typeof(Taffy), - typeof(NougatSwirl) - }; - - // YY MM DD - public static DateTime StartHalloween => new(2021, 10, 24); - - public static DateTime FinishHalloween => new(2021, 11, 15); - - 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 deleted file mode 100644 index 5b7279389..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Jellybeans.cs +++ /dev/null @@ -1,13 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class JellyBeans : CandyCane - { - [Constructible] - public JellyBeans(int amount = 1) : base(0x468C) => Stackable = true; - - public override int LabelNumber => 1096932; /* jellybeans */ - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Lollipops.cs b/Projects/UOContent/Holiday Stuff/Halloween/Treats/Lollipops.cs deleted file mode 100644 index 280be39c6..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Lollipops.cs +++ /dev/null @@ -1,12 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [TypeAlias("Server.Items.Lollipop")] - [SerializationGenerator(0, false)] - public partial class Lollipops : CandyCane - { - [Constructible] - public Lollipops(int amount = 1) : base(0x468D + Utility.Random(3)) => Stackable = true; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/Treats/NougatSwirl.cs b/Projects/UOContent/Holiday Stuff/Halloween/Treats/NougatSwirl.cs deleted file mode 100644 index 750239324..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/Treats/NougatSwirl.cs +++ /dev/null @@ -1,13 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class NougatSwirl : CandyCane - { - [Constructible] - public NougatSwirl(int amount = 1) : base(0x4690) => Stackable = true; - - public override int LabelNumber => 1096936; /* nougat swirl */ - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Taffy.cs b/Projects/UOContent/Holiday Stuff/Halloween/Treats/Taffy.cs deleted file mode 100644 index 814e4a822..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/Treats/Taffy.cs +++ /dev/null @@ -1,13 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class Taffy : CandyCane - { - [Constructible] - public Taffy(int amount = 1) : base(0x469D) => Stackable = true; - - public override int LabelNumber => 1096949; /* taffy */ - } -} diff --git a/Projects/UOContent/Holiday Stuff/Halloween/Treats/WrappedCandy.cs b/Projects/UOContent/Holiday Stuff/Halloween/Treats/WrappedCandy.cs deleted file mode 100644 index 8df86c688..000000000 --- a/Projects/UOContent/Holiday Stuff/Halloween/Treats/WrappedCandy.cs +++ /dev/null @@ -1,13 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class WrappedCandy : CandyCane - { - [Constructible] - public WrappedCandy(int amount = 1) : base(0x469e) => Stackable = true; - - public override int LabelNumber => 1096950; /* wrapped candy */ - } -} diff --git a/Projects/UOContent/Holiday Stuff/Valentine/2010/Items/AnimatedHeartShapedBox.cs b/Projects/UOContent/Holiday Stuff/Valentine/2010/Items/AnimatedHeartShapedBox.cs deleted file mode 100644 index 3429c0af4..000000000 --- a/Projects/UOContent/Holiday Stuff/Valentine/2010/Items/AnimatedHeartShapedBox.cs +++ /dev/null @@ -1,12 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - [Flippable(0x49CC, 0x49D0)] - public partial class AnimatedHeartShapedBox : HeartShapedBox - { - [Constructible] - public AnimatedHeartShapedBox() => ItemID = 0x49CC; - } -} diff --git a/Projects/UOContent/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs b/Projects/UOContent/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs deleted file mode 100644 index a08e5aa22..000000000 --- a/Projects/UOContent/Holiday Stuff/Valentine/2011/Items/StValentinesBears.cs +++ /dev/null @@ -1,220 +0,0 @@ -using System; -using ModernUO.Serialization; -using Server.Gumps; -using Server.Network; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public abstract partial class StValentinesBear : Item - { - [InternString] - [InvalidateProperties] - [SerializableField(0)] - [SerializedCommandProperty(AccessLevel.GameMaster)] - private string _owner; - - [InternString] - [InvalidateProperties] - [SerializableField(1)] - [SerializedCommandProperty(AccessLevel.GameMaster)] - private string _line1; - - [InternString] - [InvalidateProperties] - [SerializableField(2)] - [SerializedCommandProperty(AccessLevel.GameMaster)] - private string _line2; - - [InternString] - [InvalidateProperties] - [SerializableField(3)] - [SerializedCommandProperty(AccessLevel.GameMaster)] - private string _line3; - - public StValentinesBear(int itemid, string name) : base(itemid) - { - Owner = name; - LootType = LootType.Blessed; - } - - public override string DefaultName => _owner != null ? $"{_owner}'s St. Valentine Bear" : "St. Valentine Bear"; - - [CommandProperty(AccessLevel.GameMaster)] - public DateTime EditLimit { get; set; } - - public bool IsSigned => _line1 != null || _line2 != null || _line3 != null; - - public bool CanSign => !IsSigned || Core.Now <= EditLimit; - - public override void AddNameProperty(IPropertyList list) - { - if (_owner != null) - { - list.Add(1150295, _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~ ] - } - - private static void AddLine(IPropertyList list, int cliloc, string line) - { - if (line != null) - { - list.Add(cliloc, line); - } - } - - public override void OnSingleClick(Mobile from) - { - base.OnSingleClick(from); - - ShowLine(from, 1150301, _line1); // [ ~1_LINE0~ ] - ShowLine(from, 1150302, _line2); // [ ~1_LINE1~ ] - ShowLine(from, 1150303, _line3); // [ ~1_LINE2~ ] - } - - private void ShowLine(Mobile from, int cliloc, string line) - { - if (line != null) - { - LabelTo(from, cliloc, line); - } - } - - public override void OnDoubleClick(Mobile from) - { - if (!CupidsArrow.CheckSeason(from) || !CanSign) - { - return; - } - - if (!IsChildOf(from.Backpack)) - { - from.SendLocalizedMessage(1080063); // This must be in your backpack to use it. - return; - } - - StValentinesBearsGump.DisplayTo(from, this); - } - - private class StValentinesBearsGump : StaticGump - { - private readonly StValentinesBear _bear; - - public override bool Singleton => true; - - protected override bool Cached => false; - - private StValentinesBearsGump(StValentinesBear bear) : base(50, 50) - { - _bear = bear; - } - - public static void DisplayTo(Mobile from, StValentinesBear bear) - { - if (from?.NetState == null || bear?.Deleted != false) - { - return; - } - - from.SendGump(new StValentinesBearsGump(bear)); - } - - protected override void BuildLayout(ref StaticGumpBuilder builder) - { - builder.AddPage(); - builder.AddBackground(0, 0, 420, 320, 9300); - // St. Valentine Bear - builder.AddHtmlLocalized(10, 10, 400, 21, 1154645, "#1150294", 0); - - // Enter up to three lines of personalized greeting for your St. Valentine Bear. You many enter up to 25 characters per line. Once you enter text, you will only be able to correct mistakes for 10 minutes. - builder.AddHtmlLocalized(10, 40, 400, 75, 1150293, 0); - - builder.AddHtmlLocalized(10, 129, 400, 21, 1150296, 0); // Line 1: - builder.AddBackground(10, 150, 400, 24, 9350); - builder.AddTextEntryLimited(15, 152, 390, 20, 0, 0, "", 25); - - builder.AddHtmlLocalized(10, 179, 400, 21, 1150297, 0); // Line 2: - builder.AddBackground(10, 200, 400, 24, 9350); - builder.AddTextEntryLimited(15, 202, 390, 20, 0, 1, "", 25); - - builder.AddHtmlLocalized(10, 229, 400, 21, 1150298, 0); // Line 3: - builder.AddBackground(10, 250, 400, 24, 9350); - builder.AddTextEntryLimited(15, 252, 390, 20, 0, 2, "", 25); - - builder.AddButton(15, 285, 242, 241, 0); - builder.AddButton(335, 285, 247, 248, 1); - } - - public override void OnResponse(NetState sender, in RelayInfo info) - { - var from = sender.Mobile; - - if (_bear.Deleted || !_bear.IsChildOf(from.Backpack) || !_bear.CanSign || info.ButtonID != 1) - { - return; - } - - var line1 = GetLine(info, 0); - var line2 = GetLine(info, 1); - var line3 = GetLine(info, 2); - - if (string.IsNullOrEmpty(line1) - || string.IsNullOrEmpty(line2) - || string.IsNullOrEmpty(line3)) - { - from.SendMessage("Lines cannot be left blank."); - return; - } - - if (line1.Length > 25 - || line2.Length > 25 - || line3.Length > 25) - { - from.SendMessage("Lines may not exceed 25 characters."); - return; - } - - if (!_bear.IsSigned) - { - _bear.EditLimit = Core.Now + TimeSpan.FromMinutes(10); - } - - _bear.Line1 = line1.FixHtml(); - _bear.Line2 = line2.FixHtml(); - _bear.Line3 = line3.FixHtml(); - - from.SendMessage("You add the personalized greeting to your St. Valentine Bear."); - } - - private static string GetLine(RelayInfo info, int idx) => info.GetTextEntry(idx); - } - } - - [SerializationGenerator(0, false)] - [Flippable(0x48E0, 0x48E1)] - public partial class StValentinesPanda : StValentinesBear - { - [Constructible] - public StValentinesPanda(string name = null) : base(0x48E0, name) - { - } - } - - [SerializationGenerator(0, false)] - [Flippable(0x48E2, 0x48E3)] - public partial class StValentinesPolarBear : StValentinesBear - { - [Constructible] - public StValentinesPolarBear(string name = null) : base(0x48E2, name) - { - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidStatue.cs b/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidStatue.cs deleted file mode 100644 index 20a11413a..000000000 --- a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidStatue.cs +++ /dev/null @@ -1,14 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - [Flippable(0x4F7C, 0x4F7D)] - public partial class CupidStatue : Item - { - [Constructible] - public CupidStatue() : base(0x4F7D) => LootType = LootType.Blessed; - - public override int LabelNumber => 1099220; // cupid statue - } -} diff --git a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs b/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs deleted file mode 100644 index 021ae4708..000000000 --- a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/CupidsArrow.cs +++ /dev/null @@ -1,108 +0,0 @@ -using ModernUO.Serialization; -using Server.Targeting; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - public partial class CupidsArrow : Item - { - [InternString] - [InvalidateProperties] - [SerializableField(0)] - [SerializedCommandProperty(AccessLevel.GameMaster)] - private string _from; - - [InternString] - [InvalidateProperties] - [SerializableField(1)] - [SerializedCommandProperty(AccessLevel.GameMaster)] - private string _to; - - [Constructible] - public CupidsArrow() : base(0x4F7F) => LootType = LootType.Blessed; - - // TODO: Check messages - - public override int LabelNumber => 1152270; // Cupid's Arrow 2012 - - public bool IsSigned => _from != null && _to != null; - - public override void AddNameProperty(IPropertyList list) - { - base.AddNameProperty(list); - - if (IsSigned) - { - list.Add(1152273, $"{_from}\t{_to}"); // ~1_val~ is madly in love with ~2_val~ - } - } - - public static bool CheckSeason(Mobile from) - { - if (Core.Now.Month == 2) - { - return true; - } - - from.SendLocalizedMessage(1152318); // You may not use this item out of season. - return true; - } - - public override void OnSingleClick(Mobile from) - { - base.OnSingleClick(from); - - if (IsSigned) - { - LabelTo(from, 1152273, $"{_from}\t{_to}"); // ~1_val~ is madly in love with ~2_val~ - } - } - - public override void OnDoubleClick(Mobile from) - { - if (IsSigned || !CheckSeason(from)) - { - return; - } - - if (!IsChildOf(from.Backpack)) - { - from.SendLocalizedMessage(1080063); // This must be in your backpack to use it. - return; - } - - from.BeginTarget(10, false, TargetFlags.None, OnTarget); - from.SendMessage("Who do you wish to use this on?"); - } - - private void OnTarget(Mobile from, object targeted) - { - if (IsSigned || !IsChildOf(from.Backpack)) - { - return; - } - - if (targeted is Mobile m) - { - if (!m.Alive) - { - from.SendLocalizedMessage( - 1152269 - ); // That target is dead and even Cupid's arrow won't make them love you. - return; - } - - From = from.Name; - To = m.Name; - - InvalidateProperties(); - - from.SendMessage("You inscribe the arrow."); - } - else - { - from.SendMessage("That is not a person."); - } - } - } -} diff --git a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/HeartShapedBox.cs b/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/HeartShapedBox.cs deleted file mode 100644 index 5882a3780..000000000 --- a/Projects/UOContent/Holiday Stuff/Valentine/2012/Items/HeartShapedBox.cs +++ /dev/null @@ -1,35 +0,0 @@ -using ModernUO.Serialization; - -namespace Server.Items -{ - [SerializationGenerator(0, false)] - [Flippable(0x49CA, 0x49CB)] - public partial class HeartShapedBox : BaseContainer - { - private static int m_DropSound; - - [Constructible] - public HeartShapedBox() : base(0x49CA) - { - } - - public override int DefaultDropSound => m_DropSound; - - public override bool OnDragDropInto(Mobile from, Item item, Point3D p) - { - PrepareSound(from); - return base.OnDragDropInto(from, item, p); - } - - public override bool OnDragDrop(Mobile from, Item dropped) - { - PrepareSound(from); - return base.OnDragDrop(from, dropped); - } - - private static void PrepareSound(Mobile from) - { - m_DropSound = from.Female ? 0x430 : 0x320; - } - } -}