2021-12-05 17:54:36 +00:00
|
|
|
#include "PropertySelectQueryProperty.h"
|
|
|
|
|
|
|
|
void PropertySelectQueryProperty::Serialize(RakNet::BitStream& stream) const {
|
|
|
|
stream.Write(CloneId);
|
|
|
|
|
2022-08-02 13:56:20 +00:00
|
|
|
const auto& owner = GeneralUtils::UTF8ToUTF16(OwnerName);
|
2023-12-28 04:18:20 +00:00
|
|
|
stream.Write<uint32_t>(owner.size());
|
2021-12-05 17:54:36 +00:00
|
|
|
for (uint32_t i = 0; i < owner.size(); ++i) {
|
2023-12-28 04:18:20 +00:00
|
|
|
stream.Write<uint16_t>(owner[i]);
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|
|
|
|
|
2022-08-02 13:56:20 +00:00
|
|
|
const auto& name = GeneralUtils::UTF8ToUTF16(Name);
|
2023-12-28 04:18:20 +00:00
|
|
|
stream.Write<uint32_t>(name.size());
|
2021-12-05 17:54:36 +00:00
|
|
|
for (uint32_t i = 0; i < name.size(); ++i) {
|
2023-12-28 04:18:20 +00:00
|
|
|
stream.Write<uint16_t>(name[i]);
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|
|
|
|
|
2022-08-02 13:56:20 +00:00
|
|
|
const auto& description = GeneralUtils::UTF8ToUTF16(Description);
|
2023-12-28 04:18:20 +00:00
|
|
|
stream.Write<uint32_t>(description.size());
|
2021-12-05 17:54:36 +00:00
|
|
|
for (uint32_t i = 0; i < description.size(); ++i) {
|
2023-12-28 04:18:20 +00:00
|
|
|
stream.Write<uint16_t>(description[i]);
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|
|
|
|
|
2022-03-30 02:47:15 +00:00
|
|
|
stream.Write(Reputation);
|
|
|
|
stream.Write(IsBestFriend);
|
|
|
|
stream.Write(IsFriend);
|
|
|
|
stream.Write(IsModeratorApproved);
|
|
|
|
stream.Write(IsAlt);
|
|
|
|
stream.Write(IsOwned);
|
|
|
|
stream.Write(AccessType);
|
|
|
|
stream.Write(DateLastPublished);
|
|
|
|
stream.Write(PerformanceCost);
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void PropertySelectQueryProperty::Deserialize(RakNet::BitStream& stream) const {
|
|
|
|
// Do we need this?
|
2024-11-17 22:18:57 +00:00
|
|
|
// no
|
2021-12-05 17:54:36 +00:00
|
|
|
}
|