A couple more comments/observations after several more days of experimenting:
- Everything works as I would expect except for the auto-focus functionality. I've never noticed anything unusual such as my Hunter's Mark not being applied. Auto-focus still has some bugs/problems, as listed below.
- If I send my pet in with the smartButton and either never attack myself or only use autoattack, then the focus management never de-autos the pet skills listed in the priority table. In other words, if I have 1: Growl, 2: Claw, 3: Bite configured in the priority table, they will all remain enabled for auto-cast through the entire fight even if my pet runs completely out of focus.
- If I use any attack skill of my own, such as Viper's Sting, then and only then is the auto-cast of the listed priority skills checked and reset according to the current amount of focus that my pet has left. For example, if I send my pet in with the smart button and all three listed skills are currently enabled for autocast, and I wait until all my pet's focus is gone and then I use my Viper's Sting, the autocast for Claw and Bite are turned off by your focus management.
- So in other words, your current focus management code seems to work in two distinct modes:
- You can press the bound focus management reset key at any time to make your code evaluate the remaining pet's focus and enable/disable autocast for the skills in the priority list accordingly, and/or
- The focus management code *seems* to evaluate the remaining pet's focus and enable/disable autocast every time you use one of your own hunter skills.
If this is working as intended, it takes a while to wrap your head around and feel as if you are somewhat in control of the process. It certainly bears some better explanation in your readmes and descriptive web pages. I have spent literally days trying to understand how the system seems to be working (and not feel as if it were totally broken and somewhat random in its behavior), and I'm still not sure I fully understand the pattern behind the system.
Please understand that I'm not dissing the functionality. It seems like a creative workaround to the problem of no longer being able to automatically trigger hotbar buttons in LUA code. I'm just thinking that helping users to understand the behavior of the code would be very useful.
Let's see if I have a handle on what is essentially going on here with your focus management code:
- The preferred behavior is that your code uses *any* bound keypress to fake a keypress on the pet bar to evaluate remaining pet focus and accordinly toggle the autocast status of pet skill icons that are identified in the autofocus priority table of your code.
- You also enable users to bind a specific key to the same function so that they can force a reset of the autocast state at any time, during or after battle.
So, your intent is for users to use the following general procedure for a fight:
- Before the fight, check the status frame's focus management "reset indicator" and press the bound reset key if necessary to toggle all table-listed pet skills to their default autocast-on state.
- Send your pet in to attack with the "smart button".
- Don't waste too much time watching for the focus management reset indicator, but instead just fire off your normal attack skills, which should occur often enough to keep the focus management code continually refreshing the autocast state of the table-listed pet skills.
- If you find yourself doing only some auto-attacking for a long length of time, or kiting or what not, you can then pay attention to your focus management reset indicator and press the bound reset key to force a "manual" reset of the autocast state of pet skills as needed.
Have I essentially got this right? Your intent is for the focus management to be *mostly* automatic, assuming the player regularly fires off his own attack skills, but with the option to manually control the resetting of the focus mgmt autocast state if they player is for some reason not using normal attack skills during combat?