I read the post you linked. In his example he read the PLAYER field with no change as if he was reading the UNIT fields so I didn't really get much from this
Code:
DWORD holder = ReadMem(objBase+0x08);
u_int MAXLEVEL = ReadMem(holder+(PLAYER_FIELD_MAX_LEVEL*4));
Code:
DWORD holder = ReadMem(objBase+0x08);
u_int HP = ReadMem(holder+(UNIT_FIELD_HEALTH*4));
I'm not really sure why I add the 0x20 I guess this is linking to the UNIT field? I was searching through posts and I came across someone doing the values like that so I modified my code to also add the 0x20. I am getting the health, mana, really anything in the UNIT field by just doing 0x20 + VALUE * 4
Here is part of my code...
Code:
ReadProcessMemory(WoWHandle, CurrentObject + (uint)WOW401.UNIT_DESC, buffer, buffer.Length, out o);
uint CurrentObjectDescriptor = BitConverter.ToUInt32(buffer, 0);
//I can change the WOW401. to any UNIT descr and it gets the value but if I repeat the same procedure for the PLAYER it doesnt
// return anything
ReadProcessMemory(WoWHandle, CurrentObjectDescriptor + (uint)WOW401.PLAYER_MAX_LEVEL, buffer, buffer.Length, out o);
uint CurrentObjectValue = BitConverter.ToUInt32(buffer, 0);
MessageBox.Show("Current Value: " + CurrentObjectHP.ToString());
I see the hierarchy you posted and I understand I'm trying to reach CurrentObject->Unit->Player->Value so I believe I am just missing something to add to the value?