feat(ui): implement Script_CancelRealmListQuery (#109)

Co-authored-by: fallenoak <git@fallenoak.me>
This commit is contained in:
Tristan 'Natrist' Cormierandfallenoak authored and GitHub committed 2025-10-08 21:29:51 -05:00
1 parent 046575fb98
commit 26f2255f53
3 files changed
+14 -1

No files matched your search

+10
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;
+1
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();
+3 -1
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) {