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 AlchemyStone : Item
{
public class AlchemyStone : Item
[Constructible]
public AlchemyStone() : base(0xED4)
{
[Constructible]
public AlchemyStone() : base(0xED4)
Movable = false;
Hue = 0x250;
}
public override string DefaultName => "an Alchemist Supply Stone";
public override void OnDoubleClick(Mobile from)
{
var alcBag = new AlchemyBag();
if (!from.AddToBackpack(alcBag))
{
Movable = false;
Hue = 0x250;
}
public AlchemyStone(Serial serial) : base(serial)
{
}
public override string DefaultName => "an Alchemist Supply Stone";
public override void OnDoubleClick(Mobile from)
{
var alcBag = new AlchemyBag();
if (!from.AddToBackpack(alcBag))
{
alcBag.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();
alcBag.Delete();
}
}
}