mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 17:58:20 +00:00
chore: Change AuthServer to use BitStream references (#1475)
This commit is contained in:
parent
95d687846a
commit
5c1ed332c4
@ -28,10 +28,10 @@ namespace {
|
|||||||
std::vector<uint32_t> claimCodes;
|
std::vector<uint32_t> claimCodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Stamp::Serialize(RakNet::BitStream* outBitStream){
|
void Stamp::Serialize(RakNet::BitStream& outBitStream){
|
||||||
outBitStream->Write(type);
|
outBitStream.Write(type);
|
||||||
outBitStream->Write(value);
|
outBitStream.Write(value);
|
||||||
outBitStream->Write(timestamp);
|
outBitStream.Write(timestamp);
|
||||||
};
|
};
|
||||||
|
|
||||||
void AuthPackets::LoadClaimCodes() {
|
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);
|
stamps.emplace_back(eStamps::PASSPORT_AUTH_WORLD_COMMUNICATION_FINISH, 1);
|
||||||
|
|
||||||
loginResponse.Write<uint32_t>((sizeof(Stamp) * stamps.size()) + sizeof(uint32_t));
|
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);
|
server->Send(&loginResponse, sysAddr, false);
|
||||||
//Inform the master server that we've created a session for this user:
|
//Inform the master server that we've created a session for this user:
|
||||||
|
@ -63,7 +63,7 @@ struct Stamp {
|
|||||||
this->timestamp = timestamp;
|
this->timestamp = timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Serialize(RakNet::BitStream* outBitStream);
|
void Serialize(RakNet::BitStream& outBitStream);
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class ClientOS : uint8_t {
|
enum class ClientOS : uint8_t {
|
||||||
|
Loading…
Reference in New Issue
Block a user