Originally Posted by
CodeBytes
I'm not sure if this was already covered on these forums, but I wanted to share my recent findings working with s_curMgr (ObjectMgr). Until recently, I thought the entity container was at 0x130. Operating under that assumption, I ran into an interesting issue while scripting the first two dungeons (Ragefire Chasm and Deadmines). I noticed my application was ignoring some objects, and after a little bit of debugging I realized the object was not found in the container. So I started poking around the struct again when I discovered a second list at 0x120.
0x120 had a lot more objects than 0x130, so I believed--initially--that I was reading the wrong container all this time. However, the same issue occurred while reading 0x120. So, naturally, I decided to read the information at both offsets and this finally produced a complete list of entities for me to work with.
The entities found at 0x120 are a mixture of different object types (item, player, etc) while the entities at 0x130 appear to be only Unit.
It should be noted that it's not just a type deficit. 0x120 does not contain every unit, and neither does 0x130. The two lists are incomplete on their own. Combining the two; however, appears to complete the list. Now my application is able to see everything and no longer has issues targeting and killing off every hostile creature in the instance.