-
ObjMgr Player/Unit Positions RETAIL
Hello, I am looking for the offsets of Player (activePlayer and other players) and Unit Positions for the current retail patch, currently i got the GUID and the ObjectType successfully,
but i can't seem to find the Position offsets
for Unit i tried these:
pos.x = Read<float>(objPtr + 0x130);
pos.y = Read<float>(objPtr + 0x134);
pos.z = Read<float>(objPtr + 0x13
;
and for player i tried these:
pos.x = Read<float>(objPtr + 0xF0);
pos.y = Read<float>(objPtr + 0xF4);
pos.z = Read<float>(objPtr + 0xF
;
but except a wrong value on the pos.x i got always 0.
i iterate like this: ObjMgr -> ObjBase -> Pos
Does someone have a little hint how to find the correct offsets (on CE i can't seem to find them, i still get weird values).
I know this topic was discussed alot here, but most threads are massively outdated and no approach i could find here really direct me in the correct direction so i am a bit frustrated currently...
-
Member
positionPtr = entityPtr.Read<IntPtr>(216);
if (positionPtr != IntPtr.Zero)
PositionX = posPtr.Read<float>(24);
PositionY = posPtr.Read<float>(2
;
PositionZ = posPtr.Read<float>(32);
Orientation = posPtr.Read<float>(40);
-
Post Thanks / Like - 1 Thanks
Van152 (1 members gave Thanks to 810810810 for this useful post)
-
thanks alot mate! appreciate it!
may i ask how you find these?
and sadly i got also 0 values:
Vector3 CObject_C::GetPosition() const {
Vector3 pos;
try {
uintptr_t objPtr = reinterpret_cast<uintptr_t>(this);
uint64_t infoBase = *reinterpret_cast<uint64_t*>(objPtr + 0x216);
if (!infoBase || infoBase <= 0x10000) {
return pos;
}
if (IsUnit()) {
pos.x = Read<float>(infoBase + 0x24);
pos.y = Read<float>(infoBase + 0x2
;
pos.z = Read<float>(infoBase + 0x32);
}
else {
pos.x = Read<float>(infoBase + 0x24);
pos.y = Read<float>(infoBase + 0x2
;
pos.z = Read<float>(infoBase + 0x32);
}
}
catch (...) {
}
return pos;
}
Last edited by Van152; 1 Week Ago at 02:04 PM.
-
Member
remove the 0x from the numbers i gave non hex offsets
-
Post Thanks / Like - 1 Thanks
Van152 (1 members gave Thanks to 810810810 for this useful post)
-
aaah finally, it was late haha thanks alot!