mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +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);
|
stream.Write<uint64_t>(0);
|
||||||
|
|
||||||
if (rejectionReason != "") stream.Write<uint32_t>(2);
|
if (rejectionReason != "") stream.Write<uint32_t>(REJECTION_STATUS_REJECTED);
|
||||||
else if (moderatorRequested == true && rejectionReason == "") stream.Write<uint32_t>(0);
|
else if (moderatorRequested == true && rejectionReason == "") stream.Write<uint32_t>(REJECTION_STATUS_PENDING);
|
||||||
else stream.Write<uint32_t>(1);
|
else stream.Write<uint32_t>(REJECTION_STATUS_APPROVED);
|
||||||
|
|
||||||
// Does this go here???
|
// Does this go here???
|
||||||
// const auto& rejectionReasonConverted = GeneralUtils::ASCIIToUTF16(rejectionReason);
|
const auto& rejectionReasonConverted = GeneralUtils::ASCIIToUTF16(rejectionReason);
|
||||||
// stream.Write(uint32_t(rejectionReasonConverted.size()));
|
stream.Write(uint32_t(rejectionReasonConverted.size()));
|
||||||
// for (uint32_t i = 0; i < rejectionReasonConverted.size(); ++i) {
|
for (uint32_t i = 0; i < rejectionReasonConverted.size(); ++i) {
|
||||||
// stream.Write(uint16_t(rejectionReasonConverted[i]));
|
stream.Write(uint16_t(rejectionReasonConverted[i]));
|
||||||
// }
|
}
|
||||||
stream.Write<uint32_t>(0);
|
|
||||||
|
// stream.Write<uint32_t>(0);
|
||||||
|
|
||||||
stream.Write<uint64_t>(0);
|
stream.Write<uint64_t>(0);
|
||||||
|
|
||||||
|
@ -40,5 +40,11 @@ namespace GameMessages
|
|||||||
char PrivacyOption = 0;
|
char PrivacyOption = 0;
|
||||||
float MaxBuildHeight = 128.0f;
|
float MaxBuildHeight = 128.0f;
|
||||||
std::vector<NiPoint3> Paths = {};
|
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