Im trying to keep a registered lua function alive.
Is there a way to check lua reload action when the player is in-game?
It is better to achieve this by memory-read or CFunction call.
thx for helping me!
Im trying to keep a registered lua function alive.
Is there a way to check lua reload action when the player is in-game?
It is better to achieve this by memory-read or CFunction call.
thx for helping me!
you could set a variable, and if the variable is nil the user did a reload
Currently a function invoked when all default WoW Lua functions are registered is present at 0x00713B10. You can hook that function and reregister your own lua_CFunctions there.
Ive got that CFunction. Also, I've used easyhook to hook that function successfully. Whereas none of my own code was called all through whenever the game is running. Nothing wrong seems happen though...
When is this function called? Or is it a must to hook it right at the process start?![]()
Yes. (filler)
You think that the login screen is something other than lua?
One can call the DefaultLogin lua function on the login screen, so it must have been registered before. In my experience I found that I needed to register my own lua functions after login in order for them to be usable in game. I am not entirely sure of why this is. I do mine when the ObjMgr is initialized.
You can register it every time before you call it.
Yes I'm evil.
Haha. That is one option.
Guess the most failsafe way is to re-register every call to CGGameUI__EnterWorld
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
or watch luastate changes
Code:static void* laststate = 0; if (laststate != (GetLuaState)()) { laststate = (GetLuaState)(); (FrameScript_RegisterFunction)("ipvtqpfgxkotn", (void*)CallbackFunction); }
Last edited by eLaps; 05-04-2010 at 06:02 AM.