0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-18 17:25:14 +00:00
SmoOnlineServer/Shared/Packet/Packets/ShinePacket.cs

18 lines
406 B
C#
Raw Normal View History

using System.Runtime.InteropServices;
2022-02-10 01:44:50 +00:00
namespace Shared.Packet.Packets;
2021-11-29 04:04:34 +00:00
[Packet(PacketType.Shine)]
public struct ShinePacket : IPacket {
public int ShineId;
2022-02-10 01:44:50 +00:00
public short Size => 4;
public void Serialize(Span<byte> data) {
MemoryMarshal.Write(data, ref ShineId);
}
public void Deserialize(ReadOnlySpan<byte> data) {
ShineId = MemoryMarshal.Read<int>(data);
}
2021-11-29 04:04:34 +00:00
}