mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-10 02:08:20 +00:00
Added enum for rejection statuses
This commit is contained in:
parent
04852ac1d9
commit
0bf2f0e92a
@ -64,17 +64,18 @@ void GameMessages::PropertyDataMessage::Serialize(RakNet::BitStream& stream) con
|
||||
|
||||
stream.Write<uint64_t>(0);
|
||||
|
||||
if (rejectionReason != "") stream.Write<uint32_t>(2);
|
||||
else if (moderatorRequested == true && rejectionReason == "") stream.Write<uint32_t>(0);
|
||||
else stream.Write<uint32_t>(1);
|
||||
if (rejectionReason != "") stream.Write<uint32_t>(REJECTION_STATUS_REJECTED);
|
||||
else if (moderatorRequested == true && rejectionReason == "") stream.Write<uint32_t>(REJECTION_STATUS_PENDING);
|
||||
else stream.Write<uint32_t>(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<uint32_t>(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<uint32_t>(0);
|
||||
|
||||
stream.Write<uint64_t>(0);
|
||||
|
||||
|
@ -40,5 +40,11 @@ namespace GameMessages
|
||||
char PrivacyOption = 0;
|
||||
float MaxBuildHeight = 128.0f;
|
||||
std::vector<NiPoint3> Paths = {};
|
||||
private:
|
||||
enum RejectionStatus : uint32_t {
|
||||
REJECTION_STATUS_APPROVED = 0,
|
||||
REJECTION_STATUS_PENDING = 1,
|
||||
REJECTION_STATUS_REJECTED = 2
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user