using System; using Server.Gumps; using Server.Misc; using Server.Network; namespace Server.Items { public class NameChangeDeed : Item { public override string DefaultName => "a name change deed"; [Constructible] public NameChangeDeed() : base( 0x14F0 ) { LootType = LootType.Blessed; } public NameChangeDeed( Serial serial ) : base( serial ) { } public override void Serialize( GenericWriter writer ) { base.Serialize( writer ); writer.Write( (int) 0 ); // version } public override void Deserialize( GenericReader reader ) { base.Deserialize( reader ); int version = reader.ReadInt(); } public override void OnDoubleClick( Mobile from ) { if ( RootParent == from ) { from.CloseGump( typeof( NameChangeDeedGump ) ); from.SendGump( new NameChangeDeedGump( this ) ); } else from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it. } } public class NameChangeDeedGump : Gump { Item m_Sender; public void AddBlackAlpha( int x, int y, int width, int height ) { AddImageTiled( x, y, width, height, 2624 ); AddAlphaRegion( x, y, width, height ); } public void AddTextField( int x, int y, int width, int height, int index ) { AddBackground( x - 2, y - 2, width + 4, height + 4, 0x2486 ); AddTextEntry( x + 2, y + 2, width - 4, height - 4, 0, index, "" ); } public string Center( string text ) { return $"