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,53 +1,36 @@
using ModernUO.Serialization;
using Server.Gumps;
namespace Server.Items
namespace Server.Items;
[SerializationGenerator(0, false)]
public partial class ResGate : Item
{
public class ResGate : Item
[Constructible]
public ResGate() : base(0xF6C)
{
[Constructible]
public ResGate() : base(0xF6C)
Movable = false;
Hue = 0x2D1;
Light = LightType.Circle300;
}
public override string DefaultName => "a resurrection gate";
public override bool OnMoveOver(Mobile m)
{
if (!m.Alive && m.Map?.CanFit(m.Location, 16, false, false) == true)
{
Movable = false;
Hue = 0x2D1;
Light = LightType.Circle300;
m.PlaySound(0x214);
m.FixedEffect(0x376A, 10, 16);
m.CloseGump<ResurrectGump>();
m.SendGump(new ResurrectGump(m));
}
else
{
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
}
public ResGate(Serial serial) : base(serial)
{
}
public override string DefaultName => "a resurrection gate";
public override bool OnMoveOver(Mobile m)
{
if (!m.Alive && m.Map?.CanFit(m.Location, 16, false, false) == true)
{
m.PlaySound(0x214);
m.FixedEffect(0x376A, 10, 16);
m.CloseGump<ResurrectGump>();
m.SendGump(new ResurrectGump(m));
}
else
{
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
}
return false;
}
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();
}
return false;
}
}