2023-11-21 21:37:50 +01:00
|
|
|
// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
|
2023-11-20 19:58:30 +01:00
|
|
|
|
2023-11-15 20:00:08 +01:00
|
|
|
using System.Text;
|
2024-02-04 19:52:45 +01:00
|
|
|
using Rai.PacketMediator;
|
2023-11-15 20:00:08 +01:00
|
|
|
|
|
|
|
namespace Wonderking.Packets.Incoming;
|
|
|
|
|
2024-02-04 19:52:45 +01:00
|
|
|
[WonderkingPacketId(OperationCode.CharacterNameCheck)]
|
|
|
|
public class CharacterNameCheckPacket : IIncomingPacket
|
2023-11-15 20:00:08 +01:00
|
|
|
{
|
|
|
|
public required string Name { get; set; }
|
|
|
|
|
|
|
|
public void Deserialize(byte[] data)
|
|
|
|
{
|
2023-11-16 12:48:33 +01:00
|
|
|
Name = Encoding.ASCII.GetString(data, 0, 20).TrimEnd('\0').TrimEnd('\n').TrimEnd('\0');
|
2023-11-15 20:00:08 +01:00
|
|
|
}
|
|
|
|
}
|