I am having a strange issue after reversing CGUnit_C__GetUnitName to get the name offsets for a Unit. The Unit name works for some targets and for target Marshal McBridge for example it shows some strange name.
Also it seems some of the other properties of the Unit are not being read correctly either.
Currently some of the offsets I am using are [6.0.3 19342]:
Code:
public enum Offsets : uint
{
version = 0xC7584F,
curMgr = 0xCB9068,
firstObject = 0xD8,
nextObject = 0x3C,
playerName = 0xED5CD0,
objectType = 0xC,
descriptors = 0x4,
unitHealth = 0x0EC,
unitPower = 0x0F0,
unitHealthMax = 0x108,
unitPowerMax = 0x10C,
unitLevel = 0x154,
guidOffset = 0x28,
xOffset = 0xA80,
yOffset = 0xA84,
zOffset = 0xA88,
rotOffset = 0xA8C,
targetGUID = 0xD93AA8,
mouseOverGUID = 0xD93A78
npcCache = 0xBC4,
npcName = 0x7C
}
This is the code for how I make the unit object:
Code:
WoWUnit unit = new WoWUnit();
unit.baseAddress = curObject;
unit.guid = wow.ReadUInt64(curObject + (uint)Offsets.guidOffset);
unit.curHealth = wow.ReadInt(wow.ReadUInt(curObject + (uint)Offsets.descriptors) + (uint)Offsets.unitHealth);
unit.maxHealth = wow.ReadInt(wow.ReadUInt(curObject + (uint)Offsets.descriptors) + (uint)Offsets.unitHealthMax);
unit.curPower = wow.ReadInt(wow.ReadUInt(curObject + (uint)Offsets.descriptors) + (uint)Offsets.unitPower);
unit.maxPower = wow.ReadInt(wow.ReadUInt(curObject + (uint)Offsets.descriptors) + (uint)Offsets.unitPowerMax);
unit.x = wow.ReadFloat(curObject + (uint)Offsets.xOffset);
unit.y = wow.ReadFloat(curObject + (uint)Offsets.yOffset);
unit.z = wow.ReadFloat(curObject + (uint)Offsets.zOffset);
unit.rotation = wow.ReadFloat(curObject + (uint)Offsets.rotOffset);
unit.type = objType;
unit.name = wow.ReadASCIIString(wow.ReadUInt(wow.ReadUInt(curObject + 0xBC4) + 0x7C), 40);
Here is an image of what my GUI looks like with the problem:

If anyone has any ideas of why this is happening I would appreciate any advice.
Thanks for your time.