Pretty quick question I believe. I'm basically trying to optimize the number of reads my bot is doing. So I'm trying to determine what things I can "cache". You would think I could associate a GUID and an entry ID with a given base object address.
But my question is, can I? Eventually an object will be released, and another could be created with the same base address, so this could create a problem.
This is what I would like to do:
- When updating my internal object list, compare GUIDs of the objects I'm adding to my list. That way I can prevent the above issue
- When doing random things like trying to calculate my average item durability, or the total number of mobs, or if a mob is nearby, I can use a cached entry ID or a cached GUID, vs. reading it from the baseAddress everytime
Does that sound about right? I currently invalidate an object my removing it from my internal list if it's not found after 5 new scans (I traverse the linked list every second to scan for new/old wow objects). So in theory an old object is removed after 5 seconds. Which means I could potentially have a lag time of 5 seconds when reading things like average durability, items the player is wearing, etc...
Does that sound about right? I just want to make sure before I make a pretty sizeable change to how my bot "consumes" information.
Thanks :-)