continuity/Wonderking/Packets/Outgoing/CharacterNameCheckPacketResponse.cs

19 lines
481 B
C#
Raw Normal View History

2024-02-07 15:40:36 +00:00
// Licensed to Timothy Schenk under the GNU AGPL Version 3 License.
2023-11-20 18:58:30 +00:00
using Rai.PacketMediator;
namespace Wonderking.Packets.Outgoing;
[WonderkingPacketId(OperationCode.CharacterNameCheckResponse)]
public class CharacterNameCheckPacketResponse : IOutgoingPacket
{
public required bool IsTaken { get; set; }
2024-02-07 15:40:36 +00:00
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();
}
}