Replace the usage of RakString (#648)

This commit is contained in:
Jett
2022-07-17 04:40:46 +01:00
committed by GitHub
parent 9287e5bc4b
commit 77d35019cc
7 changed files with 91 additions and 48 deletions

View File

@@ -43,8 +43,10 @@ void MasterPackets::SendZoneCreatePrivate(dServer* server, uint32_t zoneID, uint
bitStream.Write(zoneID);
bitStream.Write(cloneID);
RakNet::RakString passwd(password.c_str());
bitStream.Write(passwd);
bitStream.Write<uint32_t>(password.size());
for (auto character : password) {
bitStream.Write<char>(character);
}
server->SendToMaster(&bitStream);
}
@@ -56,8 +58,10 @@ void MasterPackets::SendZoneRequestPrivate(dServer* server, uint64_t requestID,
bitStream.Write(requestID);
bitStream.Write(static_cast<uint8_t>(mythranShift));
RakNet::RakString passwd(password.c_str());
bitStream.Write(passwd);
bitStream.Write<uint32_t>(password.size());
for (auto character : password) {
bitStream.Write<char>(character);
}
server->SendToMaster(&bitStream);
}