continuity/Wonderking/Packets/Outgoing/CharacterNameCheckPacketResponse.cs

17 lines
493 B
C#

// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
using Rai.PacketMediator;
namespace Wonderking.Packets.Outgoing;
[WonderkingPacketId(OperationCode.CharacterNameCheckResponse)]
public class CharacterNameCheckPacketResponse : IOutgoingPacket
{
public required bool IsTaken { get; set; }
public byte[] Serialize()
{
Span<byte> data = stackalloc byte[1];
data[0] = IsTaken ? (byte)1 : (byte)0;
return data.ToArray();
}
}