From e079d65179884d9a43e9d358a5a8f780436fe685 Mon Sep 17 00:00:00 2001 From: superp00t Date: Wed, 8 Apr 2026 09:08:33 -0400 Subject: [PATCH] feat(profile): better lua types --- .../3.3.5a-windows-386/include/lua/object.h | 1 + .../3.3.5a-windows-386/include/lua/state.h | 21 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/profile/3.3.5a-windows-386/include/lua/object.h b/profile/3.3.5a-windows-386/include/lua/object.h index 89ddaea..aa8eabd 100644 --- a/profile/3.3.5a-windows-386/include/lua/object.h +++ b/profile/3.3.5a-windows-386/include/lua/object.h @@ -184,6 +184,7 @@ struct Node { struct Table { GCObject* next; + uint32_t unk04; lu_byte tt; lu_byte marked; lu_byte flags; diff --git a/profile/3.3.5a-windows-386/include/lua/state.h b/profile/3.3.5a-windows-386/include/lua/state.h index 157b3d9..89fb97e 100644 --- a/profile/3.3.5a-windows-386/include/lua/state.h +++ b/profile/3.3.5a-windows-386/include/lua/state.h @@ -9,6 +9,8 @@ DECLARE_STRUCT(global_State); DECLARE_STRUCT(lua_State); +DECLARE_STRUCT(LG); + #include "lua/object.h" #include "lua/types.h" @@ -31,6 +33,7 @@ struct global_State { stringtable strt; lua_Alloc frealloc; void* ud; + lu_byte profile; lu_byte currentwhite; lu_byte gcstate; int32_t sweepstrgc; @@ -52,11 +55,18 @@ struct global_State { lua_State* mainthread; UpVal uvhead; Table* mt[9]; - TString* tmname[0]; + uint32_t unkBC; + uint32_t unkC0; + TString* tmname[17]; }; struct lua_State { - GCObject* next; + GCObject* next; + // Added by Blizzard + // Set to: + // - lua_tainted + // - lua_gctag + int32_t unk04; lu_byte tt; lu_byte marked; lu_byte status; @@ -83,6 +93,8 @@ struct lua_State { GCObject* gclist; lua_longjmp* errorJmp; ptrdiff_t errfunc; + uint32_t unk78; + uint32_t unk7C; }; union GCObject { @@ -96,4 +108,9 @@ union GCObject { lua_State th; }; +struct LG { + lua_State l; + global_State g; +}; + #endif