feat(net): request realm list after successful auth

This commit is contained in:
fallenoak 2023-02-09 22:41:10 -06:00
parent 18a4c5530d
commit b0b6bc5e52
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
3 changed files with 20 additions and 1 deletions

View File

@ -327,6 +327,24 @@ void Grunt::ClientLink::Disconnect() {
this->m_critSect.Leave();
}
void Grunt::ClientLink::GetRealmList() {
if (this->m_state != 6) {
return;
}
CDataStoreCache<1024> realmListCmd;
uint8_t opcode = CMD_REALM_LIST;
realmListCmd.Put(opcode);
uint32_t padding = 0;
realmListCmd.Put(padding);
realmListCmd.Finalize();
this->Send(realmListCmd);
}
void Grunt::ClientLink::LogonNewSession(const Grunt::ClientLink::Logon& logon) {
this->SetState(3);

View File

@ -69,6 +69,7 @@ class Grunt::ClientLink : public WowConnectionResponse, Grunt::Pending, Grunt::T
int32_t CmdXferInitiate(CDataStore& msg);
void Connect(const char* a2);
void Disconnect();
void GetRealmList();
void LogonNewSession(const Logon& logon);
void PackLogon(CDataStore& msg, const Logon& logon);
void ProveVersion(const uint8_t* versionChecksum);

View File

@ -79,7 +79,7 @@ void GruntLogin::GetLogonMethod() {
}
void GruntLogin::GetRealmList() {
// TODO
this->m_clientLink->GetRealmList();
}
int32_t GruntLogin::GetServerId() {