feat(net): implement GrunLogin::LogOff

This commit is contained in:
VDm 2025-04-09 00:47:37 +04:00
parent a2e1dc98a2
commit 032e9f93d8
4 changed files with 12 additions and 2 deletions

View File

@ -668,6 +668,12 @@ void CGlueMgr::PollUserSurvey() {
}
}
void CGlueMgr::CancelLogin() {
if (CGlueMgr::m_idleState == IDLE_LOGIN_SERVER_LOGIN) {
CGlueMgr::StatusDialogClick();
}
}
void CGlueMgr::InitCursor() {
uint32_t width;
uint32_t height;

View File

@ -89,6 +89,7 @@ class CGlueMgr {
static void PollCharacterList(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op);
static void PollDeleteCharacter(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op);
static void PollUserSurvey();
static void CancelLogin();
static void Resume();
static void SetCurrentAccount(const char* accountName);
static void SetLoginStateAndResult(LOGIN_STATE state, LOGIN_RESULT result, char const* addrStr, char const* stateStr, char const* resultStr, uint8_t flags);

View File

@ -113,7 +113,9 @@ void GruntLogin::Init(LoginResponse* loginResponse) {
}
void GruntLogin::Logoff() {
// TODO
if (this->m_loggedOn) {
this->m_clientLink->Disconnect();
}
}
void GruntLogin::Logon(const char* a2, const char* a3) {

View File

@ -511,7 +511,8 @@ int32_t Script_RequestRealmSplitInfo(lua_State* L) {
}
int32_t Script_CancelLogin(lua_State* L) {
WHOA_UNIMPLEMENTED(0);
CGlueMgr::CancelLogin();
return 0;
}
int32_t Script_GetCVar(lua_State* L) {