Hi. I did quite a bit of searching here and on Google, but didn't really find an answer so I apologize in advance for being redundant in any way.
Currently I am using oLUA and an addon I made to write some simple scripts to automate spell rotation. It's working fine.
I wanted to revisit working with c# to access game objects. The examples I've seen so far usually have endless iteration over an object list. This appears to be the only way to keep the game state consistent and check if WoW has loaded new objects into the game world.
I have seen one example that involved using packet sniffing (sorry, I seem to have failed to bookmark it) and that does indeed look promising. But I figure there must be some event fired or function called when WoW receives a server response containing information to load (or unload or update) a WoW object. If I could monitor that, I could keep the game state consistent with my bot without needing to repeatedly search through all objects (right?).
Like say I want to keep track of the lowest HP unit.
Right now I have to iterate through an entire list of objects, find the units and then compare their health.
At the very least I could filter out units from other objects when they are created giving me a much shorter list to sort through.
But there may be other ways to improve the efficiency that I'm not thinking of.