fix: Fixes scales, heritage items, and codegens holiday items (#1365)
This commit is contained in:
parent
f1e8d4c6f7
commit
0645251ec7
80 changed files with 1825 additions and 2694 deletions
|
|
@ -1,8 +1,14 @@
|
|||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
public abstract class BaseScales : Item, ICommodity
|
||||
[SerializationGenerator(1, false)]
|
||||
public abstract partial class BaseScales : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
[InvalidateProperties]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private CraftResource _resource;
|
||||
|
||||
public BaseScales(CraftResource resource, int amount = 1) : base(0x26B4)
|
||||
{
|
||||
|
|
@ -10,211 +16,74 @@ public abstract class BaseScales : Item, ICommodity
|
|||
Amount = amount;
|
||||
Hue = CraftResources.GetHue(resource);
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseScales(Serial serial) : base(serial)
|
||||
{
|
||||
_resource = resource;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1053139; // dragon scales
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get => m_Resource;
|
||||
set
|
||||
{
|
||||
m_Resource = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 0.1;
|
||||
|
||||
int ICommodity.DescriptionNumber => LabelNumber;
|
||||
bool ICommodity.IsDeedable => true;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
private void Deserialize(IGenericReader reader, int version)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write((int)m_Resource);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
_resource = (CraftResource)reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class RedScales : BaseScales
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class RedScales : BaseScales
|
||||
{
|
||||
[Constructible]
|
||||
public RedScales(int amount = 1) : base(CraftResource.RedScales, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public RedScales(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class YellowScales : BaseScales
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class YellowScales : BaseScales
|
||||
{
|
||||
[Constructible]
|
||||
public YellowScales(int amount = 1) : base(CraftResource.YellowScales, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public YellowScales(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class BlackScales : BaseScales
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class BlackScales : BaseScales
|
||||
{
|
||||
[Constructible]
|
||||
public BlackScales(int amount = 1) : base(CraftResource.BlackScales, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public BlackScales(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class GreenScales : BaseScales
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GreenScales : BaseScales
|
||||
{
|
||||
[Constructible]
|
||||
public GreenScales(int amount = 1) : base(CraftResource.GreenScales, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public GreenScales(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class WhiteScales : BaseScales
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class WhiteScales : BaseScales
|
||||
{
|
||||
[Constructible]
|
||||
public WhiteScales(int amount = 1) : base(CraftResource.WhiteScales, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public WhiteScales(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class BlueScales : BaseScales
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class BlueScales : BaseScales
|
||||
{
|
||||
[Constructible]
|
||||
public BlueScales(int amount = 1) : base(CraftResource.BlueScales, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public BlueScales(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1053140; // sea serpent scales
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -111,7 +111,8 @@ public partial class GuillotineAddon : BaseAddon
|
|||
}
|
||||
}
|
||||
|
||||
public class GuillotineDeed : BaseAddonDeed
|
||||
[SerializationGenerator(0)]
|
||||
public partial class GuillotineDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public GuillotineDeed() => LootType = LootType.Blessed;
|
||||
|
|
|
|||
|
|
@ -1,303 +1,211 @@
|
|||
using System.Collections.Generic;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Multis;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
public enum HolidayTreeType
|
||||
{
|
||||
public enum HolidayTreeType
|
||||
Classic,
|
||||
Modern
|
||||
}
|
||||
|
||||
[SerializationGenerator(2, false)]
|
||||
public partial class HolidayTree : Item, IAddon
|
||||
{
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private Mobile _placer;
|
||||
|
||||
private Item[] _components;
|
||||
|
||||
public HolidayTree(Mobile from, HolidayTreeType type, Point3D loc) : base(1)
|
||||
{
|
||||
Classic,
|
||||
Modern
|
||||
Movable = false;
|
||||
MoveToWorld(loc, from.Map);
|
||||
|
||||
Placer = from;
|
||||
|
||||
var index = 0;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case HolidayTreeType.Classic:
|
||||
{
|
||||
ItemID = 0xCD7;
|
||||
|
||||
_components = new Item[28];
|
||||
|
||||
AddItem(0, 0, 0, new TreeTrunk(this, 0xCD6), index++);
|
||||
|
||||
AddOrnament(0, 0, 2, 0xF22, index++);
|
||||
AddOrnament(0, 0, 9, 0xF18, index++);
|
||||
AddOrnament(0, 0, 15, 0xF20, index++);
|
||||
AddOrnament(0, 0, 19, 0xF17, index++);
|
||||
AddOrnament(0, 0, 20, 0xF24, index++);
|
||||
AddOrnament(0, 0, 20, 0xF1F, index++);
|
||||
AddOrnament(0, 0, 20, 0xF19, index++);
|
||||
AddOrnament(0, 0, 21, 0xF1B, index++);
|
||||
AddOrnament(0, 0, 28, 0xF2F, index++);
|
||||
AddOrnament(0, 0, 30, 0xF23, index++);
|
||||
AddOrnament(0, 0, 32, 0xF2A, index++);
|
||||
AddOrnament(0, 0, 33, 0xF30, index++);
|
||||
AddOrnament(0, 0, 34, 0xF29, index++);
|
||||
AddOrnament(0, 1, 7, 0xF16, index++);
|
||||
AddOrnament(0, 1, 7, 0xF1E, index++);
|
||||
AddOrnament(0, 1, 12, 0xF0F, index++);
|
||||
AddOrnament(0, 1, 13, 0xF13, index++);
|
||||
AddOrnament(0, 1, 18, 0xF12, index++);
|
||||
AddOrnament(0, 1, 19, 0xF15, index++);
|
||||
AddOrnament(0, 1, 25, 0xF28, index++);
|
||||
AddOrnament(0, 1, 29, 0xF1A, index++);
|
||||
AddOrnament(0, 1, 37, 0xF2B, index++);
|
||||
AddOrnament(1, 0, 13, 0xF10, index++);
|
||||
AddOrnament(1, 0, 14, 0xF1C, index++);
|
||||
AddOrnament(1, 0, 16, 0xF14, index++);
|
||||
AddOrnament(1, 0, 17, 0xF26, index++);
|
||||
AddOrnament(1, 0, 22, 0xF27, index);
|
||||
break;
|
||||
}
|
||||
case HolidayTreeType.Modern:
|
||||
{
|
||||
ItemID = 0x1B7E;
|
||||
_components = new Item[23];
|
||||
|
||||
AddOrnament(0, 0, 2, 0xF2F, index++);
|
||||
AddOrnament(0, 0, 2, 0xF20, index++);
|
||||
AddOrnament(0, 0, 2, 0xF22, index++);
|
||||
AddOrnament(0, 0, 5, 0xF30, index++);
|
||||
AddOrnament(0, 0, 5, 0xF15, index++);
|
||||
AddOrnament(0, 0, 5, 0xF1F, index++);
|
||||
AddOrnament(0, 0, 5, 0xF2B, index++);
|
||||
AddOrnament(0, 0, 6, 0xF0F, index++);
|
||||
AddOrnament(0, 0, 7, 0xF1E, index++);
|
||||
AddOrnament(0, 0, 7, 0xF24, index++);
|
||||
AddOrnament(0, 0, 8, 0xF29, index++);
|
||||
AddOrnament(0, 0, 9, 0xF18, index++);
|
||||
AddOrnament(0, 0, 14, 0xF1C, index++);
|
||||
AddOrnament(0, 0, 15, 0xF13, index++);
|
||||
AddOrnament(0, 0, 15, 0xF20, index++);
|
||||
AddOrnament(0, 0, 16, 0xF26, index++);
|
||||
AddOrnament(0, 0, 17, 0xF12, index++);
|
||||
AddOrnament(0, 0, 18, 0xF17, index++);
|
||||
AddOrnament(0, 0, 20, 0xF1B, index++);
|
||||
AddOrnament(0, 0, 23, 0xF28, index++);
|
||||
AddOrnament(0, 0, 25, 0xF18, index++);
|
||||
AddOrnament(0, 0, 25, 0xF2A, index++);
|
||||
AddOrnament(0, 1, 7, 0xF16, index);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class HolidayTree : Item, IAddon
|
||||
public override int LabelNumber => 1041117; // a tree for the holidays
|
||||
|
||||
public bool CouldFit(IPoint3D p, Map map) => map.CanFit((Point3D)p, 20);
|
||||
|
||||
Item IAddon.Deed => new HolidayTreeDeed();
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
private List<Item> m_Components;
|
||||
|
||||
public HolidayTree(Mobile from, HolidayTreeType type, Point3D loc) : base(1)
|
||||
for (var i = 0; i < _components.Length; ++i)
|
||||
{
|
||||
Movable = false;
|
||||
MoveToWorld(loc, from.Map);
|
||||
_components[i]?.Delete();
|
||||
}
|
||||
|
||||
Placer = from;
|
||||
m_Components = new List<Item>();
|
||||
_components = null;
|
||||
}
|
||||
|
||||
switch (type)
|
||||
private void AddOrnament(int x, int y, int z, int itemID, int index)
|
||||
{
|
||||
AddItem(x + 1, y + 1, z + 11, new Ornament(itemID), index);
|
||||
}
|
||||
|
||||
private void AddItem(int x, int y, int z, Item item, int index)
|
||||
{
|
||||
item.MoveToWorld(new Point3D(Location.X + x, Location.Y + y, Location.Z + z), Map);
|
||||
|
||||
_components[index] = item;
|
||||
}
|
||||
|
||||
private void Deserialize(IGenericReader reader, int version)
|
||||
{
|
||||
_placer = reader.ReadEntity<Mobile>();
|
||||
|
||||
var count = reader.ReadInt();
|
||||
|
||||
_components = new Item[count];
|
||||
|
||||
for (var i = 0; i < count; ++i)
|
||||
{
|
||||
var item = reader.ReadEntity<Item>();
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
case HolidayTreeType.Classic:
|
||||
{
|
||||
ItemID = 0xCD7;
|
||||
|
||||
AddItem(0, 0, 0, new TreeTrunk(this, 0xCD6));
|
||||
|
||||
AddOrnament(0, 0, 2, 0xF22);
|
||||
AddOrnament(0, 0, 9, 0xF18);
|
||||
AddOrnament(0, 0, 15, 0xF20);
|
||||
AddOrnament(0, 0, 19, 0xF17);
|
||||
AddOrnament(0, 0, 20, 0xF24);
|
||||
AddOrnament(0, 0, 20, 0xF1F);
|
||||
AddOrnament(0, 0, 20, 0xF19);
|
||||
AddOrnament(0, 0, 21, 0xF1B);
|
||||
AddOrnament(0, 0, 28, 0xF2F);
|
||||
AddOrnament(0, 0, 30, 0xF23);
|
||||
AddOrnament(0, 0, 32, 0xF2A);
|
||||
AddOrnament(0, 0, 33, 0xF30);
|
||||
AddOrnament(0, 0, 34, 0xF29);
|
||||
AddOrnament(0, 1, 7, 0xF16);
|
||||
AddOrnament(0, 1, 7, 0xF1E);
|
||||
AddOrnament(0, 1, 12, 0xF0F);
|
||||
AddOrnament(0, 1, 13, 0xF13);
|
||||
AddOrnament(0, 1, 18, 0xF12);
|
||||
AddOrnament(0, 1, 19, 0xF15);
|
||||
AddOrnament(0, 1, 25, 0xF28);
|
||||
AddOrnament(0, 1, 29, 0xF1A);
|
||||
AddOrnament(0, 1, 37, 0xF2B);
|
||||
AddOrnament(1, 0, 13, 0xF10);
|
||||
AddOrnament(1, 0, 14, 0xF1C);
|
||||
AddOrnament(1, 0, 16, 0xF14);
|
||||
AddOrnament(1, 0, 17, 0xF26);
|
||||
AddOrnament(1, 0, 22, 0xF27);
|
||||
|
||||
break;
|
||||
}
|
||||
case HolidayTreeType.Modern:
|
||||
{
|
||||
ItemID = 0x1B7E;
|
||||
|
||||
AddOrnament(0, 0, 2, 0xF2F);
|
||||
AddOrnament(0, 0, 2, 0xF20);
|
||||
AddOrnament(0, 0, 2, 0xF22);
|
||||
AddOrnament(0, 0, 5, 0xF30);
|
||||
AddOrnament(0, 0, 5, 0xF15);
|
||||
AddOrnament(0, 0, 5, 0xF1F);
|
||||
AddOrnament(0, 0, 5, 0xF2B);
|
||||
AddOrnament(0, 0, 6, 0xF0F);
|
||||
AddOrnament(0, 0, 7, 0xF1E);
|
||||
AddOrnament(0, 0, 7, 0xF24);
|
||||
AddOrnament(0, 0, 8, 0xF29);
|
||||
AddOrnament(0, 0, 9, 0xF18);
|
||||
AddOrnament(0, 0, 14, 0xF1C);
|
||||
AddOrnament(0, 0, 15, 0xF13);
|
||||
AddOrnament(0, 0, 15, 0xF20);
|
||||
AddOrnament(0, 0, 16, 0xF26);
|
||||
AddOrnament(0, 0, 17, 0xF12);
|
||||
AddOrnament(0, 0, 18, 0xF17);
|
||||
AddOrnament(0, 0, 20, 0xF1B);
|
||||
AddOrnament(0, 0, 23, 0xF28);
|
||||
AddOrnament(0, 0, 25, 0xF18);
|
||||
AddOrnament(0, 0, 25, 0xF2A);
|
||||
AddOrnament(0, 1, 7, 0xF16);
|
||||
|
||||
break;
|
||||
}
|
||||
_components[i] = item;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public HolidayTree(Serial serial) : base(serial)
|
||||
[AfterDeserialization(false)]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
if (BaseHouse.FindHouseAt(this) == null)
|
||||
{
|
||||
var deed = new HolidayTreeDeed();
|
||||
deed.MoveToWorld(Location, Map);
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 1))
|
||||
{
|
||||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
return;
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Placer { get; set; }
|
||||
if (_placer != null && from != _placer && from.AccessLevel < AccessLevel.GameMaster)
|
||||
{
|
||||
from.SendLocalizedMessage(503396); // You cannot take this tree down.
|
||||
return;
|
||||
}
|
||||
|
||||
from.AddToBackpack(new HolidayTreeDeed());
|
||||
|
||||
Delete();
|
||||
|
||||
BaseHouse.FindHouseAt(this)?.Addons?.Remove(this);
|
||||
from.SendLocalizedMessage(503393); // A deed for the tree has been placed in your backpack.
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
private partial class Ornament : Item
|
||||
{
|
||||
public Ornament(int itemID) : base(itemID) => Movable = false;
|
||||
|
||||
public override int LabelNumber => 1041118; // a tree ornament
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
private partial class TreeTrunk : Item
|
||||
{
|
||||
private HolidayTree _tree;
|
||||
|
||||
public TreeTrunk(HolidayTree tree, int itemID) : base(itemID)
|
||||
{
|
||||
Movable = false;
|
||||
MoveToWorld(tree.Location, tree.Map);
|
||||
_tree = tree;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041117; // a tree for the holidays
|
||||
|
||||
public bool CouldFit(IPoint3D p, Map map) => map.CanFit((Point3D)p, 20);
|
||||
|
||||
Item IAddon.Deed => new HolidayTreeDeed();
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
for (var i = 0; i < m_Components.Count; ++i)
|
||||
{
|
||||
m_Components[i].Delete();
|
||||
}
|
||||
}
|
||||
|
||||
private void AddOrnament(int x, int y, int z, int itemID)
|
||||
{
|
||||
AddItem(x + 1, y + 1, z + 11, new Ornament(itemID));
|
||||
}
|
||||
|
||||
private void AddItem(int x, int y, int z, Item item)
|
||||
{
|
||||
item.MoveToWorld(new Point3D(Location.X + x, Location.Y + y, Location.Z + z), Map);
|
||||
|
||||
m_Components.Add(item);
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1); // version
|
||||
|
||||
writer.Write(Placer);
|
||||
|
||||
writer.Write(m_Components.Count);
|
||||
|
||||
for (var i = 0; i < m_Components.Count; ++i)
|
||||
{
|
||||
writer.Write(m_Components[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Placer = reader.ReadEntity<Mobile>();
|
||||
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
var count = reader.ReadInt();
|
||||
|
||||
m_Components = new List<Item>(count);
|
||||
|
||||
for (var i = 0; i < count; ++i)
|
||||
{
|
||||
var item = reader.ReadEntity<Item>();
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
m_Components.Add(item);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Timer.StartTimer(ValidatePlacement);
|
||||
}
|
||||
|
||||
public void ValidatePlacement()
|
||||
{
|
||||
if (BaseHouse.FindHouseAt(this) == null)
|
||||
{
|
||||
var deed = new HolidayTreeDeed();
|
||||
deed.MoveToWorld(Location, Map);
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 1))
|
||||
if (_tree?.Deleted == false)
|
||||
{
|
||||
if (Placer == null || from == Placer || from.AccessLevel >= AccessLevel.GameMaster)
|
||||
{
|
||||
from.AddToBackpack(new HolidayTreeDeed());
|
||||
|
||||
Delete();
|
||||
|
||||
var house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
if (house?.Addons.Contains(this) == true)
|
||||
{
|
||||
house.Addons.Remove(this);
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(503393); // A deed for the tree has been placed in your backpack.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(503396); // You cannot take this tree down.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
}
|
||||
}
|
||||
|
||||
private class Ornament : Item
|
||||
{
|
||||
public Ornament(int itemID) : base(itemID) => Movable = false;
|
||||
|
||||
public Ornament(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041118; // a tree ornament
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
private class TreeTrunk : Item
|
||||
{
|
||||
private HolidayTree m_Tree;
|
||||
|
||||
public TreeTrunk(HolidayTree tree, int itemID) : base(itemID)
|
||||
{
|
||||
Movable = false;
|
||||
MoveToWorld(tree.Location, tree.Map);
|
||||
|
||||
m_Tree = tree;
|
||||
}
|
||||
|
||||
public TreeTrunk(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041117; // a tree for the holidays
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_Tree?.Deleted == false)
|
||||
{
|
||||
m_Tree.OnDoubleClick(from);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(m_Tree);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Tree = reader.ReadEntity<HolidayTree>();
|
||||
|
||||
if (m_Tree == null)
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
_tree.OnDoubleClick(from);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,37 +1,21 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Furniture]
|
||||
[Flippable(0x232A, 0x232B)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GiftBox : BaseContainer
|
||||
{
|
||||
[Furniture]
|
||||
[Flippable(0x232A, 0x232B)]
|
||||
public class GiftBox : BaseContainer
|
||||
[Constructible]
|
||||
public GiftBox() : this(Utility.RandomDyedHue())
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBox() : this(Utility.RandomDyedHue())
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GiftBox(int hue) : base(Utility.Random(0x232A, 2))
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public GiftBox(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();
|
||||
}
|
||||
[Constructible]
|
||||
public GiftBox(int hue) : base(Utility.Random(0x232A, 2))
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = hue;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,62 +1,33 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GingerBreadHouseAddon : BaseAddon
|
||||
{
|
||||
public class GingerBreadHouseAddon : BaseAddon
|
||||
public GingerBreadHouseAddon()
|
||||
{
|
||||
public GingerBreadHouseAddon()
|
||||
for (var i = 0x2be5; i < 0x2be8; i++)
|
||||
{
|
||||
for (var i = 0x2be5; i < 0x2be8; i++)
|
||||
{
|
||||
var laoc = new LocalizedAddonComponent(i, 1077395); // Gingerbread House
|
||||
laoc.Light = LightType.SouthSmall;
|
||||
AddComponent(laoc, i == 0x2be5 ? -1 : 0, i == 0x2be7 ? -1 : 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public GingerBreadHouseAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new GingerBreadHouseDeed();
|
||||
|
||||
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();
|
||||
var laoc = new LocalizedAddonComponent(i, 1077395); // Gingerbread House
|
||||
laoc.Light = LightType.SouthSmall;
|
||||
AddComponent(laoc, i == 0x2be5 ? -1 : 0, i == 0x2be7 ? -1 : 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public class GingerBreadHouseDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public GingerBreadHouseDeed()
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public GingerBreadHouseDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1077394; // a Gingerbread House Deed
|
||||
public override BaseAddon Addon => new GingerBreadHouseAddon();
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
public override BaseAddonDeed Deed => new GingerBreadHouseDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GingerBreadHouseDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public GingerBreadHouseDeed()
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1077394; // a Gingerbread House Deed
|
||||
public override BaseAddon Addon => new GingerBreadHouseAddon();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,120 +1,55 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class HolidayBell : Item
|
||||
{
|
||||
public class HolidayBell : Item
|
||||
private static readonly int[] _hues =
|
||||
{
|
||||
private static readonly string[] m_StaffNames =
|
||||
{
|
||||
"Adrick",
|
||||
"Alai",
|
||||
"Bulldoz",
|
||||
"Evocare",
|
||||
"FierY-iCe",
|
||||
"Greyburn",
|
||||
"Hanse",
|
||||
"Ignatz",
|
||||
"Jalek",
|
||||
"LadyMOI",
|
||||
"Lord Krum",
|
||||
"Malantus",
|
||||
"Nimrond",
|
||||
"Oaks",
|
||||
"Prophet",
|
||||
"Runesabre",
|
||||
"Sage",
|
||||
"Stellerex",
|
||||
"T-Bone",
|
||||
"Tajima",
|
||||
"Tyrant",
|
||||
"Vex"
|
||||
};
|
||||
0xA, 0x24, 0x42, 0x56, 0x1A, 0x4C, 0x3C, 0x60, 0x2E, 0x55, 0x23, 0x38, 0x482, 0x6, 0x10
|
||||
};
|
||||
|
||||
private static readonly int[] m_Hues =
|
||||
{
|
||||
0xA, 0x24, 0x42, 0x56, 0x1A, 0x4C, 0x3C, 0x60, 0x2E, 0x55, 0x23, 0x38, 0x482, 0x6, 0x10
|
||||
};
|
||||
[InvalidateProperties]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private TextDefinition _maker;
|
||||
|
||||
private string m_Maker;
|
||||
private int m_SoundID;
|
||||
[InvalidateProperties]
|
||||
[SerializableField(1)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private int _soundID;
|
||||
|
||||
[Constructible]
|
||||
public HolidayBell()
|
||||
: this(m_StaffNames.RandomElement())
|
||||
[Constructible]
|
||||
public HolidayBell() : this(1041441 + Utility.Random(22))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HolidayBell(TextDefinition maker) : base(0x1C12)
|
||||
{
|
||||
_maker = maker;
|
||||
|
||||
LootType = LootType.Blessed;
|
||||
Hue = _hues.RandomElement();
|
||||
_soundID = 0x0F5 + Utility.Random(14);
|
||||
}
|
||||
|
||||
public override int LabelNumber => _maker?.Number > 0 ? _maker.Number : base.LabelNumber;
|
||||
|
||||
public override string DefaultName => _maker?.String != null
|
||||
? $"a holiday bell from {_maker.String}"
|
||||
: "a holiday bell";
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HolidayBell(string maker)
|
||||
: base(0x1C12)
|
||||
else
|
||||
{
|
||||
m_Maker = maker;
|
||||
|
||||
LootType = LootType.Blessed;
|
||||
Hue = m_Hues.RandomElement();
|
||||
SoundID = 0x0F5 + Utility.Random(14);
|
||||
}
|
||||
|
||||
public HolidayBell(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int SoundID
|
||||
{
|
||||
get => m_SoundID;
|
||||
set
|
||||
{
|
||||
m_SoundID = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string Giver
|
||||
{
|
||||
get => m_Maker;
|
||||
set
|
||||
{
|
||||
m_Maker = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override string DefaultName => $"A Holiday Bell From {Giver}";
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
from.SendLocalizedMessage(500446); // That is too far away.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.PlaySound(m_SoundID);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(m_Maker);
|
||||
|
||||
writer.WriteEncodedInt(m_SoundID);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
m_Maker = reader.ReadString();
|
||||
m_SoundID = reader.ReadEncodedInt();
|
||||
|
||||
Utility.Intern(ref m_Maker);
|
||||
from.PlaySound(_soundID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,165 +1,130 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class CandyCane : Food
|
||||
{
|
||||
public class CandyCane : Food
|
||||
private static readonly Dictionary<Mobile, CandyCaneTimer> _toothAches = new();
|
||||
|
||||
[Constructible]
|
||||
public CandyCane() : this(0x2bdd + Utility.Random(4))
|
||||
{
|
||||
private static readonly Dictionary<Mobile, CandyCaneTimer> m_ToothAches = new();
|
||||
|
||||
[Constructible]
|
||||
public CandyCane()
|
||||
: this(0x2bdd + Utility.Random(4))
|
||||
{
|
||||
}
|
||||
|
||||
public CandyCane(int itemID) : base(itemID)
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public CandyCane(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
private static CandyCaneTimer EnsureTimer(Mobile from)
|
||||
{
|
||||
if (!m_ToothAches.TryGetValue(from, out var timer))
|
||||
{
|
||||
m_ToothAches[from] = timer = new CandyCaneTimer(from);
|
||||
}
|
||||
|
||||
return timer;
|
||||
}
|
||||
|
||||
public static int GetToothAche(Mobile from) => m_ToothAches.TryGetValue(from, out var timer) ? timer.Eaten : 0;
|
||||
|
||||
public static void SetToothAche(Mobile from, int value)
|
||||
{
|
||||
EnsureTimer(from).Eaten = value;
|
||||
}
|
||||
|
||||
public override bool CheckHunger(Mobile from)
|
||||
{
|
||||
EnsureTimer(from).Eaten += 32;
|
||||
|
||||
from.SendLocalizedMessage(1077387); // You feel as if you could eat as much as you wanted!
|
||||
return true;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
public class CandyCaneTimer : Timer
|
||||
{
|
||||
public CandyCaneTimer(Mobile eater)
|
||||
: base(TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(30))
|
||||
{
|
||||
Eater = eater;
|
||||
Start();
|
||||
}
|
||||
|
||||
public Mobile Eater { get; }
|
||||
|
||||
public int Eaten { get; set; }
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
--Eaten;
|
||||
|
||||
if (Eater?.Deleted != false || Eaten <= 0)
|
||||
{
|
||||
Stop();
|
||||
m_ToothAches.Remove(Eater);
|
||||
}
|
||||
else if (Eater.Map != Map.Internal && Eater.Alive)
|
||||
{
|
||||
if (Eaten > 60)
|
||||
{
|
||||
Eater.Say(1077388 + Utility.Random(5));
|
||||
|
||||
/* ARRGH! My tooth hurts sooo much!
|
||||
* You just can't find a good Britannian dentist these days...
|
||||
* My teeth!
|
||||
* MAKE IT STOP!
|
||||
* AAAH! It feels like someone kicked me in the teeth!
|
||||
*/
|
||||
|
||||
if (Utility.RandomBool() && Eater.Body.IsHuman && !Eater.Mounted)
|
||||
{
|
||||
Eater.Animate(32, 5, 1, true, false, 0);
|
||||
}
|
||||
}
|
||||
else if (Eaten == 60)
|
||||
{
|
||||
Eater.SendLocalizedMessage(1077393); // The extreme pain in your teeth subsides.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class GingerBreadCookie : Food
|
||||
public CandyCane(int itemID) : base(itemID)
|
||||
{
|
||||
private readonly int[] m_Messages =
|
||||
{
|
||||
0,
|
||||
1077396, // Noooo!
|
||||
1077397, // Please don't eat me... *whimper*
|
||||
1077405, // Not the face!
|
||||
1077406, // Ahhhhhh! My foot's gone!
|
||||
1077407, // Please. No! I have gingerkids!
|
||||
1077408, // No, no! I'm really made of poison. Really.
|
||||
1077409 // Run, run as fast as you can! You can't catch me! I'm the gingerbread man!
|
||||
};
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public GingerBreadCookie()
|
||||
: base(Utility.RandomBool() ? 0x2be1 : 0x2be2)
|
||||
private static CandyCaneTimer EnsureTimer(Mobile from)
|
||||
{
|
||||
if (!_toothAches.TryGetValue(from, out var timer))
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
_toothAches[from] = timer = new CandyCaneTimer(from);
|
||||
}
|
||||
|
||||
public GingerBreadCookie(Serial serial)
|
||||
: base(serial)
|
||||
return timer;
|
||||
}
|
||||
|
||||
public static int GetToothAche(Mobile from) => _toothAches.TryGetValue(from, out var timer) ? timer.Eaten : 0;
|
||||
|
||||
public static void SetToothAche(Mobile from, int value)
|
||||
{
|
||||
EnsureTimer(from).Eaten = value;
|
||||
}
|
||||
|
||||
public override bool CheckHunger(Mobile from)
|
||||
{
|
||||
EnsureTimer(from).Eaten += 32;
|
||||
|
||||
from.SendLocalizedMessage(1077387); // You feel as if you could eat as much as you wanted!
|
||||
return true;
|
||||
}
|
||||
|
||||
public class CandyCaneTimer : Timer
|
||||
{
|
||||
private readonly Mobile _eater;
|
||||
|
||||
public CandyCaneTimer(Mobile eater) : base(TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(30))
|
||||
{
|
||||
_eater = eater;
|
||||
Start();
|
||||
}
|
||||
|
||||
public override bool Eat(Mobile from)
|
||||
{
|
||||
var message = m_Messages.RandomElement();
|
||||
public int Eaten { get; set; }
|
||||
|
||||
if (message != 0)
|
||||
protected override void OnTick()
|
||||
{
|
||||
--Eaten;
|
||||
|
||||
if (_eater.Deleted || Eaten <= 0)
|
||||
{
|
||||
SendLocalizedMessageTo(from, message);
|
||||
return false;
|
||||
Stop();
|
||||
_toothAches.Remove(_eater);
|
||||
}
|
||||
else if (_eater.Map != Map.Internal && _eater.Alive)
|
||||
{
|
||||
if (Eaten > 60)
|
||||
{
|
||||
_eater.Say(1077388 + Utility.Random(5));
|
||||
|
||||
return base.Eat(from);
|
||||
}
|
||||
/* ARRGH! My tooth hurts sooo much!
|
||||
* You just can't find a good Britannian dentist these days...
|
||||
* My teeth!
|
||||
* MAKE IT STOP!
|
||||
* AAAH! It feels like someone kicked me in the teeth!
|
||||
*/
|
||||
|
||||
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();
|
||||
if (Utility.RandomBool() && _eater.Body.IsHuman && !_eater.Mounted)
|
||||
{
|
||||
_eater.Animate(32, 5, 1, true, false, 0);
|
||||
}
|
||||
}
|
||||
else if (Eaten == 60)
|
||||
{
|
||||
_eater.SendLocalizedMessage(1077393); // The extreme pain in your teeth subsides.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GingerBreadCookie : Food
|
||||
{
|
||||
private readonly int[] _messages =
|
||||
{
|
||||
0,
|
||||
1077396, // Noooo!
|
||||
1077397, // Please don't eat me... *whimper*
|
||||
1077405, // Not the face!
|
||||
1077406, // Ahhhhhh! My foot's gone!
|
||||
1077407, // Please. No! I have gingerkids!
|
||||
1077408, // No, no! I'm really made of poison. Really.
|
||||
1077409 // Run, run as fast as you can! You can't catch me! I'm the gingerbread man!
|
||||
};
|
||||
|
||||
[Constructible]
|
||||
public GingerBreadCookie() : base(Utility.RandomBool() ? 0x2be1 : 0x2be2)
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override bool Eat(Mobile from)
|
||||
{
|
||||
var message = _messages.RandomElement();
|
||||
|
||||
if (message != 0)
|
||||
{
|
||||
SendLocalizedMessageTo(from, message);
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.Eat(from);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,208 +1,80 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
public static class GiftBoxHues
|
||||
{
|
||||
public static class GiftBoxHues
|
||||
/* there's possibly a couple more, but this is what we could verify on OSI */
|
||||
|
||||
private static readonly int[] _normalHues =
|
||||
{
|
||||
/* there's possibly a couple more, but this is what we could verify on OSI */
|
||||
0x672, 0x454, 0x507, 0x4ac,
|
||||
0x504, 0x84b, 0x495, 0x97c,
|
||||
0x493, 0x4a8, 0x494, 0x4aa,
|
||||
0xb8b, 0x84f, 0x491, 0x851,
|
||||
0x503, 0xb8c, 0x4ab, 0x84B
|
||||
};
|
||||
|
||||
private static readonly int[] m_NormalHues =
|
||||
{
|
||||
0x672,
|
||||
0x454,
|
||||
0x507,
|
||||
0x4ac,
|
||||
0x504,
|
||||
0x84b,
|
||||
0x495,
|
||||
0x97c,
|
||||
0x493,
|
||||
0x4a8,
|
||||
0x494,
|
||||
0x4aa,
|
||||
0xb8b,
|
||||
0x84f,
|
||||
0x491,
|
||||
0x851,
|
||||
0x503,
|
||||
0xb8c,
|
||||
0x4ab,
|
||||
0x84B
|
||||
};
|
||||
|
||||
private static readonly int[] m_NeonHues =
|
||||
{
|
||||
0x438,
|
||||
0x424,
|
||||
0x433,
|
||||
0x445,
|
||||
0x42b,
|
||||
0x448
|
||||
};
|
||||
|
||||
public static int RandomGiftBoxHue => m_NormalHues.RandomElement();
|
||||
public static int RandomNeonBoxHue => m_NeonHues.RandomElement();
|
||||
}
|
||||
|
||||
[Flippable(0x46A5, 0x46A6)]
|
||||
public class GiftBoxRectangle : BaseContainer
|
||||
private static readonly int[] _neonHues =
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxRectangle()
|
||||
: base(Utility.RandomBool() ? 0x46A5 : 0x46A6) =>
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
0x438, 0x424, 0x433,
|
||||
0x445, 0x42b, 0x448
|
||||
};
|
||||
|
||||
public GiftBoxRectangle(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DefaultGumpID => 0x11E;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class GiftBoxCube : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxCube()
|
||||
: base(0x46A2) =>
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
|
||||
public GiftBoxCube(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DefaultGumpID => 0x11B;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class GiftBoxCylinder : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxCylinder()
|
||||
: base(0x46A3) =>
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
|
||||
public GiftBoxCylinder(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DefaultGumpID => 0x11C;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class GiftBoxOctogon : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxOctogon()
|
||||
: base(0x46A4) =>
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
|
||||
public GiftBoxOctogon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DefaultGumpID => 0x11D;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class GiftBoxAngel : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxAngel()
|
||||
: base(0x46A7) =>
|
||||
Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
|
||||
public GiftBoxAngel(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DefaultGumpID => 0x11F;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable(0x232A, 0x232B)]
|
||||
public class GiftBoxNeon : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxNeon()
|
||||
: base(Utility.RandomBool() ? 0x232A : 0x232B) =>
|
||||
Hue = GiftBoxHues.RandomNeonBoxHue;
|
||||
|
||||
public GiftBoxNeon(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();
|
||||
}
|
||||
}
|
||||
public static int RandomGiftBoxHue => _normalHues.RandomElement();
|
||||
public static int RandomNeonBoxHue => _neonHues.RandomElement();
|
||||
}
|
||||
|
||||
[Flippable(0x46A5, 0x46A6)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GiftBoxRectangle : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxRectangle() : base(Utility.RandomBool() ? 0x46A5 : 0x46A6) => Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
|
||||
public override int DefaultGumpID => 0x11E;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GiftBoxCube : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxCube() : base(0x46A2) => Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
|
||||
public override int DefaultGumpID => 0x11B;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GiftBoxCylinder : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxCylinder() : base(0x46A3) => Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
|
||||
public override int DefaultGumpID => 0x11C;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GiftBoxOctogon : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxOctogon() : base(0x46A4) => Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
|
||||
public override int DefaultGumpID => 0x11D;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GiftBoxAngel : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxAngel() : base(0x46A7) => Hue = GiftBoxHues.RandomGiftBoxHue;
|
||||
|
||||
public override int DefaultGumpID => 0x11F;
|
||||
}
|
||||
|
||||
[Flippable(0x232A, 0x232B)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class GiftBoxNeon : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public GiftBoxNeon() : base(Utility.RandomBool() ? 0x232A : 0x232B) => Hue = GiftBoxHues.RandomNeonBoxHue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,151 +1,111 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class HolidayPottedPlant : Item
|
||||
{
|
||||
public class HolidayPottedPlant : Item
|
||||
[Constructible]
|
||||
public HolidayPottedPlant() : this(Utility.RandomMinMax(0x11C8, 0x11CC))
|
||||
{
|
||||
[Constructible]
|
||||
public HolidayPottedPlant()
|
||||
: this(Utility.RandomMinMax(0x11C8, 0x11CC))
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HolidayPottedPlant(int itemID) : base(itemID)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class PottedPlantDeed : Item
|
||||
{
|
||||
[Constructible]
|
||||
public PottedPlantDeed() : base(0x14F0) => LootType = LootType.Blessed;
|
||||
|
||||
public override int LabelNumber => 1041114; // A deed for a potted plant.
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public HolidayPottedPlant(int itemID)
|
||||
: base(itemID)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
public HolidayPottedPlant(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
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();
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
}
|
||||
}
|
||||
|
||||
public class PottedPlantDeed : Item
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
[Constructible]
|
||||
public PottedPlantDeed()
|
||||
: base(0x14F0) =>
|
||||
LootType = LootType.Blessed;
|
||||
private readonly PottedPlantDeed _deed;
|
||||
|
||||
public PottedPlantDeed(Serial serial)
|
||||
: base(serial)
|
||||
public InternalGump(PottedPlantDeed deed) : base(100, 200)
|
||||
{
|
||||
_deed = deed;
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Draggable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(0, 0, 360, 195, 0xA28);
|
||||
|
||||
AddPage(1);
|
||||
AddLabel(45, 15, 0, "Choose a Potted Plant:");
|
||||
|
||||
AddItem(45, 75, 0x11C8);
|
||||
AddButton(55, 50, 0x845, 0x846, 1);
|
||||
|
||||
AddItem(100, 75, 0x11C9);
|
||||
AddButton(115, 50, 0x845, 0x846, 2);
|
||||
|
||||
AddItem(160, 75, 0x11CA);
|
||||
AddButton(175, 50, 0x845, 0x846, 3);
|
||||
|
||||
AddItem(225, 75, 0x11CB);
|
||||
AddButton(235, 50, 0x845, 0x846, 4);
|
||||
|
||||
AddItem(280, 75, 0x11CC);
|
||||
AddButton(295, 50, 0x845, 0x846, 5);
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041114; // A deed for a potted plant.
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
if (_deed?.Deleted != false)
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
}
|
||||
}
|
||||
|
||||
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 InternalGump : Gump
|
||||
{
|
||||
private readonly PottedPlantDeed m_Deed;
|
||||
|
||||
public InternalGump(PottedPlantDeed deed) : base(100, 200)
|
||||
{
|
||||
m_Deed = deed;
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Draggable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(0, 0, 360, 195, 0xA28);
|
||||
|
||||
AddPage(1);
|
||||
AddLabel(45, 15, 0, "Choose a Potted Plant:");
|
||||
|
||||
AddItem(45, 75, 0x11C8);
|
||||
AddButton(55, 50, 0x845, 0x846, 1);
|
||||
|
||||
AddItem(100, 75, 0x11C9);
|
||||
AddButton(115, 50, 0x845, 0x846, 2);
|
||||
|
||||
AddItem(160, 75, 0x11CA);
|
||||
AddButton(175, 50, 0x845, 0x846, 3);
|
||||
|
||||
AddItem(225, 75, 0x11CB);
|
||||
AddButton(235, 50, 0x845, 0x846, 4);
|
||||
|
||||
AddItem(280, 75, 0x11CC);
|
||||
AddButton(295, 50, 0x845, 0x846, 5);
|
||||
return;
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
var from = sender.Mobile;
|
||||
|
||||
if (!_deed.IsChildOf(from.Backpack))
|
||||
{
|
||||
if (m_Deed?.Deleted != false)
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it
|
||||
return;
|
||||
}
|
||||
|
||||
var index = info.ButtonID - 1;
|
||||
|
||||
if (index >= 0 && index <= 4)
|
||||
{
|
||||
var plant = new HolidayPottedPlant(0x11C8 + index);
|
||||
|
||||
if (!from.PlaceInBackpack(plant))
|
||||
{
|
||||
return;
|
||||
plant.Delete();
|
||||
from.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
|
||||
var from = sender.Mobile;
|
||||
|
||||
if (!m_Deed.IsChildOf(from.Backpack))
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it
|
||||
return;
|
||||
}
|
||||
|
||||
var index = info.ButtonID - 1;
|
||||
|
||||
if (index >= 0 && index <= 4)
|
||||
{
|
||||
var plant = new HolidayPottedPlant(0x11C8 + index);
|
||||
|
||||
if (!from.PlaceInBackpack(plant))
|
||||
{
|
||||
plant.Delete();
|
||||
from.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Deed.Delete();
|
||||
}
|
||||
_deed.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,18 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class HolidayTimepiece : Clock
|
||||
{
|
||||
public class HolidayTimepiece : Clock
|
||||
[Constructible]
|
||||
public HolidayTimepiece() : base(0x1086)
|
||||
{
|
||||
[Constructible]
|
||||
public HolidayTimepiece()
|
||||
: base(0x1086)
|
||||
{
|
||||
Weight = DefaultWeight;
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Bracelet;
|
||||
}
|
||||
|
||||
public HolidayTimepiece(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041113; // a holiday timepiece
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
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();
|
||||
}
|
||||
Weight = DefaultWeight;
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Bracelet;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041113; // a holiday timepiece
|
||||
public override double DefaultWeight => 1.0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,170 +1,58 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class IcicleLargeSouth : Item
|
||||
{
|
||||
public class IcicleLargeSouth : Item
|
||||
[Constructible]
|
||||
public IcicleLargeSouth() : base(0x4572)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class IcicleMedSouth : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleMedSouth() : base(0x4573)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class IcicleSmallSouth : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleSmallSouth() : base(0x4574)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class IcicleLargeEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleLargeEast() : base(0x4575)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class IcicleMedEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleMedEast() : base(0x4576)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class IcicleSmallEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleSmallEast()
|
||||
: base(0x4577)
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleLargeSouth()
|
||||
: base(0x4572)
|
||||
{
|
||||
}
|
||||
|
||||
public IcicleLargeSouth(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class IcicleMedSouth : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleMedSouth()
|
||||
: base(0x4573)
|
||||
{
|
||||
}
|
||||
|
||||
public IcicleMedSouth(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class IcicleSmallSouth : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleSmallSouth()
|
||||
: base(0x4574)
|
||||
{
|
||||
}
|
||||
|
||||
public IcicleSmallSouth(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class IcicleLargeEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleLargeEast()
|
||||
: base(0x4575)
|
||||
{
|
||||
}
|
||||
|
||||
public IcicleLargeEast(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class IcicleMedEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleMedEast()
|
||||
: base(0x4576)
|
||||
{
|
||||
}
|
||||
|
||||
public IcicleMedEast(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class IcicleSmallEast : Item
|
||||
{
|
||||
[Constructible]
|
||||
public IcicleSmallEast()
|
||||
: base(0x4577)
|
||||
{
|
||||
}
|
||||
|
||||
public IcicleSmallEast(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,117 +1,101 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
using Server.Mobiles;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class IcyPatch : Item
|
||||
{
|
||||
public class IcyPatch : Item
|
||||
/* On OSI, the iceypatch with itemid 0x122a is "rarer", so we will give it 1:10 chance of creating it that way */
|
||||
[Constructible]
|
||||
public IcyPatch() : this(Utility.Random(10) == 0 ? 0x122A : 0x122F)
|
||||
{
|
||||
/* On OSI, the iceypatch with itemid 0x122a is "rarer", so we will give it 1:10 chance of creating it that way */
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public IcyPatch()
|
||||
: this(Utility.Random(10) == 0 ? 0x122A : 0x122F)
|
||||
public IcyPatch(int itemid) : base(itemid) => Hue = 0x481;
|
||||
|
||||
public override int LabelNumber => 1095159; // An Icy Patch
|
||||
public override double DefaultWeight => 5.0;
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile && m.Alive && m.AccessLevel == AccessLevel.Player)
|
||||
{
|
||||
}
|
||||
|
||||
public IcyPatch(int itemid)
|
||||
: base(itemid) =>
|
||||
Hue = 0x481;
|
||||
|
||||
public IcyPatch(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1095159; // An Icy Patch
|
||||
public override double DefaultWeight => 5.0;
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m is PlayerMobile && m.Alive && m.AccessLevel == AccessLevel.Player)
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
case 0:
|
||||
{
|
||||
RunSequence(m, 1095160, false);
|
||||
break; // You steadily walk over the slippery surface.
|
||||
case 1:
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
RunSequence(m, 1095161, true);
|
||||
break; // You skillfully manage to maintain your balance.
|
||||
default:
|
||||
}
|
||||
default:
|
||||
{
|
||||
RunSequence(m, 1095162, true);
|
||||
break; // You lose your footing and ungracefully splatter on the ground.
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
|
||||
public virtual void RunSequence(Mobile m, int message, bool freeze)
|
||||
{
|
||||
if (freeze)
|
||||
{
|
||||
m.Frozen = true;
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(message == 1095162 ? 2.0 : 1.25), () => m.Frozen = false);
|
||||
}
|
||||
|
||||
m.SendLocalizedMessage(message);
|
||||
|
||||
var action = 0;
|
||||
var sound = 0;
|
||||
|
||||
if (message == 1095162)
|
||||
{
|
||||
if (m.Mounted)
|
||||
{
|
||||
m.Mount.Rider = null;
|
||||
}
|
||||
|
||||
var p = new Point3D(Location);
|
||||
var map = Map;
|
||||
|
||||
if (SpellHelper.FindValidSpawnLocation(map, ref p, true))
|
||||
{
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0), () => m.MoveToWorld(p, map));
|
||||
}
|
||||
|
||||
action = 21 + Utility.Random(2);
|
||||
sound = m.Female ? 0x317 : 0x426;
|
||||
}
|
||||
else if (message == 1095161)
|
||||
{
|
||||
action = 17;
|
||||
sound = m.Female ? 0x319 : 0x429;
|
||||
}
|
||||
|
||||
if (action > 0)
|
||||
{
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0.4),
|
||||
() =>
|
||||
{
|
||||
if (!m.Mounted)
|
||||
{
|
||||
m.Animate(action, 1, 1, false, true, 0);
|
||||
}
|
||||
|
||||
m.PlaySound(sound);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
return base.OnMoveOver(m);
|
||||
}
|
||||
|
||||
writer.Write(0);
|
||||
public virtual void RunSequence(Mobile m, int message, bool freeze)
|
||||
{
|
||||
if (freeze)
|
||||
{
|
||||
m.Frozen = true;
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(message == 1095162 ? 2.0 : 1.25), () => m.Frozen = false);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
m.SendLocalizedMessage(message);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
var action = 0;
|
||||
var sound = 0;
|
||||
|
||||
if (message == 1095162)
|
||||
{
|
||||
if (m.Mounted)
|
||||
{
|
||||
m.Mount.Rider = null;
|
||||
}
|
||||
|
||||
var p = new Point3D(Location);
|
||||
var map = Map;
|
||||
|
||||
if (SpellHelper.FindValidSpawnLocation(map, ref p, true))
|
||||
{
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0), () => m.MoveToWorld(p, map));
|
||||
}
|
||||
|
||||
action = 21 + Utility.Random(2);
|
||||
sound = m.Female ? 0x317 : 0x426;
|
||||
}
|
||||
else if (message == 1095161)
|
||||
{
|
||||
action = 17;
|
||||
sound = m.Female ? 0x319 : 0x429;
|
||||
}
|
||||
|
||||
if (action > 0)
|
||||
{
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0.4),
|
||||
() =>
|
||||
{
|
||||
if (!m.Mounted)
|
||||
{
|
||||
m.Animate(action, 1, 1, false, true, 0);
|
||||
}
|
||||
|
||||
m.PlaySound(sound);
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,90 +1,45 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Coal : Item
|
||||
{
|
||||
public class Coal : Item
|
||||
[Constructible]
|
||||
public Coal() : base(0x19b9)
|
||||
{
|
||||
[Constructible]
|
||||
public Coal() : base(0x19b9)
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 0x965;
|
||||
}
|
||||
|
||||
public Coal(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Coal";
|
||||
|
||||
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();
|
||||
}
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 0x965;
|
||||
}
|
||||
|
||||
public class BadCard : Item
|
||||
public override int LabelNumber => 1041426;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class BadCard : Item
|
||||
{
|
||||
private static readonly int[] _cardHues = { 0x45, 0x27, 0x3d0 };
|
||||
|
||||
[Constructible]
|
||||
public BadCard() : base(0x14ef)
|
||||
{
|
||||
private static readonly int[] m_CardHues = { 0x45, 0x27, 0x3d0 };
|
||||
|
||||
[Constructible]
|
||||
public BadCard() : base(0x14ef)
|
||||
{
|
||||
Hue = m_CardHues.RandomElement();
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
Movable = true;
|
||||
}
|
||||
|
||||
public BadCard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber // Maybe next year youll get a better...
|
||||
=> 1041428;
|
||||
|
||||
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();
|
||||
}
|
||||
Hue = _cardHues.RandomElement();
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
Movable = true;
|
||||
}
|
||||
|
||||
public class Spam : Food
|
||||
public override int LabelNumber => 1041428; // Maybe next year you will get a nicer gift.
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Spam : Food
|
||||
{
|
||||
[Constructible]
|
||||
public Spam() : base(0x1044)
|
||||
{
|
||||
[Constructible]
|
||||
public Spam() : base(0x1044)
|
||||
{
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public Spam(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();
|
||||
}
|
||||
Stackable = false;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +1,25 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class RedPoinsettia : Item
|
||||
{
|
||||
public class RedPoinsettia : Item
|
||||
[Constructible]
|
||||
public RedPoinsettia() : base(0x2330)
|
||||
{
|
||||
[Constructible]
|
||||
public RedPoinsettia() : base(0x2330)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public RedPoinsettia(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class WhitePoinsettia : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WhitePoinsettia() : base(0x2331)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public WhitePoinsettia(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();
|
||||
}
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class WhitePoinsettia : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WhitePoinsettia() : base(0x2331)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,315 +1,195 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SnowGlobe : Item
|
||||
{
|
||||
public class SnowGlobe : Item
|
||||
public SnowGlobe() : base(0xE2F)
|
||||
{
|
||||
public SnowGlobe()
|
||||
: base(0xE2F)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Light = LightType.Circle150;
|
||||
}
|
||||
|
||||
public SnowGlobe(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
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();
|
||||
}
|
||||
LootType = LootType.Blessed;
|
||||
Light = LightType.Circle150;
|
||||
}
|
||||
|
||||
public enum SnowGlobeTypeOne
|
||||
public override double DefaultWeight => 1.0;
|
||||
}
|
||||
|
||||
public enum SnowGlobeTypeOne
|
||||
{
|
||||
Britain,
|
||||
Moonglow,
|
||||
Minoc,
|
||||
Magincia,
|
||||
BuccaneersDen,
|
||||
Trinsic,
|
||||
Yew,
|
||||
SkaraBrae,
|
||||
Jhelom,
|
||||
Nujelm,
|
||||
Papua,
|
||||
Delucia,
|
||||
Cove,
|
||||
Ocllo,
|
||||
SerpentsHold,
|
||||
EmpathAbbey,
|
||||
TheLycaeum,
|
||||
Vesper,
|
||||
Wind
|
||||
}
|
||||
|
||||
[SerializationGenerator(1, false)]
|
||||
public partial class SnowGlobeOne : SnowGlobe
|
||||
{
|
||||
[InvalidateProperties]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private SnowGlobeTypeOne _place;
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeOne() : this((SnowGlobeTypeOne)Utility.Random(19))
|
||||
{
|
||||
Britain,
|
||||
Moonglow,
|
||||
Minoc,
|
||||
Magincia,
|
||||
BuccaneersDen,
|
||||
Trinsic,
|
||||
Yew,
|
||||
SkaraBrae,
|
||||
Jhelom,
|
||||
Nujelm,
|
||||
Papua,
|
||||
Delucia,
|
||||
Cove,
|
||||
Ocllo,
|
||||
SerpentsHold,
|
||||
EmpathAbbey,
|
||||
TheLycaeum,
|
||||
Vesper,
|
||||
Wind
|
||||
}
|
||||
|
||||
public class SnowGlobeOne : SnowGlobe
|
||||
[Constructible]
|
||||
public SnowGlobeOne(SnowGlobeTypeOne type) => _place = type;
|
||||
|
||||
public override int LabelNumber => 1041454 + (int)_place;
|
||||
|
||||
private void Deserialize(IGenericReader reader, int version)
|
||||
{
|
||||
private SnowGlobeTypeOne m_Type;
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeOne()
|
||||
: this((SnowGlobeTypeOne)Utility.Random(19))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeOne(SnowGlobeTypeOne type) => m_Type = type;
|
||||
|
||||
public SnowGlobeOne(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public SnowGlobeTypeOne Place
|
||||
{
|
||||
get => m_Type;
|
||||
set
|
||||
{
|
||||
m_Type = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041454 + (int)m_Type;
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
writer.WriteEncodedInt((int)m_Type);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (SnowGlobeTypeOne)reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum SnowGlobeTypeTwo
|
||||
{
|
||||
AncientCitadel,
|
||||
BlackthornesCastle,
|
||||
CityofMontor,
|
||||
CityofMistas,
|
||||
ExodusLair,
|
||||
LakeofFire,
|
||||
Lakeshire,
|
||||
PassofKarnaugh,
|
||||
TheEtherealFortress,
|
||||
TwinOaksTavern,
|
||||
ChaosShrine,
|
||||
ShrineofHumility,
|
||||
ShrineofSacrifice,
|
||||
ShrineofCompassion,
|
||||
ShrineofHonor,
|
||||
ShrineofHonesty,
|
||||
ShrineofSpirituality,
|
||||
ShrineofJustice,
|
||||
ShrineofValor
|
||||
}
|
||||
|
||||
public class SnowGlobeTwo : SnowGlobe
|
||||
{
|
||||
/* Oddly, these are not localized. */
|
||||
private static readonly string[] m_PlaceNames =
|
||||
{
|
||||
/* AncientCitadel */ "Ancient Citadel",
|
||||
/* BlackthornesCastle */ "Blackthorne's Castle",
|
||||
/* CityofMontor */ "City of Montor",
|
||||
/* CityofMistas */ "City of Mistas",
|
||||
/* ExodusLair */ "Exodus' Lair",
|
||||
/* LakeofFire */ "Lake of Fire",
|
||||
/* Lakeshire */ "Lakeshire",
|
||||
/* PassofKarnaugh */ "Pass of Karnaugh",
|
||||
/* TheEtherealFortress */ "The Ethereal Fortress",
|
||||
/* TwinOaksTavern */ "Twin Oaks Tavern",
|
||||
/* ChaosShrine */ "Chaos Shrine",
|
||||
/* ShrineofHumility */ "Shrine of Humility",
|
||||
/* ShrineofSacrifice */ "Shrine of Sacrifice",
|
||||
/* ShrineofCompassion */ "Shrine of Compassion",
|
||||
/* ShrineofHonor */ "Shrine of Honor",
|
||||
/* ShrineofHonesty */ "Shrine of Honesty",
|
||||
/* ShrineofSpirituality */ "Shrine of Spirituality",
|
||||
/* ShrineofJustice */ "Shrine of Justice",
|
||||
/* ShrineofValor */ "Shrine of Valor"
|
||||
};
|
||||
|
||||
private SnowGlobeTypeTwo m_Type;
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeTwo()
|
||||
: this((SnowGlobeTypeTwo)Utility.Random(19))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeTwo(SnowGlobeTypeTwo type) => m_Type = type;
|
||||
|
||||
public SnowGlobeTwo(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public SnowGlobeTypeTwo Place
|
||||
{
|
||||
get => m_Type;
|
||||
set
|
||||
{
|
||||
m_Type = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override string DefaultName
|
||||
{
|
||||
get
|
||||
{
|
||||
var idx = (int)m_Type;
|
||||
|
||||
if (idx < 0 || idx >= m_PlaceNames.Length)
|
||||
{
|
||||
return "a snowy scene";
|
||||
}
|
||||
|
||||
return $"a snowy scene of {m_PlaceNames[idx]}";
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
writer.WriteEncodedInt((int)m_Type);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (SnowGlobeTypeTwo)reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public enum SnowGlobeTypeThree
|
||||
{
|
||||
Luna,
|
||||
Umbra,
|
||||
Zento,
|
||||
Heartwood,
|
||||
Covetous,
|
||||
Deceit,
|
||||
Destard,
|
||||
Hythloth,
|
||||
Khaldun,
|
||||
Shame,
|
||||
Wrong,
|
||||
Doom,
|
||||
TheCitadel,
|
||||
ThePalaceofParoxysmus,
|
||||
TheBlightedGrove,
|
||||
ThePrismofLight
|
||||
}
|
||||
|
||||
public class SnowGlobeThree : SnowGlobe
|
||||
{
|
||||
private SnowGlobeTypeThree m_Type;
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeThree()
|
||||
: this((SnowGlobeTypeThree)Utility.Random(16))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeThree(SnowGlobeTypeThree type) => m_Type = type;
|
||||
|
||||
public SnowGlobeThree(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public SnowGlobeTypeThree Place
|
||||
{
|
||||
get => m_Type;
|
||||
set
|
||||
{
|
||||
m_Type = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Type >= SnowGlobeTypeThree.Covetous)
|
||||
{
|
||||
return 1075440 + ((int)m_Type - 4);
|
||||
}
|
||||
|
||||
return 1075294 + (int)m_Type;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
writer.WriteEncodedInt((int)m_Type);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (SnowGlobeTypeThree)reader.ReadEncodedInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
_place = (SnowGlobeTypeOne)reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public enum SnowGlobeTypeTwo
|
||||
{
|
||||
AncientCitadel,
|
||||
BlackthornesCastle,
|
||||
CityofMontor,
|
||||
CityofMistas,
|
||||
ExodusLair,
|
||||
LakeofFire,
|
||||
Lakeshire,
|
||||
PassofKarnaugh,
|
||||
TheEtherealFortress,
|
||||
TwinOaksTavern,
|
||||
ChaosShrine,
|
||||
ShrineofHumility,
|
||||
ShrineofSacrifice,
|
||||
ShrineofCompassion,
|
||||
ShrineofHonor,
|
||||
ShrineofHonesty,
|
||||
ShrineofSpirituality,
|
||||
ShrineofJustice,
|
||||
ShrineofValor
|
||||
}
|
||||
|
||||
[SerializationGenerator(1, false)]
|
||||
public partial class SnowGlobeTwo : SnowGlobe
|
||||
{
|
||||
/* Oddly, these are not localized. */
|
||||
private static readonly string[] _placeNames =
|
||||
{
|
||||
/* AncientCitadel */ "Ancient Citadel",
|
||||
/* BlackthornesCastle */ "Blackthorne's Castle",
|
||||
/* CityofMontor */ "City of Montor",
|
||||
/* CityofMistas */ "City of Mistas",
|
||||
/* ExodusLair */ "Exodus' Lair",
|
||||
/* LakeofFire */ "Lake of Fire",
|
||||
/* Lakeshire */ "Lakeshire",
|
||||
/* PassofKarnaugh */ "Pass of Karnaugh",
|
||||
/* TheEtherealFortress */ "The Ethereal Fortress",
|
||||
/* TwinOaksTavern */ "Twin Oaks Tavern",
|
||||
/* ChaosShrine */ "Chaos Shrine",
|
||||
/* ShrineofHumility */ "Shrine of Humility",
|
||||
/* ShrineofSacrifice */ "Shrine of Sacrifice",
|
||||
/* ShrineofCompassion */ "Shrine of Compassion",
|
||||
/* ShrineofHonor */ "Shrine of Honor",
|
||||
/* ShrineofHonesty */ "Shrine of Honesty",
|
||||
/* ShrineofSpirituality */ "Shrine of Spirituality",
|
||||
/* ShrineofJustice */ "Shrine of Justice",
|
||||
/* ShrineofValor */ "Shrine of Valor"
|
||||
};
|
||||
|
||||
[InvalidateProperties]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private SnowGlobeTypeTwo _place;
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeTwo() : this((SnowGlobeTypeTwo)Utility.Random(_placeNames.Length))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeTwo(SnowGlobeTypeTwo type) => _place = type;
|
||||
|
||||
public override string DefaultName
|
||||
{
|
||||
get
|
||||
{
|
||||
var idx = (int)_place;
|
||||
|
||||
if (idx < 0 || idx >= _placeNames.Length)
|
||||
{
|
||||
return "a snowy scene";
|
||||
}
|
||||
|
||||
return $"a snowy scene of {_placeNames[idx]}";
|
||||
}
|
||||
}
|
||||
|
||||
private void Deserialize(IGenericReader reader, int version)
|
||||
{
|
||||
_place = (SnowGlobeTypeTwo)reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public enum SnowGlobeTypeThree
|
||||
{
|
||||
Luna,
|
||||
Umbra,
|
||||
Zento,
|
||||
Heartwood,
|
||||
Covetous,
|
||||
Deceit,
|
||||
Destard,
|
||||
Hythloth,
|
||||
Khaldun,
|
||||
Shame,
|
||||
Wrong,
|
||||
Doom,
|
||||
TheCitadel,
|
||||
ThePalaceofParoxysmus,
|
||||
TheBlightedGrove,
|
||||
ThePrismofLight
|
||||
}
|
||||
|
||||
[SerializationGenerator(1, false)]
|
||||
public partial class SnowGlobeThree : SnowGlobe
|
||||
{
|
||||
[InvalidateProperties]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private SnowGlobeTypeThree _place;
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeThree() : this((SnowGlobeTypeThree)Utility.Random(16))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowGlobeThree(SnowGlobeTypeThree type) => _place = type;
|
||||
|
||||
public override int LabelNumber =>
|
||||
_place switch
|
||||
{
|
||||
>= SnowGlobeTypeThree.Covetous => 1075440 + ((int)_place - 4),
|
||||
_ => 1075294 + (int)_place
|
||||
};
|
||||
|
||||
private void Deserialize(IGenericReader reader, int version)
|
||||
{
|
||||
_place = (SnowGlobeTypeThree)reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,40 +1,20 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class SnowPileDeco : Item
|
||||
{
|
||||
public class SnowPileDeco : Item
|
||||
private static readonly int[] _types = { 0x8E2, 0x8E0, 0x8E6, 0x8E5, 0x8E3 };
|
||||
|
||||
[Constructible]
|
||||
public SnowPileDeco() : this(_types.RandomElement())
|
||||
{
|
||||
private static readonly int[] m_Types = { 0x8E2, 0x8E0, 0x8E6, 0x8E5, 0x8E3 };
|
||||
|
||||
[Constructible]
|
||||
public SnowPileDeco()
|
||||
: this(m_Types.RandomElement())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowPileDeco(int itemid)
|
||||
: base(itemid) =>
|
||||
Hue = 0x481;
|
||||
|
||||
public SnowPileDeco(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Snow Pile";
|
||||
public override double DefaultWeight => 2.0;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public SnowPileDeco(int itemid) : base(itemid) => Hue = 0x481;
|
||||
|
||||
public override int LabelNumber => 1095253; // decorative snow piles
|
||||
public override double DefaultWeight => 2.0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,250 +1,148 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x456E, 0x456F)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class SnowStatuePegasus : Item
|
||||
{
|
||||
[Flippable(0x456E, 0x456F)]
|
||||
public class SnowStatuePegasus : Item
|
||||
[Constructible]
|
||||
public SnowStatuePegasus() : base(0x456E)
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatuePegasus()
|
||||
: base(0x456E)
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
}
|
||||
|
||||
[Flippable(0x4578, 0x4579)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class SnowStatueSeahorse : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueSeahorse() : base(0x4578)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
}
|
||||
|
||||
[Flippable(0x457A, 0x457B)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class SnowStatueMermaid : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueMermaid() : base(0x457A)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
}
|
||||
|
||||
[Flippable(0x457C, 0x457D)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class SnowStatueGriffon : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueGriffon() : base(0x457C)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class SnowStatueDeed : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueDeed() : base(0x14F0) => LootType = LootType.Blessed;
|
||||
|
||||
public override int LabelNumber => 1114296; // snow statue deed
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(from, this));
|
||||
}
|
||||
|
||||
public SnowStatuePegasus(Serial serial)
|
||||
: base(serial)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
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();
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable(0x4578, 0x4579)]
|
||||
public class SnowStatueSeahorse : Item
|
||||
private class InternalGump : Gump
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueSeahorse()
|
||||
: base(0x4578)
|
||||
private readonly SnowStatueDeed _deed;
|
||||
|
||||
public InternalGump(Mobile from, SnowStatueDeed deed) : base(100, 200)
|
||||
{
|
||||
_deed = deed;
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Draggable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(0, 0, 360, 225, 0xA28);
|
||||
|
||||
AddPage(1);
|
||||
AddLabel(45, 15, 0, Localization.GetText(1156487, from.Language)); // Select One:
|
||||
|
||||
AddItem(35, 75, 0x456E);
|
||||
AddButton(65, 50, 0x845, 0x846, 1);
|
||||
|
||||
AddItem(120, 75, 0x4578);
|
||||
AddButton(135, 50, 0x845, 0x846, 2);
|
||||
|
||||
AddItem(190, 75, 0x457A);
|
||||
AddButton(205, 50, 0x845, 0x846, 3);
|
||||
|
||||
AddItem(250, 75, 0x457C);
|
||||
AddButton(275, 50, 0x845, 0x846, 4);
|
||||
}
|
||||
|
||||
public SnowStatueSeahorse(Serial serial)
|
||||
: base(serial)
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable(0x457A, 0x457B)]
|
||||
public class SnowStatueMermaid : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueMermaid()
|
||||
: base(0x457A)
|
||||
{
|
||||
}
|
||||
|
||||
public SnowStatueMermaid(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable(0x457C, 0x457D)]
|
||||
public class SnowStatueGriffon : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueGriffon()
|
||||
: base(0x457C)
|
||||
{
|
||||
}
|
||||
|
||||
public SnowStatueGriffon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ForceShowProperties => ObjectPropertyList.Enabled;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class SnowStatueDeed : Item
|
||||
{
|
||||
[Constructible]
|
||||
public SnowStatueDeed()
|
||||
: base(0x14F0) =>
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
public SnowStatueDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1114296; // snow statue deed
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
if (_deed?.Deleted != false)
|
||||
{
|
||||
from.CloseGump<InternalGump>();
|
||||
from.SendGump(new InternalGump(this));
|
||||
return;
|
||||
}
|
||||
|
||||
var from = sender.Mobile;
|
||||
|
||||
if (!_deed.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it
|
||||
return;
|
||||
}
|
||||
|
||||
Item statue = info.ButtonID switch
|
||||
{
|
||||
1 => new SnowStatuePegasus(),
|
||||
2 => new SnowStatueSeahorse(),
|
||||
3 => new SnowStatueMermaid(),
|
||||
4 => new SnowStatueGriffon(),
|
||||
_ => null
|
||||
};
|
||||
|
||||
if (statue == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!from.PlaceInBackpack(statue))
|
||||
{
|
||||
statue.Delete();
|
||||
from.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it.
|
||||
}
|
||||
}
|
||||
|
||||
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 InternalGump : Gump
|
||||
{
|
||||
private readonly SnowStatueDeed m_Deed;
|
||||
|
||||
public InternalGump(SnowStatueDeed deed) : base(100, 200)
|
||||
{
|
||||
m_Deed = deed;
|
||||
|
||||
Closable = true;
|
||||
Disposable = true;
|
||||
Draggable = true;
|
||||
Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(0, 0, 360, 225, 0xA28);
|
||||
|
||||
AddPage(1);
|
||||
AddLabel(45, 15, 0, "Select One:");
|
||||
|
||||
AddItem(35, 75, 0x456E);
|
||||
AddButton(65, 50, 0x845, 0x846, 1);
|
||||
|
||||
AddItem(120, 75, 0x4578);
|
||||
AddButton(135, 50, 0x845, 0x846, 2);
|
||||
|
||||
AddItem(190, 75, 0x457A);
|
||||
AddButton(205, 50, 0x845, 0x846, 3);
|
||||
|
||||
AddItem(250, 75, 0x457C);
|
||||
AddButton(275, 50, 0x845, 0x846, 4);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Deed?.Deleted != false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var from = sender.Mobile;
|
||||
|
||||
if (!m_Deed.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it
|
||||
return;
|
||||
}
|
||||
|
||||
Item statue;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
default:
|
||||
return;
|
||||
case 1:
|
||||
statue = new SnowStatuePegasus();
|
||||
break;
|
||||
case 2:
|
||||
statue = new SnowStatueSeahorse();
|
||||
break;
|
||||
case 3:
|
||||
statue = new SnowStatueMermaid();
|
||||
break;
|
||||
case 4:
|
||||
statue = new SnowStatueGriffon();
|
||||
break;
|
||||
}
|
||||
|
||||
if (!from.PlaceInBackpack(statue))
|
||||
{
|
||||
statue.Delete();
|
||||
from.SendLocalizedMessage(1078837); // Your backpack is full! Please make room and try again.
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Deed.Delete();
|
||||
}
|
||||
_deed.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +1,25 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class BlueSnowflake : Item
|
||||
{
|
||||
public class BlueSnowflake : Item
|
||||
[Constructible]
|
||||
public BlueSnowflake() : base(0x232E)
|
||||
{
|
||||
[Constructible]
|
||||
public BlueSnowflake() : base(0x232E)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public BlueSnowflake(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();
|
||||
}
|
||||
}
|
||||
|
||||
public class WhiteSnowflake : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WhiteSnowflake() : base(0x232F)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public WhiteSnowflake(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();
|
||||
}
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class WhiteSnowflake : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WhiteSnowflake() : base(0x232F)
|
||||
{
|
||||
Weight = 1.0;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,157 +1,125 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2328, 0x2329)]
|
||||
[SerializationGenerator(0, false)]
|
||||
public partial class Snowman : Item, IDyable
|
||||
{
|
||||
[Flippable(0x2328, 0x2329)]
|
||||
public class Snowman : Item, IDyable
|
||||
// All hail OSI staff
|
||||
private static readonly string[] titles =
|
||||
{
|
||||
// All hail OSI staff
|
||||
private static readonly string[] titles =
|
||||
{
|
||||
/* 1 */ "Backflash",
|
||||
/* 2 */ "Carbon",
|
||||
/* 3 */ "Colbalistic",
|
||||
/* 4 */ "Comforl",
|
||||
/* 5 */ "Coppacchia",
|
||||
/* 6 */ "Cyrus",
|
||||
/* 7 */ "DannyB",
|
||||
/* 8 */ "DJSoul",
|
||||
/* 9 */ "DraconisRex",
|
||||
/* 10 */ "Earia",
|
||||
/* 11 */ "Foster",
|
||||
/* 12 */ "Gonzo",
|
||||
/* 13 */ "Haan",
|
||||
/* 14 */ "Halona",
|
||||
/* 15 */ "Hugo",
|
||||
/* 16 */ "Hyacinth",
|
||||
/* 17 */ "Imirian",
|
||||
/* 18 */ "Jinsol",
|
||||
/* 19 */ "Liciatia",
|
||||
/* 20 */ "Loewen",
|
||||
/* 21 */ "Loke",
|
||||
/* 22 */ "Magnus",
|
||||
/* 23 */ "Maleki",
|
||||
/* 24 */ "Morpheus",
|
||||
/* 25 */ "Obberron",
|
||||
/* 26 */ "Odee",
|
||||
/* 27 */ "Orbeus",
|
||||
/* 28 */ "Pax",
|
||||
/* 29 */ "Phields",
|
||||
/* 30 */ "Pigpen",
|
||||
/* 31 */ "Platinum",
|
||||
/* 32 */ "Polpol",
|
||||
/* 33 */ "Prume",
|
||||
/* 34 */ "Quinnly",
|
||||
/* 35 */ "Ragnarok",
|
||||
/* 36 */ "Rend",
|
||||
/* 37 */ "Roland",
|
||||
/* 38 */ "RyanM",
|
||||
/* 39 */ "Screach",
|
||||
/* 40 */ "Seraph",
|
||||
/* 41 */ "Silvani",
|
||||
/* 42 */ "Sherbear",
|
||||
/* 43 */ "SkyWalker",
|
||||
/* 44 */ "Snark",
|
||||
/* 45 */ "Sowl",
|
||||
/* 46 */ "Spada",
|
||||
/* 47 */ "Starblade",
|
||||
/* 48 */ "Tenacious",
|
||||
/* 49 */ "Tnez",
|
||||
/* 50 */ "Wasia",
|
||||
/* 51 */ "Zilo",
|
||||
/* 52 */ "Zippy",
|
||||
/* 53 */ "Zoer"
|
||||
};
|
||||
/* 1 */ "Backflash",
|
||||
/* 2 */ "Carbon",
|
||||
/* 3 */ "Colbalistic",
|
||||
/* 4 */ "Comforl",
|
||||
/* 5 */ "Coppacchia",
|
||||
/* 6 */ "Cyrus",
|
||||
/* 7 */ "DannyB",
|
||||
/* 8 */ "DJSoul",
|
||||
/* 9 */ "DraconisRex",
|
||||
/* 10 */ "Earia",
|
||||
/* 11 */ "Foster",
|
||||
/* 12 */ "Gonzo",
|
||||
/* 13 */ "Haan",
|
||||
/* 14 */ "Halona",
|
||||
/* 15 */ "Hugo",
|
||||
/* 16 */ "Hyacinth",
|
||||
/* 17 */ "Imirian",
|
||||
/* 18 */ "Jinsol",
|
||||
/* 19 */ "Liciatia",
|
||||
/* 20 */ "Loewen",
|
||||
/* 21 */ "Loke",
|
||||
/* 22 */ "Magnus",
|
||||
/* 23 */ "Maleki",
|
||||
/* 24 */ "Morpheus",
|
||||
/* 25 */ "Obberron",
|
||||
/* 26 */ "Odee",
|
||||
/* 27 */ "Orbeus",
|
||||
/* 28 */ "Pax",
|
||||
/* 29 */ "Phields",
|
||||
/* 30 */ "Pigpen",
|
||||
/* 31 */ "Platinum",
|
||||
/* 32 */ "Polpol",
|
||||
/* 33 */ "Prume",
|
||||
/* 34 */ "Quinnly",
|
||||
/* 35 */ "Ragnarok",
|
||||
/* 36 */ "Rend",
|
||||
/* 37 */ "Roland",
|
||||
/* 38 */ "RyanM",
|
||||
/* 39 */ "Screach",
|
||||
/* 40 */ "Seraph",
|
||||
/* 41 */ "Silvani",
|
||||
/* 42 */ "Sherbear",
|
||||
/* 43 */ "SkyWalker",
|
||||
/* 44 */ "Snark",
|
||||
/* 45 */ "Sowl",
|
||||
/* 46 */ "Spada",
|
||||
/* 47 */ "Starblade",
|
||||
/* 48 */ "Tenacious",
|
||||
/* 49 */ "Tnez",
|
||||
/* 50 */ "Wasia",
|
||||
/* 51 */ "Zilo",
|
||||
/* 52 */ "Zippy",
|
||||
/* 53 */ "Zoer"
|
||||
};
|
||||
|
||||
private string m_Title;
|
||||
[InvalidateProperties]
|
||||
[SerializableField(0)]
|
||||
[SerializedCommandProperty(AccessLevel.GameMaster)]
|
||||
private string _title;
|
||||
|
||||
[Constructible]
|
||||
public Snowman() : this(Utility.RandomDyedHue())
|
||||
[Constructible]
|
||||
public Snowman() : this(Utility.RandomDyedHue())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Snowman(int hue) : this(hue, GetRandomTitle())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Snowman(string title) : this(Utility.RandomDyedHue(), title)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Snowman(int hue, string title) : base(Utility.Random(0x2328, 2))
|
||||
{
|
||||
Weight = 10.0;
|
||||
Hue = hue;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
_title = title;
|
||||
}
|
||||
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Snowman(int hue) : this(hue, GetRandomTitle())
|
||||
Hue = sender.DyedHue;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static string GetRandomTitle() => titles.RandomElement();
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (_title != null)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Snowman(string title) : this(Utility.RandomDyedHue(), title)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public Snowman(int hue, string title) : base(Utility.Random(0x2328, 2))
|
||||
{
|
||||
Weight = 10.0;
|
||||
Hue = hue;
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
m_Title = title;
|
||||
}
|
||||
|
||||
public Snowman(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string Title
|
||||
{
|
||||
get => m_Title;
|
||||
set
|
||||
{
|
||||
m_Title = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static string GetRandomTitle() => titles.RandomElement();
|
||||
|
||||
public override void GetProperties(IPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (m_Title != null)
|
||||
{
|
||||
list.Add(1062841, m_Title); // ~1_NAME~ the Snowman
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(1); // version
|
||||
|
||||
writer.Write(m_Title);
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Title = reader.ReadString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Utility.Intern(ref m_Title);
|
||||
list.Add(1062841, _title); // ~1_NAME~ the Snowman
|
||||
}
|
||||
}
|
||||
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
Utility.Intern(ref _title);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,60 +1,31 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Furniture]
|
||||
[Flippable(0x2bd9, 0x2bda)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class GreenStocking : BaseContainer
|
||||
{
|
||||
[Furniture]
|
||||
[Flippable(0x2bd9, 0x2bda)]
|
||||
public class GreenStocking : BaseContainer
|
||||
[Constructible]
|
||||
public GreenStocking() : base(Utility.Random(0x2BD9, 2))
|
||||
{
|
||||
[Constructible]
|
||||
public GreenStocking() : base(Utility.Random(0x2BD9, 2))
|
||||
{
|
||||
}
|
||||
|
||||
public GreenStocking(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DefaultGumpID => 0x103;
|
||||
public override int DefaultDropSound => 0x42;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flippable(0x2bdb, 0x2bdc)]
|
||||
public class RedStocking : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public RedStocking() : base(Utility.Random(0x2BDB, 2))
|
||||
{
|
||||
}
|
||||
|
||||
public RedStocking(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int DefaultGumpID => 0x103;
|
||||
public override int DefaultDropSound => 0x42;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
public override int DefaultGumpID => 0x103;
|
||||
public override int DefaultDropSound => 0x42;
|
||||
}
|
||||
|
||||
[Furniture]
|
||||
[Flippable(0x2bdb, 0x2bdc)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class RedStocking : BaseContainer
|
||||
{
|
||||
[Constructible]
|
||||
public RedStocking() : base(Utility.Random(0x2BDB, 2))
|
||||
{
|
||||
}
|
||||
|
||||
public override int DefaultGumpID => 0x103;
|
||||
public override int DefaultDropSound => 0x42;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,17 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x232A, 0x232B)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class WinterGiftPackage2003 : GiftBox
|
||||
{
|
||||
[Flippable(0x232A, 0x232B)]
|
||||
public class WinterGiftPackage2003 : GiftBox
|
||||
[Constructible]
|
||||
public WinterGiftPackage2003()
|
||||
{
|
||||
[Constructible]
|
||||
public WinterGiftPackage2003()
|
||||
{
|
||||
DropItem(new Snowman());
|
||||
DropItem(new WreathDeed());
|
||||
DropItem(new BlueSnowflake());
|
||||
DropItem(new RedPoinsettia());
|
||||
}
|
||||
|
||||
public WinterGiftPackage2003(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();
|
||||
}
|
||||
DropItem(new Snowman());
|
||||
DropItem(new WreathDeed());
|
||||
DropItem(new BlueSnowflake());
|
||||
DropItem(new RedPoinsettia());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,342 +1,311 @@
|
|||
using ModernUO.Serialization;
|
||||
using Server.Gumps;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class WreathAddon : Item, IDyable, IAddon
|
||||
{
|
||||
public class WreathAddon : Item, IDyable, IAddon
|
||||
[Constructible]
|
||||
public WreathAddon() : this(Utility.RandomDyedHue())
|
||||
{
|
||||
[Constructible]
|
||||
public WreathAddon() : this(Utility.RandomDyedHue())
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WreathAddon(int hue) : base(0x232C)
|
||||
{
|
||||
Hue = hue;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public bool CouldFit(IPoint3D p, Map map)
|
||||
{
|
||||
if (!map.CanFit(p.X, p.Y, p.Z, ItemData.Height))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WreathAddon(int hue) : base(0x232C)
|
||||
{
|
||||
Hue = hue;
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public WreathAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public bool CouldFit(IPoint3D p, Map map)
|
||||
{
|
||||
if (!map.CanFit(p.X, p.Y, p.Z, ItemData.Height))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ItemID == 0x232C)
|
||||
{
|
||||
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 WreathDeed(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;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
if (ItemID == 0x232C)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
return BaseAddon.IsWall(p.X, p.Y - 1, p.Z, map); // North wall
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
return BaseAddon.IsWall(p.X - 1, p.Y, p.Z, map); // West wall
|
||||
}
|
||||
|
||||
public Item Deed => new WreathDeed(Hue);
|
||||
|
||||
public virtual bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadInt();
|
||||
|
||||
Timer.StartTimer(FixMovingCrate);
|
||||
return false;
|
||||
}
|
||||
|
||||
private void FixMovingCrate()
|
||||
var house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
if (house?.IsCoOwner(from) == true)
|
||||
{
|
||||
if (Deleted)
|
||||
if (from.InRange(GetWorldLocation(), 1))
|
||||
{
|
||||
return;
|
||||
Hue = sender.DyedHue;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Movable || IsLockedDown)
|
||||
{
|
||||
var deed = Deed;
|
||||
|
||||
if (Parent is Item item)
|
||||
{
|
||||
item.AddItem(deed);
|
||||
deed.Location = Location;
|
||||
}
|
||||
else
|
||||
{
|
||||
deed.MoveToWorld(Location, Map);
|
||||
}
|
||||
|
||||
Delete();
|
||||
}
|
||||
from.SendLocalizedMessage(500295); // You are too far away to do that.
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
var house = BaseHouse.FindHouseAt(this);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (house?.IsCoOwner(from) == true)
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 3))
|
||||
{
|
||||
from.CloseGump<WreathAddonGump>();
|
||||
from.SendGump(new WreathAddonGump(from, this));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
[AfterDeserialization(false)]
|
||||
private void FixMovingCrate()
|
||||
{
|
||||
if (Deleted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
private class WreathAddonGump : Gump
|
||||
if (Movable || IsLockedDown)
|
||||
{
|
||||
private readonly WreathAddon m_Addon;
|
||||
private readonly Mobile m_From;
|
||||
var deed = Deed;
|
||||
|
||||
public WreathAddonGump(Mobile from, WreathAddon addon) : base(150, 50)
|
||||
if (Parent is Item item)
|
||||
{
|
||||
m_From = from;
|
||||
m_Addon = addon;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 220, 170, 0x13BE);
|
||||
AddBackground(10, 10, 200, 150, 0xBB8);
|
||||
AddHtmlLocalized(20, 30, 180, 60, 1062839); // Do you wish to re-deed this decoration?
|
||||
AddHtmlLocalized(55, 100, 160, 25, 1011011); // CONTINUE
|
||||
AddButton(20, 100, 0xFA5, 0xFA7, 1);
|
||||
AddHtmlLocalized(55, 125, 160, 25, 1011012); // CANCEL
|
||||
AddButton(20, 125, 0xFA5, 0xFA7, 0);
|
||||
item.AddItem(deed);
|
||||
deed.Location = Location;
|
||||
}
|
||||
else
|
||||
{
|
||||
deed.MoveToWorld(Location, Map);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Addon.Deleted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
if (info.ButtonID == 1)
|
||||
{
|
||||
if (m_From.InRange(m_Addon.GetWorldLocation(), 3))
|
||||
{
|
||||
m_From.AddToBackpack(m_Addon.Deed);
|
||||
m_Addon.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_From.SendLocalizedMessage(500295); // You are too far away to do that.
|
||||
}
|
||||
}
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
var house = BaseHouse.FindHouseAt(this);
|
||||
|
||||
if (house?.IsCoOwner(from) == true)
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 3))
|
||||
{
|
||||
from.CloseGump<WreathAddonGump>();
|
||||
from.SendGump(new WreathAddonGump(from, this));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable(0x14F0, 0x14EF)]
|
||||
public class WreathDeed : Item
|
||||
private class WreathAddonGump : Gump
|
||||
{
|
||||
[Constructible]
|
||||
public WreathDeed() : this(Utility.RandomDyedHue())
|
||||
private readonly WreathAddon _addon;
|
||||
private readonly Mobile _from;
|
||||
|
||||
public WreathAddonGump(Mobile from, WreathAddon addon) : base(150, 50)
|
||||
{
|
||||
_from = from;
|
||||
_addon = addon;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 220, 170, 0x13BE);
|
||||
AddBackground(10, 10, 200, 150, 0xBB8);
|
||||
AddHtmlLocalized(20, 30, 180, 60, 1062839); // Do you wish to re-deed this decoration?
|
||||
AddHtmlLocalized(55, 100, 160, 25, 1011011); // CONTINUE
|
||||
AddButton(20, 100, 0xFA5, 0xFA7, 1);
|
||||
AddHtmlLocalized(55, 125, 160, 25, 1011012); // CANCEL
|
||||
AddButton(20, 125, 0xFA5, 0xFA7, 0);
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WreathDeed(int hue) : base(0x14F0)
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = hue;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public WreathDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1062837; // holiday wreath deed
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
if (_addon.Deleted)
|
||||
{
|
||||
var house = BaseHouse.FindHouseAt(from);
|
||||
return;
|
||||
}
|
||||
|
||||
if (house?.IsCoOwner(from) == true)
|
||||
if (info.ButtonID == 1)
|
||||
{
|
||||
if (_from.InRange(_addon.GetWorldLocation(), 3))
|
||||
{
|
||||
from.SendLocalizedMessage(1062838); // Where would you like to place this decoration?
|
||||
from.BeginTarget(-1, true, TargetFlags.None, Placement_OnTarget);
|
||||
_from.AddToBackpack(_addon.Deed);
|
||||
_addon.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502092); // You must be in your house to do this.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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 WreathDeedGump(from, loc, this));
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaceAddon(from, loc, northWall, westWall);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042036); // That location is not in your house.
|
||||
}
|
||||
}
|
||||
|
||||
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 = 0x232C;
|
||||
}
|
||||
else if (westWall)
|
||||
{
|
||||
itemID = 0x232D;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1062840); // The decoration must be placed next to a wall.
|
||||
}
|
||||
|
||||
if (itemID > 0)
|
||||
{
|
||||
Item addon = new WreathAddon(Hue);
|
||||
|
||||
addon.ItemID = itemID;
|
||||
addon.MoveToWorld(loc, from.Map);
|
||||
|
||||
house.Addons.Add(addon);
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
private class WreathDeedGump : Gump
|
||||
{
|
||||
private readonly WreathDeed m_Deed;
|
||||
private readonly Mobile m_From;
|
||||
private readonly Point3D m_Loc;
|
||||
|
||||
public WreathDeedGump(Mobile from, Point3D loc, WreathDeed deed) : base(150, 50)
|
||||
{
|
||||
m_From = from;
|
||||
m_Loc = loc;
|
||||
m_Deed = deed;
|
||||
|
||||
AddBackground(0, 0, 300, 150, 0xA28);
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddItem(90, 30, 0x232D);
|
||||
AddItem(180, 30, 0x232C);
|
||||
AddButton(50, 35, 0x868, 0x869, 1);
|
||||
AddButton(145, 35, 0x868, 0x869, 2);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (m_Deed.Deleted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 1:
|
||||
m_Deed.PlaceAddon(m_From, m_Loc, false, true);
|
||||
break;
|
||||
case 2:
|
||||
m_Deed.PlaceAddon(m_From, m_Loc, true, false);
|
||||
break;
|
||||
_from.SendLocalizedMessage(500295); // You are too far away to do that.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Flippable(0x14F0, 0x14EF)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class WreathDeed : Item
|
||||
{
|
||||
[Constructible]
|
||||
public WreathDeed() : this(Utility.RandomDyedHue())
|
||||
{
|
||||
}
|
||||
|
||||
[Constructible]
|
||||
public WreathDeed(int hue) : base(0x14F0)
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = hue;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1062837; // holiday wreath deed
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
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.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
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 WreathDeedGump(from, loc, this));
|
||||
}
|
||||
else
|
||||
{
|
||||
PlaceAddon(from, loc, northWall, westWall);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042036); // That location is not in your house.
|
||||
}
|
||||
}
|
||||
|
||||
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 = 0x232C;
|
||||
}
|
||||
else if (westWall)
|
||||
{
|
||||
itemID = 0x232D;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1062840); // The decoration must be placed next to a wall.
|
||||
}
|
||||
|
||||
if (itemID > 0)
|
||||
{
|
||||
Item addon = new WreathAddon(Hue);
|
||||
|
||||
addon.ItemID = itemID;
|
||||
addon.MoveToWorld(loc, from.Map);
|
||||
|
||||
house.Addons.Add(addon);
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
private class WreathDeedGump : Gump
|
||||
{
|
||||
private readonly WreathDeed _deed;
|
||||
private readonly Mobile _from;
|
||||
private readonly Point3D _loc;
|
||||
|
||||
public WreathDeedGump(Mobile from, Point3D loc, WreathDeed deed) : base(150, 50)
|
||||
{
|
||||
_from = from;
|
||||
_loc = loc;
|
||||
_deed = deed;
|
||||
|
||||
AddBackground(0, 0, 300, 150, 0xA28);
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddItem(90, 30, 0x232D);
|
||||
AddItem(180, 30, 0x232C);
|
||||
AddButton(50, 35, 0x868, 0x869, 1);
|
||||
AddButton(145, 35, 0x868, 0x869, 2);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (_deed.Deleted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
_deed.PlaceAddon(_from, _loc, false, true);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
_deed.PlaceAddon(_from, _loc, true, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,36 +1,18 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class WristWatch : Clock
|
||||
{
|
||||
public class WristWatch : Clock
|
||||
[Constructible]
|
||||
public WristWatch() : base(0x1086)
|
||||
{
|
||||
[Constructible]
|
||||
public WristWatch()
|
||||
: base(0x1086)
|
||||
{
|
||||
Weight = DefaultWeight;
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Bracelet;
|
||||
}
|
||||
|
||||
public WristWatch(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041421; // a wrist watch
|
||||
public override double DefaultWeight => 1.0;
|
||||
|
||||
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();
|
||||
}
|
||||
Weight = DefaultWeight;
|
||||
LootType = LootType.Blessed;
|
||||
Layer = Layer.Bracelet;
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1041421; // a wrist watch
|
||||
public override double DefaultWeight => 1.0;
|
||||
}
|
||||
|
|
|
|||
4
Projects/UOContent/Migrations/Server.Items.BadCard.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BadCard.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BadCard"
|
||||
}
|
||||
11
Projects/UOContent/Migrations/Server.Items.BaseScales.v1.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Items.BaseScales.v1.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": 1,
|
||||
"type": "Server.Items.BaseScales",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Resource",
|
||||
"type": "Server.Items.CraftResource",
|
||||
"rule": "EnumMigrationRule"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BlackScales.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BlackScales.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BlackScales"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BlueScales.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BlueScales.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BlueScales"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BlueSnowflake.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BlueSnowflake.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BlueSnowflake"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.CandyCane.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.CandyCane.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.CandyCane"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.Coal.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Coal.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.Coal"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GiftBox.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GiftBox.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GiftBox"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GiftBoxAngel.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GiftBoxAngel.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GiftBoxAngel"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GiftBoxCube.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GiftBoxCube.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GiftBoxCube"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GiftBoxCylinder.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GiftBoxCylinder.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GiftBoxCylinder"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GiftBoxNeon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GiftBoxNeon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GiftBoxNeon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GiftBoxOctogon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GiftBoxOctogon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GiftBoxOctogon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GiftBoxRectangle.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GiftBoxRectangle.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GiftBoxRectangle"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GingerBreadCookie.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GingerBreadCookie.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GingerBreadCookie"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GingerBreadHouseAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GingerBreadHouseAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GingerBreadHouseAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GingerBreadHouseDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GingerBreadHouseDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GingerBreadHouseDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GreenScales.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GreenScales.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GreenScales"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GreenStocking.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GreenStocking.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GreenStocking"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.GuillotineDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.GuillotineDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.GuillotineDeed"
|
||||
}
|
||||
22
Projects/UOContent/Migrations/Server.Items.HolidayBell.v0.json
generated
Normal file
22
Projects/UOContent/Migrations/Server.Items.HolidayBell.v0.json
generated
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.HolidayBell",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Maker",
|
||||
"type": "Server.TextDefinition",
|
||||
"rule": "PrimitiveUOTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
"TextDefinition"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SoundID",
|
||||
"type": "int",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.HolidayPottedPlant.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.HolidayPottedPlant.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.HolidayPottedPlant"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.HolidayTimepiece.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.HolidayTimepiece.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.HolidayTimepiece"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.HolidayTree.Ornament.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.HolidayTree.Ornament.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.HolidayTree.Ornament"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.HolidayTree.TreeTrunk.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.HolidayTree.TreeTrunk.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.HolidayTree.TreeTrunk"
|
||||
}
|
||||
11
Projects/UOContent/Migrations/Server.Items.HolidayTree.v2.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Items.HolidayTree.v2.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": 2,
|
||||
"type": "Server.Items.HolidayTree",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Placer",
|
||||
"type": "Server.Mobile",
|
||||
"rule": "SerializableInterfaceMigrationRule"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.IcicleLargeEast.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.IcicleLargeEast.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.IcicleLargeEast"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.IcicleLargeSouth.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.IcicleLargeSouth.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.IcicleLargeSouth"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.IcicleMedEast.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.IcicleMedEast.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.IcicleMedEast"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.IcicleMedSouth.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.IcicleMedSouth.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.IcicleMedSouth"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.IcicleSmallEast.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.IcicleSmallEast.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.IcicleSmallEast"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.IcicleSmallSouth.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.IcicleSmallSouth.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.IcicleSmallSouth"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.IcyPatch.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.IcyPatch.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.IcyPatch"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.PottedPlantDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.PottedPlantDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.PottedPlantDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.RedPoinsettia.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.RedPoinsettia.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.RedPoinsettia"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.RedScales.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.RedScales.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.RedScales"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.RedStocking.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.RedStocking.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.RedStocking"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.SnowGlobe.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SnowGlobe.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SnowGlobe"
|
||||
}
|
||||
11
Projects/UOContent/Migrations/Server.Items.SnowGlobeOne.v1.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Items.SnowGlobeOne.v1.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": 1,
|
||||
"type": "Server.Items.SnowGlobeOne",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Place",
|
||||
"type": "Server.Items.SnowGlobeTypeOne",
|
||||
"rule": "EnumMigrationRule"
|
||||
}
|
||||
]
|
||||
}
|
||||
11
Projects/UOContent/Migrations/Server.Items.SnowGlobeThree.v1.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Items.SnowGlobeThree.v1.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": 1,
|
||||
"type": "Server.Items.SnowGlobeThree",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Place",
|
||||
"type": "Server.Items.SnowGlobeTypeThree",
|
||||
"rule": "EnumMigrationRule"
|
||||
}
|
||||
]
|
||||
}
|
||||
11
Projects/UOContent/Migrations/Server.Items.SnowGlobeTwo.v1.json
generated
Normal file
11
Projects/UOContent/Migrations/Server.Items.SnowGlobeTwo.v1.json
generated
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"version": 1,
|
||||
"type": "Server.Items.SnowGlobeTwo",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Place",
|
||||
"type": "Server.Items.SnowGlobeTypeTwo",
|
||||
"rule": "EnumMigrationRule"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.SnowPileDeco.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SnowPileDeco.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SnowPileDeco"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.SnowStatueDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SnowStatueDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SnowStatueDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.SnowStatueGriffon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SnowStatueGriffon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SnowStatueGriffon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.SnowStatueMermaid.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SnowStatueMermaid.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SnowStatueMermaid"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.SnowStatuePegasus.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SnowStatuePegasus.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SnowStatuePegasus"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.SnowStatueSeahorse.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SnowStatueSeahorse.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SnowStatueSeahorse"
|
||||
}
|
||||
14
Projects/UOContent/Migrations/Server.Items.Snowman.v0.json
generated
Normal file
14
Projects/UOContent/Migrations/Server.Items.Snowman.v0.json
generated
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.Snowman",
|
||||
"properties": [
|
||||
{
|
||||
"name": "Title",
|
||||
"type": "string",
|
||||
"rule": "PrimitiveTypeMigrationRule",
|
||||
"ruleArguments": [
|
||||
""
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.Spam.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.Spam.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.Spam"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.WhitePoinsettia.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.WhitePoinsettia.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.WhitePoinsettia"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.WhiteScales.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.WhiteScales.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.WhiteScales"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.WhiteSnowflake.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.WhiteSnowflake.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.WhiteSnowflake"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.WinterGiftPackage2003.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.WinterGiftPackage2003.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.WinterGiftPackage2003"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.WreathAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.WreathAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.WreathAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.WreathDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.WreathDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.WreathDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.WristWatch.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.WristWatch.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.WristWatch"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.YellowScales.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.YellowScales.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.YellowScales"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue