- Grunt login ported end to end (SRP6 challenge/proof, version checksum, realm list) and tested against a live server: authenticates, connects to the world server (auth session with proof-of-work, header crypt), receives the character list and shows character select - Glue: realm list UI, character select (list, models, scripts), character create screen + name generator, delete/rename/decline, Enter World up to the loading screen; loading screen drawing and progress - AccountData (times, update, upload/download), BannedAddOns, addon scan and addon info, client cache version, tutorial flags - Shutdown path at login state: world/map/liquid/weather teardown, NetClient, ComSat, streaming stop; Logitech LCD no-device path in Ui/UILCD/Windows - PCRE 5.0 vendored (core stock; chartables and the posix layer from 12340), ValidateName - Fixes: TSGrowableArray::CalcChunkSize clamps to >= 8 (crash on char list), CWorldScene liquid renderer allocation, CMapFootprintTexture element ctor, pointer render states on x64, CFrustum/CWFrustum layout, M2 draw callback arguments, 37 class/struct forward-declaration mismatches - IDB name sync (1217 names), verify aliases, harness large-element instantiation Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
90 lines
2.4 KiB
C++
90 lines
2.4 KiB
C++
#include <cstdint>
|
|
#include "Engine/Source/ConsoleBase/IConsole.h"
|
|
#include "Engine/Source/FrameScript/FrameScript.h"
|
|
#include "Engine/Source/FrameScript/FrameScript_Object.h"
|
|
#include "Engine/Source/Os/TimeManager.h"
|
|
#include "Engine/Source/lua-5.1/src/lauxlib.h"
|
|
#include "Engine/Source/lua-5.1/src/lua.h"
|
|
#include "WoW/Source/Game/GameTime.h"
|
|
#include "WoW/Source/Ui/ScriptEvents.h"
|
|
|
|
int32_t Script_GetAccountExpansionLevel(lua_State* L);
|
|
|
|
// VERIFY: 177658fd auto
|
|
// OFFSET: 0x006081F0
|
|
static int32_t Script_GetTime(lua_State* L) {
|
|
lua_pushnumber(L, OsGetAsyncTimeMs() * 0.001);
|
|
|
|
return 1;
|
|
}
|
|
|
|
// VERIFY: 4e5ce7ae auto
|
|
// OFFSET: 0x00608230
|
|
static int32_t Script_GetGameTime(lua_State* L) {
|
|
lua_pushnumber(L, g_clientGameTime.m_hour);
|
|
lua_pushnumber(L, g_clientGameTime.m_minute);
|
|
|
|
return 2;
|
|
}
|
|
|
|
// VERIFY: e5f40d18 auto
|
|
// OFFSET: 0x00608270
|
|
static int32_t Script_ConsoleExec(lua_State* L) {
|
|
if (!lua_isstring(L, 1)) {
|
|
luaL_error(L, "Usage: ConsoleExec(\"console_command\")");
|
|
return 0;
|
|
}
|
|
|
|
ConsoleCommandExecute(lua_tolstring(L, 1, nullptr), 0);
|
|
|
|
return 0;
|
|
}
|
|
|
|
// VERIFY: 20774f42 auto
|
|
// OFFSET: 0x00510BB0
|
|
static int32_t Script_ReadFile(lua_State* L) {
|
|
luaL_error(L, "Access Denied");
|
|
return 0;
|
|
}
|
|
|
|
// VERIFY: 972d4262 auto
|
|
// OFFSET: 0x00510BB0
|
|
static int32_t Script_DeleteFile(lua_State* L) {
|
|
luaL_error(L, "Access Denied");
|
|
return 0;
|
|
}
|
|
|
|
// VERIFY: f25bf2fd auto
|
|
// OFFSET: 0x00510BB0
|
|
static int32_t Script_AppendToFile(lua_State* L) {
|
|
luaL_error(L, "Access Denied");
|
|
return 0;
|
|
}
|
|
|
|
// STATIC: 0x00AD2184
|
|
static FrameScript_Method s_SystemFunctions[] = {
|
|
{ "GetTime", &Script_GetTime },
|
|
{ "GetGameTime", &Script_GetGameTime },
|
|
{ "ConsoleExec", &Script_ConsoleExec },
|
|
{ "ReadFile", &Script_ReadFile },
|
|
{ "DeleteFile", &Script_DeleteFile },
|
|
{ "AppendToFile", &Script_AppendToFile },
|
|
{ "GetAccountExpansionLevel", &Script_GetAccountExpansionLevel }
|
|
};
|
|
|
|
// VERIFY: 5cf87403 auto
|
|
// OFFSET: 0x0060A120
|
|
void SystemRegisterFunctions() {
|
|
for (uint32_t i = 0; i < sizeof(s_SystemFunctions) / sizeof(s_SystemFunctions[0]); i++) {
|
|
FrameScript_RegisterFunction(s_SystemFunctions[i].m_name, s_SystemFunctions[i].m_method);
|
|
}
|
|
}
|
|
|
|
// VERIFY: 570706e7 auto
|
|
// OFFSET: 0x0060A150
|
|
void SystemUnregisterFunctions() {
|
|
for (uint32_t i = 0; i < sizeof(s_SystemFunctions) / sizeof(s_SystemFunctions[0]); i++) {
|
|
FrameScript_UnregisterFunction(s_SystemFunctions[i].m_name);
|
|
}
|
|
}
|