After the patch 2.4 and the efforts of finding new TLS-offset and other offsets, i was thinking about to automate this process for the upcoming patches. The main purpose of using TLS (for most of us) is to find the adress of the first object and iterate through them from there. So it would be enough to find this first object and the TLS is not needed. Finding this object can be fully automated, assuming that the object-entry structure is not changed after a patch:
Code:
struct
{
DWORD dummy1[5];
DWORD objecttype;
DWORD dummy2[6];
QWORD guid;
DWORD dummy3;
DWORD nextptr;
};
Now the approach is to find the player-object whos GUID you already know and which doesn't change ! (The guid of other objects will change). Finding an object is easy and straight, i look for the player-guid and the right adress will have the player objecttype (=4) some bytes before (look at the above structure) and also at object+8 there is a pointer to another structure which starts with the guid which can also be checked.
You also know the coordinates of the player (x,y,z,facing). Create a character and place it besides a npc and write down the above values using your actual bot (GUID, x, y, z, facing). Also write down the name of the npc you stand beside. After this never move or change your player !
I will soon provide a program which takes these values and find the object-list and also the offsets for x,y,z,facing. The idea is to find the player-object in the list first and go backwards until you hit the first object.
Finding the offsets inside an object is also then straight, the program will look for these in the player "space room". A little bit trickier is to find names (npc/unit). For this i am implementing a recursive routine which looks for the npc name (see above, the npc you stand beside) and goes back until it lands in the proper object space. I will provide this program next and am very curious if it works for the next patch.
If you got also some ideas i would be glad to hear them here.