mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 16:22:45 +03:00
feat(glue): add presumed inlined CGlueMgr::SetIdleState
This commit is contained in:
parent
1fd4891efe
commit
8afda7c775
@ -103,8 +103,7 @@ void CGlueMgr::ChangeRealm(const REALM_INFO* realmInfo) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGlueMgr::m_idleState = IDLE_ACCOUNT_LOGIN;
|
CGlueMgr::SetIdleState(IDLE_ACCOUNT_LOGIN);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
|
|
||||||
auto text = FrameScript_GetText("GAME_SERVER_LOGIN", -1, GENDER_NOT_APPLICABLE);
|
auto text = FrameScript_GetText("GAME_SERVER_LOGIN", -1, GENDER_NOT_APPLICABLE);
|
||||||
FrameScript_SignalEvent(3, "%s%s", "CANCEL", text);
|
FrameScript_SignalEvent(3, "%s%s", "CANCEL", text);
|
||||||
@ -197,8 +196,7 @@ void CGlueMgr::EnterWorld() {
|
|||||||
ClientServices::LoginConnection()->Logoff();
|
ClientServices::LoginConnection()->Logoff();
|
||||||
}
|
}
|
||||||
|
|
||||||
CGlueMgr::m_idleState = IDLE_ENTER_WORLD;
|
CGlueMgr::SetIdleState(IDLE_ENTER_WORLD);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGlueMgr::DisplayLoginStatus() {
|
void CGlueMgr::DisplayLoginStatus() {
|
||||||
@ -266,8 +264,7 @@ void CGlueMgr::GetCharacterList() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGlueMgr::m_idleState = IDLE_CHARACTER_LIST;
|
CGlueMgr::SetIdleState(IDLE_CHARACTER_LIST);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
|
|
||||||
auto retrieveingText = FrameScript_GetText("CHAR_LIST_RETRIEVING", -1, GENDER_NOT_APPLICABLE);
|
auto retrieveingText = FrameScript_GetText("CHAR_LIST_RETRIEVING", -1, GENDER_NOT_APPLICABLE);
|
||||||
FrameScript_SignalEvent(3, "%s%s", "CANCEL", retrieveingText);
|
FrameScript_SignalEvent(3, "%s%s", "CANCEL", retrieveingText);
|
||||||
@ -441,8 +438,8 @@ void CGlueMgr::LoginServerLogin(const char* accountName, const char* password) {
|
|||||||
CGlueMgr::m_lastLoginState = -1;
|
CGlueMgr::m_lastLoginState = -1;
|
||||||
CGlueMgr::m_authenticated = false;
|
CGlueMgr::m_authenticated = false;
|
||||||
CGlueMgr::m_matrixRemaining = 0;
|
CGlueMgr::m_matrixRemaining = 0;
|
||||||
CGlueMgr::m_idleState = IDLE_LOGIN_SERVER_LOGIN;
|
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
CGlueMgr::SetIdleState(IDLE_LOGIN_SERVER_LOGIN);
|
||||||
|
|
||||||
char* dest = CGlueMgr::m_accountName;
|
char* dest = CGlueMgr::m_accountName;
|
||||||
for (const char* src = accountName; *src && dest < CGlueMgr::m_accountName + sizeof(CGlueMgr::m_accountName); src++, dest++) {
|
for (const char* src = accountName; *src && dest < CGlueMgr::m_accountName + sizeof(CGlueMgr::m_accountName); src++, dest++) {
|
||||||
@ -480,8 +477,7 @@ void CGlueMgr::PollAccountLogin(int32_t errorCode, const char* msg, int32_t comp
|
|||||||
ClientServices::Connection()->Cancel(2);
|
ClientServices::Connection()->Cancel(2);
|
||||||
login->Logoff();
|
login->Logoff();
|
||||||
|
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -508,8 +504,7 @@ void CGlueMgr::PollAccountLogin(int32_t errorCode, const char* msg, int32_t comp
|
|||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
|
|
||||||
if (errorCode == 2) {
|
if (errorCode == 2) {
|
||||||
CGlueMgr::m_disconnectPending = 1;
|
CGlueMgr::m_disconnectPending = 1;
|
||||||
@ -544,8 +539,7 @@ void CGlueMgr::PollAccountLogin(int32_t errorCode, const char* msg, int32_t comp
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
CCharacterSelection::ClearCharacterList();
|
CCharacterSelection::ClearCharacterList();
|
||||||
|
|
||||||
// TODO streaming, trial, and expansion checks
|
// TODO streaming, trial, and expansion checks
|
||||||
@ -566,8 +560,7 @@ void CGlueMgr::PollCharacterList(const char* msg, int32_t complete, int32_t resu
|
|||||||
FrameScript_SignalEvent(4, "%s", msg);
|
FrameScript_SignalEvent(4, "%s", msg);
|
||||||
|
|
||||||
if (CGlueMgr::HandleBattlenetDisconnect()) {
|
if (CGlueMgr::HandleBattlenetDisconnect()) {
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!complete) {
|
if (!complete) {
|
||||||
@ -586,16 +579,14 @@ void CGlueMgr::PollCharacterList(const char* msg, int32_t complete, int32_t resu
|
|||||||
|
|
||||||
FrameScript_SignalEvent(3, "%s%s", "OKAY", msg);
|
FrameScript_SignalEvent(3, "%s%s", "OKAY", msg);
|
||||||
|
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Success
|
// Success
|
||||||
|
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
|
|
||||||
FrameScript_SignalEvent(5, nullptr);
|
FrameScript_SignalEvent(5, nullptr);
|
||||||
|
|
||||||
@ -613,8 +604,7 @@ void CGlueMgr::PollEnterWorld() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (CGlueMgr::m_suspended) {
|
if (CGlueMgr::m_suspended) {
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
|
|
||||||
// TODO SI Logic
|
// TODO SI Logic
|
||||||
|
|
||||||
@ -642,8 +632,7 @@ void CGlueMgr::PollLoginServerLogin() {
|
|||||||
|
|
||||||
// Open new client connection after successful authentication
|
// Open new client connection after successful authentication
|
||||||
if (CGlueMgr::m_authenticated) {
|
if (CGlueMgr::m_authenticated) {
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
CGlueMgr::Sub4D8BA0();
|
CGlueMgr::Sub4D8BA0();
|
||||||
CGlueMgr::m_authenticated = false;
|
CGlueMgr::m_authenticated = false;
|
||||||
|
|
||||||
@ -705,10 +694,9 @@ void CGlueMgr::Resume() {
|
|||||||
// CGlueMgr::m_disconnectPending = 0;
|
// CGlueMgr::m_disconnectPending = 0;
|
||||||
// CGlueMgr::m_reconnect = 0;
|
// CGlueMgr::m_reconnect = 0;
|
||||||
|
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
// CGlueMgr::m_characterInfo = 0;
|
// CGlueMgr::m_characterInfo = 0;
|
||||||
|
|
||||||
CGlueMgr::m_suspended = 0;
|
CGlueMgr::m_suspended = 0;
|
||||||
@ -836,6 +824,11 @@ void CGlueMgr::SetCurrentAccount(const char* accountName) {
|
|||||||
SStrUpper(CGlueMgr::m_accountName);
|
SStrUpper(CGlueMgr::m_accountName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CGlueMgr::SetIdleState(GLUE_IDLE_STATE state) {
|
||||||
|
CGlueMgr::m_idleState = state;
|
||||||
|
CGlueMgr::m_showedDisconnect = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void CGlueMgr::SetLoginStateAndResult(LOGIN_STATE state, LOGIN_RESULT result, const char* addrStr, const char* stateStr, const char* resultStr, uint8_t flags) {
|
void CGlueMgr::SetLoginStateAndResult(LOGIN_STATE state, LOGIN_RESULT result, const char* addrStr, const char* stateStr, const char* resultStr, uint8_t flags) {
|
||||||
// TODO
|
// TODO
|
||||||
// CGlueMgr::LogConnectionStatus("GRUNT: state: %s result: %s %s", a4);
|
// CGlueMgr::LogConnectionStatus("GRUNT: state: %s result: %s %s", a4);
|
||||||
@ -870,9 +863,7 @@ void CGlueMgr::StatusDialogClick() {
|
|||||||
|
|
||||||
case IDLE_LOGIN_SERVER_LOGIN: {
|
case IDLE_LOGIN_SERVER_LOGIN: {
|
||||||
ClientServices::LoginConnection()->Logoff();
|
ClientServices::LoginConnection()->Logoff();
|
||||||
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -890,9 +881,7 @@ void CGlueMgr::StatusDialogClick() {
|
|||||||
case IDLE_6:
|
case IDLE_6:
|
||||||
case IDLE_ENTER_WORLD: {
|
case IDLE_ENTER_WORLD: {
|
||||||
ClientServices::Connection()->Cancel(2);
|
ClientServices::Connection()->Cancel(2);
|
||||||
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -900,15 +889,13 @@ void CGlueMgr::StatusDialogClick() {
|
|||||||
case IDLE_7:
|
case IDLE_7:
|
||||||
case IDLE_8:
|
case IDLE_8:
|
||||||
case IDLE_9: {
|
case IDLE_9: {
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case IDLE_WORLD_LOGIN: {
|
case IDLE_WORLD_LOGIN: {
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
CGlueMgr::SetIdleState(IDLE_NONE);
|
||||||
CGlueMgr::m_idleState = IDLE_NONE;
|
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
// CGlueMgr::GetCharacterList();
|
// CGlueMgr::GetCharacterList();
|
||||||
@ -930,8 +917,7 @@ void CGlueMgr::Sub4D8BA0() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGlueMgr::m_idleState = IDLE_ACCOUNT_LOGIN;
|
CGlueMgr::SetIdleState(IDLE_ACCOUNT_LOGIN);
|
||||||
CGlueMgr::m_showedDisconnect = 0;
|
|
||||||
ClientServices::Connection()->Connect();
|
ClientServices::Connection()->Connect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -76,6 +76,7 @@ class CGlueMgr {
|
|||||||
static void QuitGame();
|
static void QuitGame();
|
||||||
static void Resume();
|
static void Resume();
|
||||||
static void SetCurrentAccount(const char* accountName);
|
static void SetCurrentAccount(const char* accountName);
|
||||||
|
static void SetIdleState(GLUE_IDLE_STATE state);
|
||||||
static void SetLoginStateAndResult(LOGIN_STATE state, LOGIN_RESULT result, char const* addrStr, char const* stateStr, char const* resultStr, uint8_t flags);
|
static void SetLoginStateAndResult(LOGIN_STATE state, LOGIN_RESULT result, char const* addrStr, char const* stateStr, char const* resultStr, uint8_t flags);
|
||||||
static void SetScreen(const char* screen);
|
static void SetScreen(const char* screen);
|
||||||
static void StatusDialogClick();
|
static void StatusDialogClick();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user