I got stuff up and running, but somehow reading target information is troubled. Ill just post what im doing...
Reading whats suppose to be GUID of the target:
Code:
public ulong TargetGUID
{
get
{
uint DescriptorFields = Memory.Read<uint>(Baseaddress + 0x08);
return Memory.Read<ulong>(DescriptorFields + (uint)Descriptors.UnitFields.UNIT_FIELD_TARGET);
}
}
The descriptor is:
Code:
UNIT_FIELD_TARGET = OBJECT_END + 0x30
where OBJECT_END is:
Code:
const int OBJECT_END = 0x20;
So inside my "object manager":
Code:
if (Player.HasTarget())
{
if (currGUID == Player.TargetGUID)
{
Target = new WoWUnit(currentObj.Baseaddress);
}
}
HasTarget is just a bool function that reads if TargetGUID is 0 or something else. Target = new WoWUnit(..) is never triggered.
currGUID is guid per object as i traverse the object manager:
Code:
ulong currGUID = Memory.Read<ulong>(currentObj.Baseaddress);
the guid fields a ulongs. any pointers on where im doing wrong?