Anyone know how to find a Player's Name from their GUID or Base Offset?
I just worked out that in 2.3.3, to find a Unit's name...
Object base + 3496 -> +4 -> Unit name as a null terminating string.
also, these might be helpful. Haven't seen them posted anywhere yet.
They work for 2.3.3
NOTE: All offsets are in decimal!!!!
s_objDescriptors = 12491928
s_itemDescriptors = 12490728
s_containerDescriptors = 12488048
s_unitDescriptors = 12483408
s_playerDescriptors = 12454448
s_gameObjectDescriptors = 12453928
s_dynamicObjectDescriptors = 12453608
s_corpseDescriptors = 12452848
They are the starts of 8 lists of pointers which point to the Descriptors for the specified object type.
read an integer at the base pointer (n) plus a multiple of 20 bytes to get the location of the desired Descriptor's name
descPointer + (n * 20) + 0 = pointer to name
descPointer + (n * 20) + 4 = offset
descPointer + (n * 20) + 8 = size
descPointer + (n * 20) + 12 = type
descPointer + (n * 20) + (16 - 19) = 4 Flags (1 byte each)
So to read one of the descriptors you find in these lists. Read ObjectBase + 8 to get a pointer to the object's storage start then add the descriptors offset to that and at that position read whatever type of variable the descriptor tells you it is.
Here's what the Variable types refer to:
1 - Integer (4 bit)
2 - Unknown (never looked much into this.. so i dunno sry)
3 - Single (4 bit floating point)
4 - GUID (8 bits..)
5 - Flag
As an example... If you want to find the player's Health... Find the descriptor called 'UNIT_FIELD_HEALTH' its offset is at 88 and it's an Integer.
Find a Unit's base (this one works for players as well) and add 8 to it. Read an integer here to get the Storage start. Add 88 (the descriptor offset) and read an integer at this location. Wallah.. there's the unit's health.
So:
UnitBase + 8 -> +88 Read int here for health
For health it will show 100 as max unless it's your own health or somebody in your party/raid.
So yeah.. I hope that might be helpful to some of you. Let me know if you cant understand what I mean.
Cheers,
Hazy