Shynd’s WoW Modification Journal

June 29, 2008

Clarification of Object Data

I’m making this post for anyone struggling to gather all the information from objects, corpses, mobs, and players that would be necessary to create a bot/tool.  I’ve had to look in many different places and many different websites/projects to consolidate all of the information I’ve gathered in order to effectively read object data.  Hopefully, this post will make it easier for at least some of you.

I hope you’ve all read up on how to access WoW’s linked-list of game objects.  If not, search around mmowned.com and forum.gamedeception.com, or read my article on the subject.

First, here’s the best resource for structs, enumerations, and offsets that I’ve found, as far as object information gathering goes: bobbysing’s WoWXBase Defines.h.  His full source is readily available here.

Now then, what do all of these things mean?  These enumerations are offsets for different fields of information held inside each game object in memory.  If you know the base address for an object and what type of object it is (you read its type from baseaddress+0×14), then you can access all of the data listed in these enumerations.

For all of the information except ePlayerFields, the pointer to the start of the information struct is found at (baseaddress+0×120).  Say that you read memory at MobBaseAddress+0×120 and it tells you the mob’s information struct is held at address 0×1230000.  Now, look at the eUnitFields enumeration in Defines.h: you can see that UNIT_FIELD_HEALTH = 0×40.  So, if you now read memory from 0×1230040, you have that mob’s health.  Same goes for GameObjects, DynamicObjects, and Corpses (scroll down about 2/3rds of the way through Defines.h to find the object type enumeration).

Players, however, are slightly different.  Each player has all of the same information as a unit/mob at (baseaddress+0×120), but it ALSO has all the information in ePlayerFields, with a pointer to the start of that structure at (baseaddress+0×1198).

Also, for both units/mobs and players, you can find its positional information at (baseaddress+0xBF0).  X coordinate is +0xBF0, Y is +0xBF4, Z is +0xBF8, and Facing is +0xBFC (all are float type values).  Lastly, for your local player, and I’m not entirely sure about this one, there seems to be an __int64 GUID of whatever you are currently auto-attacking at (baseaddress+0xF08)–very useful for checking if you’re currently auto-attacking: +0xF08 is zero if you’re not, non-zero if you are.

There you go, that should at least get you started on gathering information.  Hope it helped.

No Comments Yet »

No comments yet.

RSS feed for comments on this post.

Leave a comment

You must be logged in to post a comment.

Blog at WordPress.com.