feat(glue): make character selection screen available

This commit is contained in:
VDm 2025-03-29 23:31:27 +04:00
parent b9b070830f
commit 31f4103f12
7 changed files with 205 additions and 20 deletions

View file

@ -2,6 +2,7 @@
#include "net/Login.hpp"
#include "client/ClientServices.hpp"
#include "ui/FrameScript.hpp"
#include <storm/Error.hpp>
const char* s_errorCodeTokens[] = {
"RESPONSE_SUCCESS",
@ -110,6 +111,13 @@ const char* s_errorCodeTokens[] = {
"CHAR_NAME_DECLENSION_DOESNT_MATCH_BASE_NAME",
};
void ClientConnection::AccountLogin(const char* name, const char* password, int32_t region, int32_t locale) {
STORM_ASSERT(this->m_statusComplete == 1);
STORM_ASSERT(name);
STORM_ASSERT(password);
this->Initiate(COP_AUTHENTICATE, 11, nullptr);
}
void ClientConnection::AccountLogin_Finish(int32_t errorCode) {
this->Complete(errorCode == 12, errorCode);
}

View file

@ -23,6 +23,7 @@ class ClientConnection : public RealmConnection {
ClientConnection(RealmResponse* realmResponse)
: RealmConnection(realmResponse)
{};
void AccountLogin(const char* name, const char* password, int32_t region, int32_t locale);
void AccountLogin_Finish(int32_t authResult);
void AccountLogin_Queued();
void Cancel(int32_t errorCode);