feat(net): implement GruntLogin::Reconnect

This commit is contained in:
fallenoak committed 2025-09-30 16:26:20 -05:00
1 parent eccd46684f
commit f97bf4a876
3 files changed
+8 -6

No files matched your search

+4 -4
View File
@@ -510,7 +510,7 @@ int32_t Grunt::ClientLink::CmdXferInitiate(CDataStore& msg) {
return 0;
}
void Grunt::ClientLink::Connect(const char* a2) {
void Grunt::ClientLink::Connect(const char* loginServer) {
if (this->m_state) {
return;
}
@@ -523,11 +523,11 @@ void Grunt::ClientLink::Connect(const char* a2) {
this->m_connection = connection;
this->m_connection->SetType(WOWC_TYPE_STREAM);
auto port = SStrChr(a2, ':');
auto port = SStrChr(loginServer, ':');
if (port) {
this->m_connection->Connect(a2, 5000);
this->m_connection->Connect(loginServer, 5000);
} else {
this->m_connection->Connect(a2, 3724, 5000);
this->m_connection->Connect(loginServer, 3724, 5000);
}
}
+1 -1
View File
@@ -79,7 +79,7 @@ class Grunt::ClientLink : public WowConnectionResponse, Grunt::Pending, Grunt::T
int32_t CmdRealmList(CDataStore& msg);
int32_t CmdXferData(CDataStore& msg);
int32_t CmdXferInitiate(CDataStore& msg);
void Connect(const char* a2);
void Connect(const char* loginServer);
void Disconnect();
void GetRealmList();
void LogonNewSession(const Logon& logon);
+3 -1
View File
@@ -291,7 +291,9 @@ void GruntLogin::ProveVersion(const uint8_t* versionChecksum) {
}
void GruntLogin::Reconnect() {
// TODO
this->m_reconnect = true;
this->m_clientLink->Connect(this->m_loginResponse->GetLoginServer());
}
void GruntLogin::ReconnectResult(Grunt::Result result, const uint8_t* sessionKey, uint32_t sessionKeyLen, uint16_t flags) {