DarkflameServer/dGame/dGameMessages/PropertySelectQueryProperty.cpp
David Markowitz ec501831e6
fix: Remove database requirements for Property Entrance Component and greatly simplify logic (#1650)
* remove complex queries and move logic to dDatabase

remove unused code

Use correct id

fix arrows

use correct parameter

fix queries

Update Property.cpp

remove unused header

remove extra include

* fix tests

* Update dGame/dComponents/PropertyEntranceComponent.h

Co-authored-by: jadebenn <jadebenn@users.noreply.github.com>

* Update dGame/User.h

Co-authored-by: jadebenn <jadebenn@users.noreply.github.com>

---------

Co-authored-by: jadebenn <jadebenn@users.noreply.github.com>
2024-11-23 15:56:31 -06:00

39 lines
1.1 KiB
C++

#include "PropertySelectQueryProperty.h"
void PropertySelectQueryProperty::Serialize(RakNet::BitStream& stream) const {
stream.Write(CloneId);
const auto& owner = GeneralUtils::UTF8ToUTF16(OwnerName);
stream.Write<uint32_t>(owner.size());
for (uint32_t i = 0; i < owner.size(); ++i) {
stream.Write<uint16_t>(owner[i]);
}
const auto& name = GeneralUtils::UTF8ToUTF16(Name);
stream.Write<uint32_t>(name.size());
for (uint32_t i = 0; i < name.size(); ++i) {
stream.Write<uint16_t>(name[i]);
}
const auto& description = GeneralUtils::UTF8ToUTF16(Description);
stream.Write<uint32_t>(description.size());
for (uint32_t i = 0; i < description.size(); ++i) {
stream.Write<uint16_t>(description[i]);
}
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);
}
void PropertySelectQueryProperty::Deserialize(RakNet::BitStream& stream) const {
// Do we need this?
// no
}