0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-15 16:15:06 +00:00
SmoOnlineServer/Shared/Packet/Packets/ShinePacket.cs
2022-02-08 10:15:31 -06:00

18 lines
No EOL
492 B
C#

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