feat(client): implement more of ClientServices::Logon

This commit is contained in:
fallenoak committed 2025-09-30 16:21:36 -05:00
1 parent 8f992159f2
commit eccd46684f
6 files changed
+32 -9

No files matched your search

+22 -3
View File
@@ -52,6 +52,18 @@ ClientConnection* ClientServices::Connection() {
return ClientServices::s_currentConnection;
}
const char* ClientServices::GetCurrentLoginPortal() {
return ClientServices::s_loginObj->GetLoginServerType() == 1
? ClientServices::s_darkPortalVar->GetString()
: "";
}
const char* ClientServices::GetCurrentLoginServer() {
return ClientServices::s_loginObj->GetLoginServerType() == 1
? ClientServices::s_realmListBNVar->GetString()
: ClientServices::s_realmListVar->GetString();
}
ClientServices* ClientServices::GetInstance() {
if (ClientServices::s_instance) {
return ClientServices::s_instance;
@@ -237,9 +249,10 @@ void ClientServices::Logon(const char* accountName, const char* password) {
ClientServices::s_loginObj->SetLogonCreds(accountName, password);
// TODO
ClientServices::s_loginObj->Logon(nullptr, nullptr);
ClientServices::s_loginObj->Logon(
ClientServices::GetCurrentLoginServer(),
ClientServices::GetCurrentLoginPortal()
);
}
void ClientServices::SelectRealm(const char* realmName) {
@@ -281,6 +294,12 @@ int32_t ClientServices::SetSelectedRealmInfo(int32_t a1) {
return 0;
}
const char* ClientServices::GetLoginServer() {
return ClientServices::s_loginObj->GetLoginServerType() == 1
? ClientServices::s_realmListBNVar->GetString()
: ClientServices::s_realmListVar->GetString();
}
int32_t ClientServices::GetLoginServerType() {
if (!ClientServices::LoginConnection()) {
return 0;