continuity/Wonderking/Packets/Outgoing/CharacterNameCheckPacketResponse.cs

24 lines
591 B
C#
Raw Normal View History

2023-11-21 20:37:50 +00:00
// Copyright (c) 2023 Timothy Schenk. Subject to 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; }
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();
}
}