fix: Codegens evil decor. Fixes trash items (#1362)
This commit is contained in:
parent
84b3e5cfdb
commit
551f6cca9d
59 changed files with 1007 additions and 1565 deletions
|
|
@ -7,7 +7,7 @@ namespace Server.Items;
|
|||
[SerializationGenerator(0, false)]
|
||||
public partial class TrashBarrel : Container, IChoppable
|
||||
{
|
||||
private Timer m_Timer;
|
||||
private Timer _timer;
|
||||
|
||||
[Constructible]
|
||||
public TrashBarrel() : base(0xE77)
|
||||
|
|
@ -34,13 +34,13 @@ public partial class TrashBarrel : Container, IChoppable
|
|||
}
|
||||
}
|
||||
|
||||
[AfterDeserialization]
|
||||
[AfterDeserialization(false)]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
if (Items.Count > 0)
|
||||
{
|
||||
m_Timer = new EmptyTimer(this);
|
||||
m_Timer.Start();
|
||||
_timer = new EmptyTimer(this);
|
||||
_timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -54,16 +54,16 @@ public partial class TrashBarrel : Container, IChoppable
|
|||
{
|
||||
SendLocalizedMessageTo(from, 1010442); // The item will be deleted in three minutes
|
||||
|
||||
if (m_Timer != null)
|
||||
if (_timer != null)
|
||||
{
|
||||
m_Timer.Stop();
|
||||
_timer.Stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Timer = new EmptyTimer(this);
|
||||
_timer = new EmptyTimer(this);
|
||||
}
|
||||
|
||||
m_Timer.Start();
|
||||
_timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -108,8 +108,8 @@ public partial class TrashBarrel : Container, IChoppable
|
|||
}
|
||||
}
|
||||
|
||||
m_Timer?.Stop();
|
||||
m_Timer = null;
|
||||
_timer?.Stop();
|
||||
_timer = null;
|
||||
}
|
||||
|
||||
private class EmptyTimer : Timer
|
||||
|
|
|
|||
|
|
@ -1,214 +1,127 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
[Flippable(0x2A5D, 0x2A61)]
|
||||
public partial class AwesomeDisturbingPortraitComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A5D, 0x2A61)]
|
||||
public class AwesomeDisturbingPortraitComponent : AddonComponent
|
||||
private InternalTimer _timer;
|
||||
|
||||
public AwesomeDisturbingPortraitComponent() : base(0x2A5D)
|
||||
{
|
||||
private InternalTimer m_Timer;
|
||||
_timer = new InternalTimer(this, TimeSpan.FromSeconds(1));
|
||||
_timer.Start();
|
||||
}
|
||||
|
||||
public AwesomeDisturbingPortraitComponent() : base(0x2A5D)
|
||||
{
|
||||
m_Timer = new InternalTimer(this, TimeSpan.FromSeconds(1));
|
||||
m_Timer.Start();
|
||||
}
|
||||
public override int LabelNumber => 1074479; // Disturbing portrait
|
||||
public bool FacingSouth => ItemID < 0x2A61;
|
||||
|
||||
public AwesomeDisturbingPortraitComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074479; // Disturbing portrait
|
||||
public bool FacingSouth => ItemID < 0x2A61;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Clock.GetTime(Map, X, Y, out var hours, out int _);
|
||||
|
||||
if (hours is < 4 or > 20)
|
||||
{
|
||||
Effects.PlaySound(Location, Map, 0x569);
|
||||
}
|
||||
|
||||
UpdateImage();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
if (m_Timer?.Running == true)
|
||||
{
|
||||
m_Timer.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
m_Timer = new InternalTimer(this, TimeSpan.Zero);
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
private void UpdateImage()
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Clock.GetTime(Map, X, Y, out var hours, out int _);
|
||||
|
||||
if (FacingSouth)
|
||||
if (hours is < 4 or > 20)
|
||||
{
|
||||
if (hours < 4)
|
||||
{
|
||||
ItemID = 0x2A60;
|
||||
}
|
||||
else if (hours < 6)
|
||||
{
|
||||
ItemID = 0x2A5F;
|
||||
}
|
||||
else if (hours < 8)
|
||||
{
|
||||
ItemID = 0x2A5E;
|
||||
}
|
||||
else if (hours < 16)
|
||||
{
|
||||
ItemID = 0x2A5D;
|
||||
}
|
||||
else if (hours < 18)
|
||||
{
|
||||
ItemID = 0x2A5E;
|
||||
}
|
||||
else if (hours < 20)
|
||||
{
|
||||
ItemID = 0x2A5F;
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemID = 0x2A60;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hours < 4)
|
||||
{
|
||||
ItemID = 0x2A64;
|
||||
}
|
||||
else if (hours < 6)
|
||||
{
|
||||
ItemID = 0x2A63;
|
||||
}
|
||||
else if (hours < 8)
|
||||
{
|
||||
ItemID = 0x2A62;
|
||||
}
|
||||
else if (hours < 16)
|
||||
{
|
||||
ItemID = 0x2A61;
|
||||
}
|
||||
else if (hours < 18)
|
||||
{
|
||||
ItemID = 0x2A62;
|
||||
}
|
||||
else if (hours < 20)
|
||||
{
|
||||
ItemID = 0x2A63;
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemID = 0x2A64;
|
||||
}
|
||||
Effects.PlaySound(Location, Map, 0x569);
|
||||
}
|
||||
|
||||
UpdateImage();
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
else
|
||||
{
|
||||
private readonly AwesomeDisturbingPortraitComponent m_Component;
|
||||
|
||||
public InternalTimer(AwesomeDisturbingPortraitComponent c, TimeSpan delay) : base(
|
||||
delay,
|
||||
TimeSpan.FromMinutes(10)
|
||||
)
|
||||
{
|
||||
m_Component = c;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Component?.Deleted == false)
|
||||
{
|
||||
m_Component.UpdateImage();
|
||||
}
|
||||
}
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public class AwesomeDisturbingPortraitAddon : BaseAddon
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
[Constructible]
|
||||
public AwesomeDisturbingPortraitAddon()
|
||||
base.OnAfterDelete();
|
||||
|
||||
if (_timer?.Running == true)
|
||||
{
|
||||
AddComponent(new AwesomeDisturbingPortraitComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public AwesomeDisturbingPortraitAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new AwesomeDisturbingPortraitDeed();
|
||||
|
||||
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();
|
||||
_timer.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
public class AwesomeDisturbingPortraitDeed : BaseAddonDeed
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
[Constructible]
|
||||
public AwesomeDisturbingPortraitDeed() => LootType = LootType.Blessed;
|
||||
// Randomize them so they aren't all going off at the same time.
|
||||
_timer = new InternalTimer(this, TimeSpan.FromMilliseconds(8 * Utility.Random(256)));
|
||||
_timer.Start();
|
||||
}
|
||||
|
||||
public AwesomeDisturbingPortraitDeed(Serial serial) : base(serial)
|
||||
private void UpdateImage()
|
||||
{
|
||||
Clock.GetTime(Map, X, Y, out var hours, out int _);
|
||||
|
||||
if (FacingSouth)
|
||||
{
|
||||
ItemID = hours switch
|
||||
{
|
||||
< 4 => 0x2A60,
|
||||
< 6 => 0x2A5F,
|
||||
< 8 => 0x2A5E,
|
||||
< 16 => 0x2A5D,
|
||||
< 18 => 0x2A5E,
|
||||
< 20 => 0x2A5F,
|
||||
_ => 0x2A60
|
||||
};
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new AwesomeDisturbingPortraitAddon();
|
||||
public override int LabelNumber => 1074479; // Disturbing portrait
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
ItemID = hours switch
|
||||
{
|
||||
base.Serialize(writer);
|
||||
< 4 => 0x2A64,
|
||||
< 6 => 0x2A63,
|
||||
< 8 => 0x2A62,
|
||||
< 16 => 0x2A61,
|
||||
< 18 => 0x2A62,
|
||||
< 20 => 0x2A63,
|
||||
_ => 0x2A64
|
||||
};
|
||||
}
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private readonly AwesomeDisturbingPortraitComponent _component;
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
public InternalTimer(AwesomeDisturbingPortraitComponent c, TimeSpan delay)
|
||||
: base(delay, TimeSpan.FromMinutes(10)) => _component = c;
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
if (_component?.Deleted == false)
|
||||
{
|
||||
_component.UpdateImage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class AwesomeDisturbingPortraitAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public AwesomeDisturbingPortraitAddon()
|
||||
{
|
||||
AddComponent(new AwesomeDisturbingPortraitComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new AwesomeDisturbingPortraitDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class AwesomeDisturbingPortraitDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public AwesomeDisturbingPortraitDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new AwesomeDisturbingPortraitAddon();
|
||||
public override int LabelNumber => 1074479; // Disturbing portrait
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,196 +1,141 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BedOfNailsComponent : AddonComponent
|
||||
{
|
||||
public class BedOfNailsComponent : AddonComponent
|
||||
public BedOfNailsComponent(int itemID) : base(itemID)
|
||||
{
|
||||
public BedOfNailsComponent(int itemID)
|
||||
: base(itemID)
|
||||
{
|
||||
}
|
||||
|
||||
public BedOfNailsComponent(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074801; // Bed of Nails
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
var allow = base.OnMoveOver(m);
|
||||
|
||||
if (allow && Addon is BedOfNailsAddon addon)
|
||||
{
|
||||
addon.OnMoveOver(m);
|
||||
}
|
||||
|
||||
return allow;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlippableAddon(Direction.South, Direction.East)]
|
||||
public class BedOfNailsAddon : BaseAddon
|
||||
public override int LabelNumber => 1074801; // Bed of Nails
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
private InternalTimer m_Timer;
|
||||
var allow = base.OnMoveOver(m);
|
||||
|
||||
[Constructible]
|
||||
public BedOfNailsAddon()
|
||||
if (allow && Addon is BedOfNailsAddon addon)
|
||||
{
|
||||
Direction = Direction.South;
|
||||
|
||||
AddComponent(new BedOfNailsComponent(0x2A81), 0, 0, 0);
|
||||
AddComponent(new BedOfNailsComponent(0x2A82), 0, -1, 0);
|
||||
addon.OnMoveOver(m);
|
||||
}
|
||||
|
||||
public BedOfNailsAddon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
return allow;
|
||||
}
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BedOfNailsDeed();
|
||||
[FlippableAddon(Direction.South, Direction.East)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BedOfNailsAddon : BaseAddon
|
||||
{
|
||||
private InternalTimer _timer;
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
[Constructible]
|
||||
public BedOfNailsAddon()
|
||||
{
|
||||
Direction = Direction.South;
|
||||
|
||||
AddComponent(new BedOfNailsComponent(0x2A81), 0, 0, 0);
|
||||
AddComponent(new BedOfNailsComponent(0x2A82), 0, -1, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BedOfNailsDeed();
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
if (m.Alive && (m.AccessLevel == AccessLevel.Player || !m.Hidden))
|
||||
{
|
||||
if (m.Alive && (m.AccessLevel == AccessLevel.Player || !m.Hidden))
|
||||
if (m.Player)
|
||||
{
|
||||
if (m.Player)
|
||||
{
|
||||
if (m.Female)
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x53B, 0x53D));
|
||||
}
|
||||
else
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x53E, 0x540));
|
||||
}
|
||||
}
|
||||
|
||||
if (m_Timer?.Running != true)
|
||||
{
|
||||
(m_Timer = new InternalTimer(m)).Start();
|
||||
}
|
||||
Effects.PlaySound(
|
||||
Location,
|
||||
Map,
|
||||
m.Female ? Utility.RandomMinMax(0x53B, 0x53D) : Utility.RandomMinMax(0x53E, 0x540)
|
||||
);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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 virtual void Flip(Mobile from, Direction direction)
|
||||
{
|
||||
switch (direction)
|
||||
if (_timer?.Running != true)
|
||||
{
|
||||
case Direction.East:
|
||||
(_timer = new InternalTimer(m)).Start();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void Flip(Mobile from, Direction direction)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case Direction.East:
|
||||
{
|
||||
AddComponent(new BedOfNailsComponent(0x2A89), 0, 0, 0);
|
||||
AddComponent(new BedOfNailsComponent(0x2A8A), -1, 0, 0);
|
||||
break;
|
||||
case Direction.South:
|
||||
}
|
||||
case Direction.South:
|
||||
{
|
||||
AddComponent(new BedOfNailsComponent(0x2A81), 0, 0, 0);
|
||||
AddComponent(new BedOfNailsComponent(0x2A82), 0, -1, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private readonly Mobile m_Mobile;
|
||||
private Point3D m_Location;
|
||||
|
||||
public InternalTimer(Mobile m)
|
||||
: base(TimeSpan.Zero, TimeSpan.FromSeconds(1), 5)
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_Location = Point3D.Zero;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Mobile?.Map == null || m_Mobile.Deleted || !m_Mobile.Alive || m_Mobile.Map == Map.Internal)
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
else if (m_Location != m_Mobile.Location)
|
||||
{
|
||||
var amount = Utility.RandomMinMax(0, 7);
|
||||
|
||||
for (var i = 0; i < amount; i++)
|
||||
{
|
||||
var x = m_Mobile.X + Utility.RandomMinMax(-1, 1);
|
||||
var y = m_Mobile.Y + Utility.RandomMinMax(-1, 1);
|
||||
var z = m_Mobile.Z;
|
||||
|
||||
if (!m_Mobile.Map.CanFit(x, y, z, 1, false, false))
|
||||
{
|
||||
z = m_Mobile.Map.GetAverageZ(x, y);
|
||||
|
||||
if (!m_Mobile.Map.CanFit(x, y, z, 1, false, false))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
var blood = new Blood(Utility.RandomMinMax(0x122C, 0x122F));
|
||||
blood.MoveToWorld(new Point3D(x, y, z), m_Mobile.Map);
|
||||
}
|
||||
|
||||
m_Location = m_Mobile.Location;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BedOfNailsDeed : BaseAddonDeed
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
[Constructible]
|
||||
public BedOfNailsDeed() => LootType = LootType.Blessed;
|
||||
private readonly Mobile _mobile;
|
||||
private Point3D _location;
|
||||
|
||||
public BedOfNailsDeed(Serial serial)
|
||||
: base(serial)
|
||||
public InternalTimer(Mobile m) : base(TimeSpan.Zero, TimeSpan.FromSeconds(1), 5)
|
||||
{
|
||||
_mobile = m;
|
||||
_location = Point3D.Zero;
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BedOfNailsAddon();
|
||||
public override int LabelNumber => 1074801; // Bed of Nails
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
protected override void OnTick()
|
||||
{
|
||||
base.Serialize(writer);
|
||||
if (_mobile?.Map == null || _mobile.Deleted || !_mobile.Alive || _mobile.Map == Map.Internal)
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
else if (_location != _mobile.Location)
|
||||
{
|
||||
var amount = Utility.RandomMinMax(0, 7);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
for (var i = 0; i < amount; i++)
|
||||
{
|
||||
var x = _mobile.X + Utility.RandomMinMax(-1, 1);
|
||||
var y = _mobile.Y + Utility.RandomMinMax(-1, 1);
|
||||
var z = _mobile.Z;
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
if (!_mobile.Map.CanFit(x, y, z, 1, false, false))
|
||||
{
|
||||
z = _mobile.Map.GetAverageZ(x, y);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
if (!_mobile.Map.CanFit(x, y, z, 1, false, false))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
var blood = new Blood(Utility.RandomMinMax(0x122C, 0x122F));
|
||||
blood.MoveToWorld(new Point3D(x, y, z), _mobile.Map);
|
||||
}
|
||||
|
||||
_location = _mobile.Location;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BedOfNailsDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BedOfNailsDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BedOfNailsAddon();
|
||||
public override int LabelNumber => 1074801; // Bed of Nails
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,116 +1,70 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BoneCouchComponent : AddonComponent
|
||||
{
|
||||
public class BoneCouchComponent : AddonComponent
|
||||
public BoneCouchComponent(int itemID) : base(itemID)
|
||||
{
|
||||
public BoneCouchComponent(int itemID) : base(itemID)
|
||||
{
|
||||
}
|
||||
|
||||
public BoneCouchComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074477; // Bone couch
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
var allow = base.OnMoveOver(m);
|
||||
|
||||
if (allow && m.Alive && m.Player && (m.AccessLevel == AccessLevel.Player || !m.Hidden))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x547, 0x54A));
|
||||
}
|
||||
|
||||
return allow;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
[FlippableAddon(Direction.South, Direction.East)]
|
||||
public class BoneCouchAddon : BaseAddon
|
||||
public override int LabelNumber => 1074477; // Bone couch
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
[Constructible]
|
||||
public BoneCouchAddon()
|
||||
{
|
||||
Direction = Direction.South;
|
||||
var allow = base.OnMoveOver(m);
|
||||
|
||||
AddComponent(new BoneCouchComponent(0x2A5A), 0, 0, 0);
|
||||
AddComponent(new BoneCouchComponent(0x2A5B), -1, 0, 0);
|
||||
if (allow && m.Alive && m.Player && (m.AccessLevel == AccessLevel.Player || !m.Hidden))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x547, 0x54A));
|
||||
}
|
||||
|
||||
public BoneCouchAddon(Serial serial) : base(serial)
|
||||
return allow;
|
||||
}
|
||||
}
|
||||
|
||||
[FlippableAddon(Direction.South, Direction.East)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BoneCouchAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BoneCouchAddon()
|
||||
{
|
||||
Direction = Direction.South;
|
||||
|
||||
AddComponent(new BoneCouchComponent(0x2A5A), 0, 0, 0);
|
||||
AddComponent(new BoneCouchComponent(0x2A5B), -1, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BoneCouchDeed();
|
||||
|
||||
public virtual void Flip(Mobile from, Direction direction)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BoneCouchDeed();
|
||||
|
||||
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 virtual void Flip(Mobile from, Direction direction)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case Direction.East:
|
||||
case Direction.East:
|
||||
{
|
||||
AddComponent(new BoneCouchComponent(0x2A80), 0, 0, 0);
|
||||
AddComponent(new BoneCouchComponent(0x2A7F), 0, 1, 0);
|
||||
break;
|
||||
case Direction.South:
|
||||
}
|
||||
case Direction.South:
|
||||
{
|
||||
AddComponent(new BoneCouchComponent(0x2A5A), 0, 0, 0);
|
||||
AddComponent(new BoneCouchComponent(0x2A5B), -1, 0, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BoneCouchDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BoneCouchDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public BoneCouchDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BoneCouchAddon();
|
||||
public override int LabelNumber => 1074477; // Bone couch
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BoneCouchDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BoneCouchDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BoneCouchAddon();
|
||||
public override int LabelNumber => 1074477; // Bone couch
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +1,25 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BoneTableAddon : BaseAddon
|
||||
{
|
||||
public class BoneTableAddon : BaseAddon
|
||||
[Constructible]
|
||||
public BoneTableAddon()
|
||||
{
|
||||
[Constructible]
|
||||
public BoneTableAddon()
|
||||
{
|
||||
AddComponent(new LocalizedAddonComponent(0x2A5C, 1074478), 0, 0, 0);
|
||||
}
|
||||
|
||||
public BoneTableAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BoneTableDeed();
|
||||
|
||||
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();
|
||||
}
|
||||
AddComponent(new LocalizedAddonComponent(0x2A5C, 1074478), 0, 0, 0);
|
||||
}
|
||||
|
||||
public class BoneTableDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BoneTableDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public BoneTableDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BoneTableAddon();
|
||||
public override int LabelNumber => 1074478; // Bone table
|
||||
|
||||
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 override BaseAddonDeed Deed => new BoneTableDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BoneTableDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BoneTableDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BoneTableAddon();
|
||||
public override int LabelNumber => 1074478; // Bone table
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,98 +1,48 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2A58, 0x2A59)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BoneThroneComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A58, 0x2A59)]
|
||||
public class BoneThroneComponent : AddonComponent
|
||||
public BoneThroneComponent() : base(0x2A58)
|
||||
{
|
||||
public BoneThroneComponent() : base(0x2A58)
|
||||
{
|
||||
}
|
||||
|
||||
public BoneThroneComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074476; // Bone throne
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
var allow = base.OnMoveOver(m);
|
||||
|
||||
if (allow && m.Alive && m.Player && (m.AccessLevel == AccessLevel.Player || !m.Hidden))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x54B, 0x54D));
|
||||
}
|
||||
|
||||
return allow;
|
||||
}
|
||||
|
||||
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 BoneThroneAddon : BaseAddon
|
||||
public override int LabelNumber => 1074476; // Bone throne
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
[Constructible]
|
||||
public BoneThroneAddon()
|
||||
var allow = base.OnMoveOver(m);
|
||||
|
||||
if (allow && m.Alive && m.Player && (m.AccessLevel == AccessLevel.Player || !m.Hidden))
|
||||
{
|
||||
AddComponent(new BoneThroneComponent(), 0, 0, 0);
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x54B, 0x54D));
|
||||
}
|
||||
|
||||
public BoneThroneAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BoneThroneDeed();
|
||||
|
||||
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 BoneThroneDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BoneThroneDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public BoneThroneDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new BoneThroneAddon();
|
||||
public override int LabelNumber => 1074476; // Bone throne
|
||||
|
||||
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();
|
||||
}
|
||||
return allow;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BoneThroneAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public BoneThroneAddon()
|
||||
{
|
||||
AddComponent(new BoneThroneComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new BoneThroneDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class BoneThroneDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public BoneThroneDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new BoneThroneAddon();
|
||||
public override int LabelNumber => 1074476; // Bone throne
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,139 +1,83 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2A69, 0x2A6D)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class CreepyPortraitComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A69, 0x2A6D)]
|
||||
public class CreepyPortraitComponent : AddonComponent
|
||||
public CreepyPortraitComponent() : base(0x2A69)
|
||||
{
|
||||
public CreepyPortraitComponent() : base(0x2A69)
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074481; // Creepy portrait
|
||||
public override bool HandlesOnMovement => true;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x565, 0x566));
|
||||
}
|
||||
|
||||
public CreepyPortraitComponent(Serial serial) : base(serial)
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074481; // Creepy portrait
|
||||
public override bool HandlesOnMovement => true;
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
public override void OnMovement(Mobile m, Point3D old)
|
||||
{
|
||||
if (m.Alive && m.Player && (m.AccessLevel == AccessLevel.Player || !m.Hidden))
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
if (!Utility.InRange(old, Location, 2) && Utility.InRange(m.Location, Location, 2))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x565, 0x566));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D old)
|
||||
{
|
||||
if (m.Alive && m.Player && (m.AccessLevel == AccessLevel.Player || !m.Hidden))
|
||||
{
|
||||
if (!Utility.InRange(old, Location, 2) && Utility.InRange(m.Location, Location, 2))
|
||||
if (ItemID is 0x2A69 or 0x2A6D)
|
||||
{
|
||||
if (ItemID is 0x2A69 or 0x2A6D)
|
||||
{
|
||||
Up();
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(0.5), 2, Up);
|
||||
}
|
||||
}
|
||||
else if (Utility.InRange(old, Location, 2) && !Utility.InRange(m.Location, Location, 2))
|
||||
{
|
||||
if (ItemID is 0x2A6C or 0x2A70)
|
||||
{
|
||||
Down();
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(0.5), 2, Down);
|
||||
}
|
||||
Up();
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(0.5), 2, Up);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Up()
|
||||
{
|
||||
ItemID += 1;
|
||||
}
|
||||
|
||||
private void Down()
|
||||
{
|
||||
ItemID -= 1;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
if (version == 0 && ItemID != 0x2A69 && ItemID != 0x2A6D)
|
||||
else if (Utility.InRange(old, Location, 2) && !Utility.InRange(m.Location, Location, 2))
|
||||
{
|
||||
ItemID = 0x2A69;
|
||||
if (ItemID is 0x2A6C or 0x2A70)
|
||||
{
|
||||
Down();
|
||||
Timer.StartTimer(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(0.5), 2, Down);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CreepyPortraitAddon : BaseAddon
|
||||
private void Up()
|
||||
{
|
||||
[Constructible]
|
||||
public CreepyPortraitAddon()
|
||||
{
|
||||
AddComponent(new CreepyPortraitComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public CreepyPortraitAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new CreepyPortraitDeed();
|
||||
|
||||
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();
|
||||
}
|
||||
ItemID += 1;
|
||||
}
|
||||
|
||||
public class CreepyPortraitDeed : BaseAddonDeed
|
||||
private void Down()
|
||||
{
|
||||
[Constructible]
|
||||
public CreepyPortraitDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public CreepyPortraitDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new CreepyPortraitAddon();
|
||||
public override int LabelNumber => 1074481; // Creepy portrait
|
||||
|
||||
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();
|
||||
}
|
||||
ItemID -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class CreepyPortraitAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public CreepyPortraitAddon()
|
||||
{
|
||||
AddComponent(new CreepyPortraitComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new CreepyPortraitDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class CreepyPortraitDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public CreepyPortraitDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new CreepyPortraitAddon();
|
||||
public override int LabelNumber => 1074481; // Creepy portrait
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,124 +1,75 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2A5D, 0x2A61)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class DisturbingPortraitComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A5D, 0x2A61)]
|
||||
public class DisturbingPortraitComponent : AddonComponent
|
||||
private Timer _timer;
|
||||
|
||||
public DisturbingPortraitComponent() : base(0x2A5D)
|
||||
{
|
||||
private TimerExecutionToken _timerToken;
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
public DisturbingPortraitComponent() : base(0x2A5D)
|
||||
public override int LabelNumber => 1074479; // Disturbing portrait
|
||||
|
||||
private void StartTimer()
|
||||
{
|
||||
_timer = Timer.DelayCall(TimeSpan.FromMinutes(3), TimeSpan.FromMinutes(3), Change);
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Timer.StartTimer(TimeSpan.FromMinutes(3), TimeSpan.FromMinutes(3), Change, out _timerToken);
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x567, 0x568));
|
||||
}
|
||||
|
||||
public DisturbingPortraitComponent(Serial serial) : base(serial)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074479; // Disturbing portrait
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x567, 0x568));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
_timerToken.Cancel();
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromMinutes(3), TimeSpan.FromMinutes(3), Change, out _timerToken);
|
||||
}
|
||||
|
||||
private void Change()
|
||||
{
|
||||
if (ItemID < 0x2A61)
|
||||
{
|
||||
ItemID = Utility.RandomMinMax(0x2A5D, 0x2A60);
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemID = Utility.RandomMinMax(0x2A61, 0x2A64);
|
||||
}
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public class DisturbingPortraitAddon : BaseAddon
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
[Constructible]
|
||||
public DisturbingPortraitAddon()
|
||||
{
|
||||
AddComponent(new DisturbingPortraitComponent(), 0, 0, 0);
|
||||
}
|
||||
base.OnAfterDelete();
|
||||
|
||||
public DisturbingPortraitAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new DisturbingPortraitDeed();
|
||||
|
||||
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();
|
||||
}
|
||||
_timer?.Stop();
|
||||
}
|
||||
|
||||
public class DisturbingPortraitDeed : BaseAddonDeed
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
[Constructible]
|
||||
public DisturbingPortraitDeed() => LootType = LootType.Blessed;
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
public DisturbingPortraitDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new DisturbingPortraitAddon();
|
||||
public override int LabelNumber => 1074479; // Disturbing portrait
|
||||
|
||||
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 void Change()
|
||||
{
|
||||
ItemID = ItemID < 0x2A61 ? Utility.RandomMinMax(0x2A5D, 0x2A60) : Utility.RandomMinMax(0x2A61, 0x2A64);
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class DisturbingPortraitAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public DisturbingPortraitAddon()
|
||||
{
|
||||
AddComponent(new DisturbingPortraitComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new DisturbingPortraitDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class DisturbingPortraitDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public DisturbingPortraitDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new DisturbingPortraitAddon();
|
||||
public override int LabelNumber => 1074479; // Disturbing portrait
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,111 +1,66 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2A7B, 0x2A7D)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class HaunterMirrorComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A7B, 0x2A7D)]
|
||||
public class HaunterMirrorComponent : AddonComponent
|
||||
public HaunterMirrorComponent() : base(0x2A7B)
|
||||
{
|
||||
public HaunterMirrorComponent() : base(0x2A7B)
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074800; // Haunted Mirror
|
||||
public override bool HandlesOnMovement => true;
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D old)
|
||||
{
|
||||
base.OnMovement(m, old);
|
||||
|
||||
if (!m.Alive || !m.Player || m.AccessLevel != AccessLevel.Player && m.Hidden)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public HaunterMirrorComponent(Serial serial) : base(serial)
|
||||
var inOldRange = Utility.InRange(old, Location, 2);
|
||||
var inNewRange = Utility.InRange(m.Location, Location, 2);
|
||||
|
||||
if (!inOldRange && inNewRange)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074800; // Haunted Mirror
|
||||
public override bool HandlesOnMovement => true;
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D old)
|
||||
{
|
||||
base.OnMovement(m, old);
|
||||
|
||||
if (m.Alive && m.Player && (m.AccessLevel == AccessLevel.Player || !m.Hidden))
|
||||
if (ItemID is 0x2A7B or 0x2A7D)
|
||||
{
|
||||
if (!Utility.InRange(old, Location, 2) && Utility.InRange(m.Location, Location, 2))
|
||||
{
|
||||
if (ItemID is 0x2A7B or 0x2A7D)
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x551, 0x553));
|
||||
ItemID += 1;
|
||||
}
|
||||
}
|
||||
else if (Utility.InRange(old, Location, 2) && !Utility.InRange(m.Location, Location, 2))
|
||||
{
|
||||
if (ItemID is 0x2A7C or 0x2A7E)
|
||||
{
|
||||
ItemID -= 1;
|
||||
}
|
||||
}
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x551, 0x553));
|
||||
ItemID += 1;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
else if (inOldRange && !inNewRange)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class HaunterMirrorAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public HaunterMirrorAddon()
|
||||
{
|
||||
AddComponent(new HaunterMirrorComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public HaunterMirrorAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new HaunterMirrorDeed();
|
||||
|
||||
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 HaunterMirrorDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public HaunterMirrorDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public HaunterMirrorDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new HaunterMirrorAddon();
|
||||
public override int LabelNumber => 1074800; // Haunted Mirror
|
||||
|
||||
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();
|
||||
if (ItemID is 0x2A7C or 0x2A7E)
|
||||
{
|
||||
ItemID -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class HaunterMirrorAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public HaunterMirrorAddon()
|
||||
{
|
||||
AddComponent(new HaunterMirrorComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new HaunterMirrorDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class HaunterMirrorDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public HaunterMirrorDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new HaunterMirrorAddon();
|
||||
public override int LabelNumber => 1074800; // Haunted Mirror
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,97 +1,47 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2A75, 0x2A76)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieBlueComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A75, 0x2A76)]
|
||||
public class MountedPixieBlueComponent : AddonComponent
|
||||
public MountedPixieBlueComponent() : base(0x2A75)
|
||||
{
|
||||
public MountedPixieBlueComponent() : base(0x2A75)
|
||||
{
|
||||
}
|
||||
|
||||
public MountedPixieBlueComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x55C, 0x55E));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class MountedPixieBlueAddon : BaseAddon
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
public MountedPixieBlueAddon()
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
AddComponent(new MountedPixieBlueComponent(), 0, 0, 0);
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x55C, 0x55E));
|
||||
}
|
||||
|
||||
public MountedPixieBlueAddon(Serial serial) : base(serial)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new MountedPixieBlueDeed();
|
||||
|
||||
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 MountedPixieBlueDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public MountedPixieBlueDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public MountedPixieBlueDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new MountedPixieBlueAddon();
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
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.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieBlueAddon : BaseAddon
|
||||
{
|
||||
public MountedPixieBlueAddon()
|
||||
{
|
||||
AddComponent(new MountedPixieBlueComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new MountedPixieBlueDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieBlueDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public MountedPixieBlueDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new MountedPixieBlueAddon();
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,97 +1,47 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2A71, 0x2A72)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieGreenComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A71, 0x2A72)]
|
||||
public class MountedPixieGreenComponent : AddonComponent
|
||||
public MountedPixieGreenComponent() : base(0x2A71)
|
||||
{
|
||||
public MountedPixieGreenComponent() : base(0x2A71)
|
||||
{
|
||||
}
|
||||
|
||||
public MountedPixieGreenComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x554, 0x557));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class MountedPixieGreenAddon : BaseAddon
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
public MountedPixieGreenAddon()
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
AddComponent(new MountedPixieGreenComponent(), 0, 0, 0);
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x554, 0x557));
|
||||
}
|
||||
|
||||
public MountedPixieGreenAddon(Serial serial) : base(serial)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new MountedPixieGreenDeed();
|
||||
|
||||
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 MountedPixieGreenDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public MountedPixieGreenDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public MountedPixieGreenDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new MountedPixieGreenAddon();
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
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.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieGreenAddon : BaseAddon
|
||||
{
|
||||
public MountedPixieGreenAddon()
|
||||
{
|
||||
AddComponent(new MountedPixieGreenComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new MountedPixieGreenDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieGreenDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public MountedPixieGreenDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new MountedPixieGreenAddon();
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,97 +1,47 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2A77, 0x2A78)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieLimeComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A77, 0x2A78)]
|
||||
public class MountedPixieLimeComponent : AddonComponent
|
||||
public MountedPixieLimeComponent() : base(0x2A77)
|
||||
{
|
||||
public MountedPixieLimeComponent() : base(0x2A77)
|
||||
{
|
||||
}
|
||||
|
||||
public MountedPixieLimeComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x55F, 0x561));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class MountedPixieLimeAddon : BaseAddon
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
public MountedPixieLimeAddon()
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
AddComponent(new MountedPixieLimeComponent(), 0, 0, 0);
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x55F, 0x561));
|
||||
}
|
||||
|
||||
public MountedPixieLimeAddon(Serial serial) : base(serial)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new MountedPixieLimeDeed();
|
||||
|
||||
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 MountedPixieLimeDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public MountedPixieLimeDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public MountedPixieLimeDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new MountedPixieLimeAddon();
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
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.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieLimeAddon : BaseAddon
|
||||
{
|
||||
public MountedPixieLimeAddon()
|
||||
{
|
||||
AddComponent(new MountedPixieLimeComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new MountedPixieLimeDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieLimeDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public MountedPixieLimeDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new MountedPixieLimeAddon();
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,97 +1,47 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2A73, 0x2A74)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieOrangeComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A73, 0x2A74)]
|
||||
public class MountedPixieOrangeComponent : AddonComponent
|
||||
public MountedPixieOrangeComponent() : base(0x2A73)
|
||||
{
|
||||
public MountedPixieOrangeComponent() : base(0x2A73)
|
||||
{
|
||||
}
|
||||
|
||||
public MountedPixieOrangeComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x558, 0x55B));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class MountedPixieOrangeAddon : BaseAddon
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
public MountedPixieOrangeAddon()
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
AddComponent(new MountedPixieOrangeComponent(), 0, 0, 0);
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x558, 0x55B));
|
||||
}
|
||||
|
||||
public MountedPixieOrangeAddon(Serial serial) : base(serial)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new MountedPixieOrangeDeed();
|
||||
|
||||
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 MountedPixieOrangeDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public MountedPixieOrangeDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public MountedPixieOrangeDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new MountedPixieOrangeAddon();
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
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.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieOrangeAddon : BaseAddon
|
||||
{
|
||||
public MountedPixieOrangeAddon()
|
||||
{
|
||||
AddComponent(new MountedPixieOrangeComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new MountedPixieOrangeDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieOrangeDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public MountedPixieOrangeDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new MountedPixieOrangeAddon();
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,97 +1,47 @@
|
|||
namespace Server.Items
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2A79, 0x2A7A)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieWhiteComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A79, 0x2A7A)]
|
||||
public class MountedPixieWhiteComponent : AddonComponent
|
||||
public MountedPixieWhiteComponent() : base(0x2A79)
|
||||
{
|
||||
public MountedPixieWhiteComponent() : base(0x2A79)
|
||||
{
|
||||
}
|
||||
|
||||
public MountedPixieWhiteComponent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x562, 0x564));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class MountedPixieWhiteAddon : BaseAddon
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
public MountedPixieWhiteAddon()
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
AddComponent(new MountedPixieWhiteComponent(), 0, 0, 0);
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x562, 0x564));
|
||||
}
|
||||
|
||||
public MountedPixieWhiteAddon(Serial serial) : base(serial)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new MountedPixieWhiteDeed();
|
||||
|
||||
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 MountedPixieWhiteDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public MountedPixieWhiteDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public MountedPixieWhiteDeed(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new MountedPixieWhiteAddon();
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
|
||||
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.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieWhiteAddon : BaseAddon
|
||||
{
|
||||
public MountedPixieWhiteAddon()
|
||||
{
|
||||
AddComponent(new MountedPixieWhiteComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new MountedPixieWhiteDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class MountedPixieWhiteDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public MountedPixieWhiteDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new MountedPixieWhiteAddon();
|
||||
public override int LabelNumber => 1074482; // Mounted pixie
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,166 +1,150 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[FlippableAddon(Direction.South, Direction.East)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class SacrificialAltarAddon : BaseAddonContainer
|
||||
{
|
||||
[FlippableAddon(Direction.South, Direction.East)]
|
||||
public class SacrificialAltarAddon : BaseAddonContainer
|
||||
private Timer _timer;
|
||||
|
||||
[Constructible]
|
||||
public SacrificialAltarAddon() : base(0x2A9B)
|
||||
{
|
||||
private TimerExecutionToken _timerToken;
|
||||
Direction = Direction.South;
|
||||
|
||||
[Constructible]
|
||||
public SacrificialAltarAddon() : base(0x2A9B)
|
||||
AddComponent(new LocalizedContainerComponent(0x2A9A, 1074818), 1, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonContainerDeed Deed => new SacrificialAltarDeed();
|
||||
public override int LabelNumber => 1074818; // Sacrificial Altar
|
||||
public override int DefaultMaxWeight => 0;
|
||||
public override int DefaultGumpID => 0x107;
|
||||
public override int DefaultDropSound => 0x42;
|
||||
|
||||
private void InvalidateContents(Mobile from)
|
||||
{
|
||||
if (TotalItems >= 50)
|
||||
{
|
||||
Direction = Direction.South;
|
||||
|
||||
AddComponent(new LocalizedContainerComponent(0x2A9A, 1074818), 1, 0, 0);
|
||||
SendLocalizedMessageTo(from, 501478); // The trash is full! Emptying!
|
||||
Empty();
|
||||
}
|
||||
|
||||
public SacrificialAltarAddon(Serial serial) : base(serial)
|
||||
else
|
||||
{
|
||||
}
|
||||
SendLocalizedMessageTo(from, 1010442); // The item will be deleted in three minutes
|
||||
|
||||
public override BaseAddonContainerDeed Deed => new SacrificialAltarDeed();
|
||||
public override int LabelNumber => 1074818; // Sacrificial Altar
|
||||
public override int DefaultMaxWeight => 0;
|
||||
public override int DefaultGumpID => 0x107;
|
||||
public override int DefaultDropSound => 0x42;
|
||||
|
||||
private void StartTimer()
|
||||
{
|
||||
_timerToken.Cancel();
|
||||
Timer.StartTimer(TimeSpan.FromMinutes(3), Empty, out _timerToken);
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (!base.OnDragDrop(from, dropped))
|
||||
if (_timer != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (TotalItems >= 50)
|
||||
{
|
||||
SendLocalizedMessageTo(from, 501478); // The trash is full! Emptying!
|
||||
Empty();
|
||||
_timer.Stop();
|
||||
}
|
||||
else
|
||||
{
|
||||
SendLocalizedMessageTo(from, 1010442); // The item will be deleted in three minutes
|
||||
|
||||
StartTimer();
|
||||
_timer = new EmptyTimer(this);
|
||||
}
|
||||
|
||||
_timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (base.OnDragDrop(from, dropped))
|
||||
{
|
||||
InvalidateContents(from);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
|
||||
{
|
||||
if (base.OnDragDropInto(from, item, p))
|
||||
{
|
||||
if (!base.OnDragDropInto(from, item, p))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (TotalItems >= 50)
|
||||
{
|
||||
SendLocalizedMessageTo(from, 501478); // The trash is full! Emptying!
|
||||
Empty();
|
||||
}
|
||||
else
|
||||
{
|
||||
SendLocalizedMessageTo(from, 1010442); // The item will be deleted in three minutes
|
||||
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
InvalidateContents(from);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
return false;
|
||||
}
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
[AfterDeserialization(false)]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
// AfterDeserialization is not synchronous (false) since Items is not filled when we deserialize.
|
||||
if (Items.Count > 0)
|
||||
{
|
||||
_timer = new EmptyTimer(this);
|
||||
_timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
public virtual void Flip(Mobile from, Direction direction)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
|
||||
if (Items.Count > 0)
|
||||
{
|
||||
StartTimer();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Flip(Mobile from, Direction direction)
|
||||
{
|
||||
switch (direction)
|
||||
{
|
||||
case Direction.East:
|
||||
case Direction.East:
|
||||
{
|
||||
ItemID = 0x2A9C;
|
||||
AddComponent(new LocalizedContainerComponent(0x2A9D, 1074818), 0, -1, 0);
|
||||
break;
|
||||
case Direction.South:
|
||||
}
|
||||
case Direction.South:
|
||||
{
|
||||
ItemID = 0x2A9B;
|
||||
AddComponent(new LocalizedContainerComponent(0x2A9A, 1074818), 1, 0, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void Empty()
|
||||
{
|
||||
if (Items.Count > 0)
|
||||
{
|
||||
var location = Location;
|
||||
location.Z += 10;
|
||||
|
||||
Effects.SendLocationEffect(location, Map, 0x3709, 10, 10, 0x356);
|
||||
Effects.PlaySound(location, Map, 0x32E);
|
||||
|
||||
if (Items.Count > 0)
|
||||
{
|
||||
for (var i = Items.Count - 1; i >= 0; --i)
|
||||
{
|
||||
if (i >= Items.Count)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Items[i].Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_timerToken.Cancel();
|
||||
}
|
||||
}
|
||||
|
||||
public class SacrificialAltarDeed : BaseAddonContainerDeed
|
||||
public virtual void Empty()
|
||||
{
|
||||
[Constructible]
|
||||
public SacrificialAltarDeed() => LootType = LootType.Blessed;
|
||||
var items = Items;
|
||||
|
||||
public SacrificialAltarDeed(Serial serial) : base(serial)
|
||||
if (items.Count > 0)
|
||||
{
|
||||
var location = Location;
|
||||
location.Z += 10;
|
||||
|
||||
Effects.SendLocationEffect(location, Map, 0x3709, 10, 10, 0x356);
|
||||
Effects.PlaySound(location, Map, 0x32E);
|
||||
|
||||
for (var i = items.Count - 1; i >= 0; --i)
|
||||
{
|
||||
if (i >= items.Count)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
items[i].Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public override BaseAddonContainer Addon => new SacrificialAltarAddon();
|
||||
public override int LabelNumber => 1074818; // Sacrificial Altar
|
||||
_timer?.Stop();
|
||||
_timer = null;
|
||||
}
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
private class EmptyTimer : Timer
|
||||
{
|
||||
private SacrificialAltarAddon _altar;
|
||||
|
||||
public EmptyTimer(SacrificialAltarAddon altar) : base(TimeSpan.FromMinutes(3.0)) => _altar = altar;
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
_altar.Empty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class SacrificialAltarDeed : BaseAddonContainerDeed
|
||||
{
|
||||
[Constructible]
|
||||
public SacrificialAltarDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddonContainer Addon => new SacrificialAltarAddon();
|
||||
public override int LabelNumber => 1074818; // Sacrificial Altar
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,137 +1,94 @@
|
|||
using System;
|
||||
using ModernUO.Serialization;
|
||||
|
||||
namespace Server.Items
|
||||
namespace Server.Items;
|
||||
|
||||
[Flippable(0x2A65, 0x2A67)]
|
||||
[SerializationGenerator(0)]
|
||||
public partial class UnsettlingPortraitComponent : AddonComponent
|
||||
{
|
||||
[Flippable(0x2A65, 0x2A67)]
|
||||
public class UnsettlingPortraitComponent : AddonComponent
|
||||
private Timer _timer;
|
||||
|
||||
public UnsettlingPortraitComponent() : base(0x2A65)
|
||||
{
|
||||
private TimerExecutionToken _timerToken;
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
public UnsettlingPortraitComponent() : base(0x2A65)
|
||||
public override int LabelNumber => 1074480; // Unsettling portrait
|
||||
|
||||
private void StartTimer()
|
||||
{
|
||||
_timer = Timer.DelayCall(
|
||||
TimeSpan.FromMinutes(3),
|
||||
TimeSpan.FromMinutes(3),
|
||||
ChangeDirection
|
||||
);
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Timer.StartTimer(
|
||||
TimeSpan.FromMinutes(3),
|
||||
TimeSpan.FromMinutes(3),
|
||||
ChangeDirection,
|
||||
out _timerToken
|
||||
);
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x567, 0x568));
|
||||
}
|
||||
|
||||
public UnsettlingPortraitComponent(Serial serial) : base(serial)
|
||||
else
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber => 1074480; // Unsettling portrait
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (Utility.InRange(Location, from.Location, 2))
|
||||
{
|
||||
Effects.PlaySound(Location, Map, Utility.RandomMinMax(0x567, 0x568));
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
_timerToken.Cancel();
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
Timer.StartTimer(TimeSpan.FromMinutes(3), TimeSpan.FromMinutes(3), ChangeDirection, out _timerToken);
|
||||
}
|
||||
|
||||
private void ChangeDirection()
|
||||
{
|
||||
if (ItemID == 0x2A65)
|
||||
{
|
||||
ItemID += 1;
|
||||
}
|
||||
else if (ItemID == 0x2A66)
|
||||
{
|
||||
ItemID -= 1;
|
||||
}
|
||||
else if (ItemID == 0x2A67)
|
||||
{
|
||||
ItemID += 1;
|
||||
}
|
||||
else if (ItemID == 0x2A68)
|
||||
{
|
||||
ItemID -= 1;
|
||||
}
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public class UnsettlingPortraitAddon : BaseAddon
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
[Constructible]
|
||||
public UnsettlingPortraitAddon()
|
||||
{
|
||||
AddComponent(new UnsettlingPortraitComponent(), 0, 0, 0);
|
||||
}
|
||||
base.OnAfterDelete();
|
||||
|
||||
public UnsettlingPortraitAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new UnsettlingPortraitDeed();
|
||||
|
||||
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();
|
||||
}
|
||||
_timer?.Stop();
|
||||
}
|
||||
|
||||
public class UnsettlingPortraitDeed : BaseAddonDeed
|
||||
[AfterDeserialization]
|
||||
private void AfterDeserialization()
|
||||
{
|
||||
[Constructible]
|
||||
public UnsettlingPortraitDeed() => LootType = LootType.Blessed;
|
||||
StartTimer();
|
||||
}
|
||||
|
||||
public UnsettlingPortraitDeed(Serial serial) : base(serial)
|
||||
private void ChangeDirection()
|
||||
{
|
||||
if (ItemID == 0x2A65)
|
||||
{
|
||||
ItemID += 1;
|
||||
}
|
||||
|
||||
public override BaseAddon Addon => new UnsettlingPortraitAddon();
|
||||
public override int LabelNumber => 1074480; // Unsettling portrait
|
||||
|
||||
public override void Serialize(IGenericWriter writer)
|
||||
else if (ItemID == 0x2A66)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
ItemID -= 1;
|
||||
}
|
||||
|
||||
public override void Deserialize(IGenericReader reader)
|
||||
else if (ItemID == 0x2A67)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
var version = reader.ReadEncodedInt();
|
||||
ItemID += 1;
|
||||
}
|
||||
else if (ItemID == 0x2A68)
|
||||
{
|
||||
ItemID -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class UnsettlingPortraitAddon : BaseAddon
|
||||
{
|
||||
[Constructible]
|
||||
public UnsettlingPortraitAddon()
|
||||
{
|
||||
AddComponent(new UnsettlingPortraitComponent(), 0, 0, 0);
|
||||
}
|
||||
|
||||
public override BaseAddonDeed Deed => new UnsettlingPortraitDeed();
|
||||
}
|
||||
|
||||
[SerializationGenerator(0)]
|
||||
public partial class UnsettlingPortraitDeed : BaseAddonDeed
|
||||
{
|
||||
[Constructible]
|
||||
public UnsettlingPortraitDeed() => LootType = LootType.Blessed;
|
||||
|
||||
public override BaseAddon Addon => new UnsettlingPortraitAddon();
|
||||
public override int LabelNumber => 1074480; // Unsettling portrait
|
||||
}
|
||||
|
|
|
|||
4
Projects/UOContent/Migrations/Server.Items.AwesomeDisturbingPortraitAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.AwesomeDisturbingPortraitAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.AwesomeDisturbingPortraitAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.AwesomeDisturbingPortraitComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.AwesomeDisturbingPortraitComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.AwesomeDisturbingPortraitComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.AwesomeDisturbingPortraitDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.AwesomeDisturbingPortraitDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.AwesomeDisturbingPortraitDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BedOfNailsAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BedOfNailsAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BedOfNailsAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BedOfNailsComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BedOfNailsComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BedOfNailsComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BedOfNailsDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BedOfNailsDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BedOfNailsDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BoneCouchAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BoneCouchAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BoneCouchAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BoneCouchComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BoneCouchComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BoneCouchComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BoneCouchDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BoneCouchDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BoneCouchDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BoneTableAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BoneTableAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BoneTableAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BoneTableDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BoneTableDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BoneTableDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BoneThroneAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BoneThroneAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BoneThroneAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BoneThroneComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BoneThroneComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BoneThroneComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.BoneThroneDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.BoneThroneDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.BoneThroneDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.CreepyPortraitAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.CreepyPortraitAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.CreepyPortraitAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.CreepyPortraitComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.CreepyPortraitComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.CreepyPortraitComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.CreepyPortraitDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.CreepyPortraitDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.CreepyPortraitDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.DisturbingPortraitAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.DisturbingPortraitAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.DisturbingPortraitAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.DisturbingPortraitComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.DisturbingPortraitComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.DisturbingPortraitComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.DisturbingPortraitDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.DisturbingPortraitDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.DisturbingPortraitDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.HaunterMirrorAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.HaunterMirrorAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.HaunterMirrorAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.HaunterMirrorComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.HaunterMirrorComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.HaunterMirrorComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.HaunterMirrorDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.HaunterMirrorDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.HaunterMirrorDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieBlueAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieBlueAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieBlueAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieBlueComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieBlueComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieBlueComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieBlueDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieBlueDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieBlueDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieGreenAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieGreenAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieGreenAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieGreenComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieGreenComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieGreenComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieGreenDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieGreenDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieGreenDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieLimeAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieLimeAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieLimeAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieLimeComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieLimeComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieLimeComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieLimeDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieLimeDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieLimeDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieOrangeAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieOrangeAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieOrangeAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieOrangeComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieOrangeComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieOrangeComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieOrangeDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieOrangeDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieOrangeDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieWhiteAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieWhiteAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieWhiteAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieWhiteComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieWhiteComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieWhiteComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.MountedPixieWhiteDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.MountedPixieWhiteDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.MountedPixieWhiteDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.SacrificialAltarAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SacrificialAltarAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SacrificialAltarAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.SacrificialAltarDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.SacrificialAltarDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.SacrificialAltarDeed"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.UnsettlingPortraitAddon.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.UnsettlingPortraitAddon.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.UnsettlingPortraitAddon"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.UnsettlingPortraitComponent.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.UnsettlingPortraitComponent.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.UnsettlingPortraitComponent"
|
||||
}
|
||||
4
Projects/UOContent/Migrations/Server.Items.UnsettlingPortraitDeed.v0.json
generated
Normal file
4
Projects/UOContent/Migrations/Server.Items.UnsettlingPortraitDeed.v0.json
generated
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"version": 0,
|
||||
"type": "Server.Items.UnsettlingPortraitDeed"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue