feat(net): parse realm list

This commit is contained in:
fallenoak 2023-02-10 14:56:00 -06:00
parent fc7fa1dbdc
commit 22bfe894d2
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
10 changed files with 222 additions and 3 deletions

View file

@ -1,5 +1,7 @@
#include "net/login/Login.hpp"
#include "net/login/LoginResponse.hpp"
#include <cstring>
#include <common/DataStore.hpp>
#include <storm/Memory.hpp>
#include <storm/String.hpp>
@ -17,6 +19,14 @@ bool Login::OnlineIdle() {
return true;
}
void Login::RealmListResult(CDataStore* msg) {
if (!msg || !msg->IsFinal()) {
this->m_loginResponse->HandleRealmData(4, nullptr);
} else {
this->m_loginResponse->HandleRealmData(0, msg);
}
}
void Login::SetLogonCreds(const char* accountName, const char* password) {
SStrCopy(this->m_accountName, accountName, 1280);