mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-13 00:20:54 +01:00
19 lines
595 B
C++
19 lines
595 B
C++
|
|
#include <Messages/NotifyInventoryChanges.h>
|
||
|
|
#include <TiltedCore/Serialization.hpp>
|
||
|
|
|
||
|
|
void NotifyInventoryChanges::SerializeRaw(TiltedPhoques::Buffer::Writer& aWriter) const noexcept
|
||
|
|
{
|
||
|
|
Serialization::WriteVarInt(aWriter, ServerId);
|
||
|
|
Item.Serialize(aWriter);
|
||
|
|
Serialization::WriteBool(aWriter, Drop);
|
||
|
|
}
|
||
|
|
|
||
|
|
void NotifyInventoryChanges::DeserializeRaw(TiltedPhoques::Buffer::Reader& aReader) noexcept
|
||
|
|
{
|
||
|
|
ServerMessage::DeserializeRaw(aReader);
|
||
|
|
|
||
|
|
ServerId = Serialization::ReadVarInt(aReader) & 0xFFFFFFFF;
|
||
|
|
Item.Deserialize(aReader);
|
||
|
|
Drop = Serialization::ReadBool(aReader);
|
||
|
|
}
|