- Joined
- Aug 3, 2004
- Messages
- 710
If you have any way to find the ThreadLocalStorage there is a straight forward way to get the current VM across versions as long as the structs remain the same.
As far as I can tell, the VMs are pushed and popped like a stack so using Count-1 should give you the top, aka the current VM.
C#:
VirtualMachine* vm = GetThreadLocalStorage()->Jass->VirtualMachineManager.VirtualMachines[GetThreadLocalStorage()->Jass->VirtualMachineManager.Count - 1];