feat(glue): add CGlueMgr::PollDeleteCharacter

This commit is contained in:
Tristan Cormier 2026-01-06 13:56:28 -05:00
parent eee2986220
commit 74f847d007
2 changed files with 34 additions and 0 deletions

View File

@ -404,6 +404,11 @@ int32_t CGlueMgr::Idle(const void* a1, void* a2) {
break;
}
case IDLE_DELETE_CHARACTER: {
CGlueMgr::PollDeleteCharacter(msg, complete, result);
break;
}
case IDLE_ENTER_WORLD: {
CGlueMgr::PollEnterWorld();
break;
@ -769,6 +774,34 @@ void CGlueMgr::PollCharacterList(const char* msg, int32_t complete, int32_t resu
}
}
void CGlueMgr::PollDeleteCharacter(const char* msg, int32_t complete, int32_t result) {
FrameScript_SignalEvent(UPDATE_STATUS_DIALOG, "%s", msg);
if (CGlueMgr::HandleBattlenetDisconnect()) {
CGlueMgr::SetIdleState(IDLE_NONE);
}
if (!complete) {
return;
}
// Error
if (result == 0) {
FrameScript_SignalEvent(OPEN_STATUS_DIALOG, "%s%s", "OKAY", msg);
CGlueMgr::SetIdleState(IDLE_NONE);
return;
}
// Success
FrameScript_SignalEvent(SELECT_FIRST_CHARACTER, nullptr);
CGlueMgr::GetCharacterList();
}
void CGlueMgr::PollEnterWorld() {
if (!LoadingScreenDrawing()) {
return;

View File

@ -80,6 +80,7 @@ class CGlueMgr {
static int32_t OnKickReasonMsg(void* param, NETMESSAGE msgId, uint32_t time, CDataStore* msg);
static void PollAccountLogin(int32_t errorCode, const char* msg, int32_t complete, int32_t result, WOWCS_OPS op);
static void PollCharacterList(const char* msg, int32_t complete, int32_t result, int32_t errorCode);
static void PollDeleteCharacter(const char* msg, int32_t complete, int32_t result);
static void PollEnterWorld();
static void PollLoginServerLogin();
static void PollRealmList(const char* msg, int32_t complete, int32_t result, WOWCS_OPS op);