Glue: port TokenEntered

- Script_TokenEntered (0x4DC4D0)
- CGlueMgr::LoginEnterToken (0x4D8080): status dialog, forward token
- ClientServices::LoginEnterToken (0x6B0AA0): login object EnterToken

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Saty
2026-09-30 07:04:07 +02:00
co-authored by Claude Opus 5.5
parent 9d660c24f5
commit 9beb4faf5d
5 changed files with 29 additions and 1 deletions
+7
View File
@@ -2087,3 +2087,10 @@ void CGlueMgr::RaceChange(WOWGUID guid, const CHARACTER_CREATE_INFO* info) {
msg.Finalize();
ClientServices::Send2(&msg);
}
// VERIFY: 24156984 auto
// OFFSET: 0x004D8080
void CGlueMgr::LoginEnterToken(const char* token) {
FrameScript_SignalEvent(GLUE_EVENT_OPEN_STATUS_DIALOG, "%s", "CANCEL");
ClientServices::LoginEnterToken(token);
}
+1
View File
@@ -147,6 +147,7 @@ class CGlueMgr {
static void ProcessAgreements(CGlueMgr::Agreements* agreements);
static void PatchDownloadStart();
static void LoginServerLogin(const char* username, char* password);
static void LoginEnterToken(const char* token);
static void LogConnectionStatus(const char* format, ...);
static void ResetQueueState();
static void SetCurrentAccount(const char* accountName);
+10 -1
View File
@@ -64,7 +64,6 @@ int32_t Script_CancelLogin(lua_State* L);
int32_t Script_GetCVarAbsoluteMin(lua_State* L);
int32_t Script_GetCVarAbsoluteMax(lua_State* L);
int32_t Script_AcceptChangedOptionWarnings(lua_State* L);
int32_t Script_TokenEntered(lua_State* L);
int32_t Script_GetNumDeclensionSets(lua_State* L);
int32_t Script_DeclineName(lua_State* L);
int32_t Script_GetNumGameAccounts(lua_State* L);
@@ -994,6 +993,16 @@ static int32_t Script_GetCreditsText(lua_State* L) {
return 1;
}
// VERIFY: a2877425 auto
// OFFSET: 0x004DC4D0
static int32_t Script_TokenEntered(lua_State* L) {
if (lua_isstring(L, 1)) {
CGlueMgr::LoginEnterToken(lua_tolstring(L, 1, nullptr));
}
return 0;
}
// STATIC: 0x00AC3E00
static FrameScript_Method s_scriptFunctions[] = {
{ "IsShiftKeyDown", &Script_IsShiftKeyDown },
@@ -1315,3 +1315,13 @@ void ClientConnection::CharacterLogout(bool quit, bool instant) {
int32_t ClientServices::LaunchURL(const char* url) {
return OsLaunchURL(url);
}
// VERIFY: 12c793a8 auto
// OFFSET: 0x006B0AA0
void ClientServices::LoginEnterToken(const char* token) {
if (!ClientServices::s_loginObj) {
SErrDisplayAppFatalMessage("", "", 0);
}
ClientServices::s_loginObj->EnterToken(token);
}
@@ -119,6 +119,7 @@ class ClientServices : public LoginResponse {
static uint8_t GetCharacterSex();
static const char* GetSelectedRealmName();
static int32_t LaunchURL(const char* url);
static void LoginEnterToken(const char* token);
static const char* GetServerAlertURL();
static Login* LoginConnection();
static void Logon(const char* username, const char* password);