fix: Finishes code gen for misc items (#1248)

This commit is contained in:
Kamron Batman 2022-11-13 23:10:13 -08:00 • committed by GitHub
parent 6d00b2caa9
commit 5660f4636e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 2797 additions and 3156 deletions

View file

@ -1,59 +1,40 @@
using ModernUO.Serialization;
using Server.Network;
namespace Server.Items
namespace Server.Items;
[Flippable(0xE41, 0xE40)]
[SerializationGenerator(0, false)]
public partial class TrashChest : Container
{
[Flippable(0xE41, 0xE40)]
public class TrashChest : Container
[Constructible]
public TrashChest() : base(0xE41) => Movable = false;
public override int DefaultMaxWeight => 0; // A value of 0 signals unlimited weight
public override bool IsDecoContainer => false;
public override bool OnDragDrop(Mobile from, Item dropped)
{
[Constructible]
public TrashChest() : base(0xE41) => Movable = false;
public TrashChest(Serial serial) : base(serial)
if (base.OnDragDrop(from, dropped))
{
}
public override int DefaultMaxWeight => 0; // A value of 0 signals unlimited weight
public override bool IsDecoContainer => 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();
}
public override bool OnDragDrop(Mobile from, Item dropped)
{
if (!base.OnDragDrop(from, dropped))
{
return false;
}
PublicOverheadMessage(MessageType.Regular, 0x3B2, Utility.Random(1042891, 8));
dropped.Delete();
return true;
}
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
{
if (!base.OnDragDropInto(from, item, p))
{
return false;
}
return false;
}
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
{
if (base.OnDragDropInto(from, item, p))
{
PublicOverheadMessage(MessageType.Regular, 0x3B2, Utility.Random(1042891, 8));
item.Delete();
return true;
}
return false;
}
}