Hello, im working on wow events handling. I know only one way, hook original Framescript_SignalEvent, just like dx11 Present. But now im changing wow`s native code, i think it risky to be detected by warden, or i have no other way to handle events?
Hello, im working on wow events handling. I know only one way, hook original Framescript_SignalEvent, just like dx11 Present. But now im changing wow`s native code, i think it risky to be detected by warden, or i have no other way to handle events?
FYI this will not catch combat events, the function in question is vFrameScript::SignalEvent (variadic handler of FrameScript_SignalEvent) which dispatches events that have a variable number of arguments. Combat events are not handled by this as they have a fixed argument count and need to be dispatched as either a filtered or unfiltered combat event. vFramescript::SignalEvent is never called when dispatching a combat event. You can find the combat event dispatcher in the latest version as SendCombatLogEvents (0x007BDE1B @ 6.2.2.20444).
There's a couple other options which may catch all events - you could hook the second overload of FrameScript_SignalEvent (0x0042A47B), at which point the arguments have already been pushed to the Lua state. We can read the arguments from the Lua state here but it isn't preferable because things like guids have already been formatted to strings. The other option (preferable option) is to hook FrameScript_PushEventName (0x004287A6) and vFrameScript_PushEventArgs (0x00429D17) - from here we can get the event ID and all arguments before they are formatted. These functions are used for combat events, as well as all other events. Another option would be to execute some Lua to create a frame and register all events, then pass them to your program (pretty ugly in my opinion but may be the best option depending on your situation.)
Yes, both reside in the Wow.exe module of course. Neither seemed to be scanned at the moment but that could change at any time.
Last edited by Jadd; 09-11-2015 at 04:50 AM.