feat(client): extern g_clientConnection

This commit is contained in:
fallenoak 2026-01-05 22:49:16 -06:00
parent 02961c3511
commit 55ceac09a8
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 4 additions and 7 deletions

View File

@ -232,13 +232,8 @@ const REALM_INFO* ClientServices::GetSelectedRealm() {
void ClientServices::Initialize() { void ClientServices::Initialize() {
if (!g_clientConnection) { if (!g_clientConnection) {
auto adapterMem = SMemAlloc(sizeof(ClientRealmResponseAdapter), __FILE__, __LINE__, 0x0); ClientServices::s_clientRealmResponse = STORM_NEW(ClientRealmResponseAdapter);
auto clientRealmResponse = new (adapterMem) ClientRealmResponseAdapter(); g_clientConnection = STORM_NEW(ClientConnection)(ClientServices::s_clientRealmResponse);
ClientServices::s_clientRealmResponse = clientRealmResponse;
auto connectionMem = SMemAlloc(sizeof(ClientConnection), __FILE__, __LINE__, 0x0);
auto clientConnection = new (connectionMem) ClientConnection(ClientServices::s_clientRealmResponse);
g_clientConnection = clientConnection;
} }
ClientServices::s_currentConnection = g_clientConnection; ClientServices::s_currentConnection = g_clientConnection;

View File

@ -9,6 +9,8 @@ class CVar;
class Login; class Login;
class RealmResponse; class RealmResponse;
extern ClientConnection* g_clientConnection;
class ClientServices : public LoginResponse { class ClientServices : public LoginResponse {
public: public:
// Static variables // Static variables