diff --git a/dGame/dGameMessages/PropertyDataMessage.cpp b/dGame/dGameMessages/PropertyDataMessage.cpp index 9a261a65..d763399d 100644 --- a/dGame/dGameMessages/PropertyDataMessage.cpp +++ b/dGame/dGameMessages/PropertyDataMessage.cpp @@ -64,17 +64,18 @@ void GameMessages::PropertyDataMessage::Serialize(RakNet::BitStream& stream) con stream.Write(0); - if (rejectionReason != "") stream.Write(2); - else if (moderatorRequested == true && rejectionReason == "") stream.Write(0); - else stream.Write(1); + if (rejectionReason != "") stream.Write(REJECTION_STATUS_REJECTED); + else if (moderatorRequested == true && rejectionReason == "") stream.Write(REJECTION_STATUS_PENDING); + else stream.Write(REJECTION_STATUS_APPROVED); // Does this go here??? - // const auto& rejectionReasonConverted = GeneralUtils::ASCIIToUTF16(rejectionReason); - // stream.Write(uint32_t(rejectionReasonConverted.size())); - // for (uint32_t i = 0; i < rejectionReasonConverted.size(); ++i) { - // stream.Write(uint16_t(rejectionReasonConverted[i])); - // } - stream.Write(0); + const auto& rejectionReasonConverted = GeneralUtils::ASCIIToUTF16(rejectionReason); + stream.Write(uint32_t(rejectionReasonConverted.size())); + for (uint32_t i = 0; i < rejectionReasonConverted.size(); ++i) { + stream.Write(uint16_t(rejectionReasonConverted[i])); + } + + // stream.Write(0); stream.Write(0); diff --git a/dGame/dGameMessages/PropertyDataMessage.h b/dGame/dGameMessages/PropertyDataMessage.h index a85702c4..5b5d7d0f 100644 --- a/dGame/dGameMessages/PropertyDataMessage.h +++ b/dGame/dGameMessages/PropertyDataMessage.h @@ -40,5 +40,11 @@ namespace GameMessages char PrivacyOption = 0; float MaxBuildHeight = 128.0f; std::vector Paths = {}; + private: + enum RejectionStatus : uint32_t { + REJECTION_STATUS_APPROVED = 0, + REJECTION_STATUS_PENDING = 1, + REJECTION_STATUS_REJECTED = 2 + }; }; } \ No newline at end of file