Hi,
i'm trying to get the object guid from a pointer to the object base. Is this the correct way to get the GUID from it?
fielddata = 0x8
fieldguid = 0x0
[[object + fielddata] + fieldguid]
why not
[object + 0x30] ?
Hi,
i'm trying to get the object guid from a pointer to the object base. Is this the correct way to get the GUID from it?
fielddata = 0x8
fieldguid = 0x0
[[object + fielddata] + fieldguid]
why not
[object + 0x30] ?
What you call 'fielddata' is a pointer to what WoW calls the objects 'descriptors'. It may also be at [object + 0x30] but I don't think it's guaranteed to stay there between revisions. Whereas the descriptors have been at [object + 0x8] since before TBC.
There's 2 ways to retrieve an object's guid, first is as a CG_Object_C member (+0x30), second is from the descriptors (OBJECT_FIELD_GUID). It's been this way for a very long time (at the very least since 2.4.3), seeing as you are already keeping track of a descriptor enum/struct it would be pointless to keep track of yet another offset/struct, so use the descriptor one.
Someone posted that they might not be equal in some cases, can't confirm.
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku