using System.Runtime.InteropServices; namespace Shared.Packet.Packets; [Packet(PacketType.Shine)] public struct ShinePacket : IPacket { public int ShineId; public short Size => 4; public void Serialize(Span data) { MemoryMarshal.Write(data, ref ShineId); } public void Deserialize(ReadOnlySpan data) { ShineId = MemoryMarshal.Read(data); } }