I try to control another player's movement by following steps:
step 1 : controller select a player(robot)
step 2 : controller click a position on his screen
step 3 : convert controller's cursor position to wow's world coordinate(x,y,z)
step 4 : send a message(whisper or addon message) to that player(robot)
step 5 : robot client receive this message
step 6 : robot client get the designated coordinate from message
step 7 : robot move to the coordinate
I have hooked wow's recv and send function in ws2_32.dll, so sending message and receiving message have no problem.
The problem is step 3, how can I convert cursor postion to coordinate?
I have traced into "InputEvent" in ollydbg after clicking on wow window, finding that it just stores the mouse event , cursor postion and time in some addresses, and then , I lost way to trace.
So, I don't know where wow handle these events and parameters and how to convert to 3D coordinate.
appreciate for any help!