continuity/Wonderking/Packets/Incoming/CharacterNameCheckPacket.cs

22 lines
521 B
C#
Raw Permalink Normal View History

2023-11-21 20:37:50 +00:00
// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
2023-11-20 18:58:30 +00:00
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();
}
}