feat(ui): implement Script_CancelRealmListQuery (#109)

Co-authored-by: fallenoak <git@fallenoak.me>
This commit is contained in:
Tristan 'Natrist' Cormier 2025-10-08 22:29:51 -04:00 committed by GitHub
parent 046575fb98
commit 26f2255f53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 1 deletions

View File

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

View File

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

View File

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