feat(glue): implement Script_CancelRealmListQuery

This commit is contained in:
Tristan Cormier 2025-10-08 21:19:53 -04:00
parent 6f07492c7b
commit eb90ee3dcd
3 changed files with 11 additions and 1 deletions

View File

@ -89,6 +89,14 @@ float CalculateAspectRatio() {
return static_cast<float>(width) / static_cast<float>(height); return static_cast<float>(width) / static_cast<float>(height);
} }
void CGlueMgr::CancelRealmListQuery() {
if (CGlueMgr::m_idleState == IDLE_REALM_LIST) {
ClientServices::Connection()->Cancel(2);
CGlueMgr::SetIdleState(IDLE_NONE);
}
}
void CGlueMgr::ChangeRealm(const REALM_INFO* realmInfo) { void CGlueMgr::ChangeRealm(const REALM_INFO* realmInfo) {
if (!realmInfo) { if (!realmInfo) {
return; return;

View File

@ -58,6 +58,7 @@ class CGlueMgr {
static int32_t m_suspended; static int32_t m_suspended;
// Static functions // Static functions
static void CancelRealmListQuery();
static void ChangeRealm(const REALM_INFO* realmInfo); static void ChangeRealm(const REALM_INFO* realmInfo);
static void DisplayLoginStatus(); static void DisplayLoginStatus();
static void EnterWorld(); static void EnterWorld();

View File

@ -19,7 +19,8 @@ int32_t Script_RealmListUpdateRate(lua_State* L) {
} }
int32_t Script_CancelRealmListQuery(lua_State* L) { int32_t Script_CancelRealmListQuery(lua_State* L) {
WHOA_UNIMPLEMENTED(0); CGlueMgr::CancelRealmListQuery();
return 0;
} }
int32_t Script_GetNumRealms(lua_State* L) { int32_t Script_GetNumRealms(lua_State* L) {