Originally Posted by
Shynd
I believe he edited his post.
yep, refresh button is key. Anyways, this helped a LOT. Thanks a lot for the help!
edit: I'm getting some weird values. not really sure the descriptors are working, or I'm not doing it correctly. I'm doing it in C++:
Code:
DWORD unit_Field_Base = 0x8,
faction_Template = 0x36;
//get unit faction
int getFaction(HANDLE hProcess, DWORD curObj){
int ret=0;
DWORD buf=0;
if(ReadProcessMemory(hProcess, (LPCVOID)(curObj+unit_Field_Base), &buf, sizeof(buf), NULL)==0)
return 0;
if(ReadProcessMemory(hProcess, (LPCVOID)(buf+(faction_Template*4)), &ret, sizeof(ret), NULL)==0)
return 0;
return ret;
}