mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-05 06:09:55 +03:00
feat(client): implement more of ClientServices::Logon
This commit is contained in:
6 files changed
+32
-9
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user