19 lines
439 B
C#
19 lines
439 B
C#
using System.Text;
|
|
|
|
namespace Wonderking.Packets.Incoming;
|
|
|
|
[PacketId(OperationCode.CharacterNameCheck)]
|
|
public class CharacterNameCheckPacket : IPacket
|
|
{
|
|
public required string Name { get; set; }
|
|
|
|
public void Deserialize(byte[] data)
|
|
{
|
|
Name = Encoding.ASCII.GetString(data, 0, 20).TrimEnd('\0').TrimEnd('\n').TrimEnd('\0');
|
|
}
|
|
|
|
public byte[] Serialize()
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
}
|