fix: Codegens special systems (#1537)

This commit is contained in:
Kamron Batman 2023-10-09 22:06:09 -07:00 • committed by GitHub
parent e1f22d9694
commit 0086d674e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 366 additions and 537 deletions

View file

@ -1,42 +1,26 @@
namespace Server.Items
using ModernUO.Serialization;
namespace Server.Items;
[SerializationGenerator(0, false)]
public partial class SmithStone : Item
{
public class SmithStone : Item
[Constructible]
public SmithStone() : base(0xED4)
{
[Constructible]
public SmithStone() : base(0xED4)
Movable = false;
Hue = 0x476;
}
public override string DefaultName => "a Blacksmith Supply Stone";
public override void OnDoubleClick(Mobile from)
{
var SmithBag = new SmithBag();
if (!from.AddToBackpack(SmithBag))
{
Movable = false;
Hue = 0x476;
}
public SmithStone(Serial serial) : base(serial)
{
}
public override string DefaultName => "a Blacksmith Supply Stone";
public override void OnDoubleClick(Mobile from)
{
var SmithBag = new SmithBag();
if (!from.AddToBackpack(SmithBag))
{
SmithBag.Delete();
}
}
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();
SmithBag.Delete();
}
}
}