continuity/Wonderking/Packets/Outgoing/CharacterNameCheckPacketResponse.cs

20 lines
464 B
C#
Raw Normal View History

namespace Wonderking.Packets.Outgoing;
[PacketId(OperationCode.CharacterNameCheckResponse)]
public class CharacterNameCheckPacketResponse : IPacket
{
public required bool IsTaken { get; set; }
public void Deserialize(byte[] data)
{
throw new NotSupportedException();
}
public byte[] Serialize()
{
Span<byte> data = stackalloc byte[1];
2023-11-19 16:07:28 +00:00
data[0] = IsTaken ? (byte)1 : (byte)0;
return data.ToArray();
}
}