mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(client): extern g_clientConnection
This commit is contained in:
parent
02961c3511
commit
55ceac09a8
@ -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;
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user