2021-11-29 18:09:12 +00:00
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
|
|
|
|
namespace Shared.Packet.Packets;
|
2021-11-29 04:04:34 +00:00
|
|
|
|
|
|
|
|
|
[Packet(PacketType.Shine)]
|
|
|
|
|
public struct ShinePacket : IPacket {
|
|
|
|
|
public int ShineId;
|
2022-02-08 16:15:31 +00:00
|
|
|
|
public bool IsGrand;
|
2021-11-29 18:09:12 +00:00
|
|
|
|
public void Serialize(Span<byte> data) {
|
|
|
|
|
MemoryMarshal.Write(data, ref ShineId);
|
2022-02-08 16:15:31 +00:00
|
|
|
|
MemoryMarshal.Write(data, ref IsGrand);
|
2021-11-29 18:09:12 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Deserialize(Span<byte> data) {
|
|
|
|
|
ShineId = MemoryMarshal.Read<int>(data);
|
2022-02-08 16:15:31 +00:00
|
|
|
|
IsGrand = MemoryMarshal.Read<bool>(data);
|
2021-11-29 18:09:12 +00:00
|
|
|
|
}
|
2021-11-29 04:04:34 +00:00
|
|
|
|
}
|