continuity/Wonderking/Packets/Incoming/CharacterNameCheckPacket.cs

17 lines
479 B
C#

// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
using System.Text;
using Rai.PacketMediator;
namespace Wonderking.Packets.Incoming;
[WonderkingPacketId(OperationCode.CharacterNameCheck)]
public class CharacterNameCheckPacket : IIncomingPacket
{
public required string Name { get; set; }
public void Deserialize(byte[] data)
{
Name = Encoding.ASCII.GetString(data, 0, 20).TrimEnd('\0').TrimEnd('\n').TrimEnd('\0');
}
}