fix: Source generates map item serialization (#1166)

This commit is contained in:
Kamron Batman 2022-09-07 01:13:20 -07:00 • committed by GitHub
parent b5a06d0545
commit b44c69bcee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 1517 additions and 1636 deletions

View file

@ -1,43 +1,17 @@
namespace Server.Items
using ModernUO.Serialization;
namespace Server.Items;
[SerializationGenerator(0)]
public partial class IndecipherableMap : MapItem
{
public class IndecipherableMap : MapItem
[Constructible]
public IndecipherableMap() => Hue = Utility.RandomDouble() < 0.2 ? 0x965 : 0x961;
public override int LabelNumber => 1070799; // indecipherable map
public override void OnDoubleClick(Mobile from)
{
[Constructible]
public IndecipherableMap()
{
if (Utility.RandomDouble() < 0.2)
{
Hue = 0x965;
}
else
{
Hue = 0x961;
}
}
public IndecipherableMap(Serial serial) : base(serial)
{
}
public override int LabelNumber => 1070799; // indecipherable map
public override void OnDoubleClick(Mobile from)
{
from.SendLocalizedMessage(1070801); // You cannot decipher this ruined map.
}
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.SendLocalizedMessage(1070801); // You cannot decipher this ruined map.
}
}