chore: Change AuthServer to use BitStream references (#1475)

This commit is contained in:
jadebenn 2024-02-26 08:06:02 -06:00 committed by GitHub
parent 95d687846a
commit 5c1ed332c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 6 deletions

View File

@ -28,10 +28,10 @@ namespace {
std::vector<uint32_t> claimCodes;
}
void Stamp::Serialize(RakNet::BitStream* outBitStream){
outBitStream->Write(type);
outBitStream->Write(value);
outBitStream->Write(timestamp);
void Stamp::Serialize(RakNet::BitStream& outBitStream){
outBitStream.Write(type);
outBitStream.Write(value);
outBitStream.Write(timestamp);
};
void AuthPackets::LoadClaimCodes() {
@ -291,7 +291,7 @@ void AuthPackets::SendLoginResponse(dServer* server, const SystemAddress& sysAdd
stamps.emplace_back(eStamps::PASSPORT_AUTH_WORLD_COMMUNICATION_FINISH, 1);
loginResponse.Write<uint32_t>((sizeof(Stamp) * stamps.size()) + sizeof(uint32_t));
for (auto& stamp : stamps) stamp.Serialize(&loginResponse);
for (auto& stamp : stamps) stamp.Serialize(loginResponse);
server->Send(&loginResponse, sysAddr, false);
//Inform the master server that we've created a session for this user:

View File

@ -63,7 +63,7 @@ struct Stamp {
this->timestamp = timestamp;
}
void Serialize(RakNet::BitStream* outBitStream);
void Serialize(RakNet::BitStream& outBitStream);
};
enum class ClientOS : uint8_t {