2024-02-07 16:40:36 +01:00
|
|
|
// Licensed to Timothy Schenk under the GNU AGPL Version 3 License.
|
2023-11-20 19:58:30 +01:00
|
|
|
|
2024-04-04 16:57:42 +02:00
|
|
|
using RaiNote.PacketMediator;
|
2024-02-04 19:52:45 +01:00
|
|
|
|
2023-11-15 20:00:08 +01:00
|
|
|
namespace Wonderking.Packets.Outgoing;
|
|
|
|
|
2024-02-04 19:52:45 +01:00
|
|
|
[WonderkingPacketId(OperationCode.CharacterNameCheckResponse)]
|
|
|
|
public class CharacterNameCheckPacketResponse : IOutgoingPacket
|
2023-11-15 20:00:08 +01:00
|
|
|
{
|
|
|
|
public required bool IsTaken { get; set; }
|
2024-02-07 16:40:36 +01:00
|
|
|
|
2023-11-15 20:00:08 +01:00
|
|
|
public byte[] Serialize()
|
|
|
|
{
|
|
|
|
Span<byte> data = stackalloc byte[1];
|
2023-11-19 17:07:28 +01:00
|
|
|
data[0] = IsTaken ? (byte)1 : (byte)0;
|
2023-11-15 20:00:08 +01:00
|
|
|
return data.ToArray();
|
|
|
|
}
|
|
|
|
}
|