Askmrrobot blocking me from using my action bars after switching specs

I got a little time to play around with this some more…

ClassTalentHelper.SwitchToLoadoutByName seems to solve the problems that C_ClassTalents.LoadConfig seems to have, namely, C_ClassTalents.LoadConfig does not properly set the state of the talent UI so is essentially unusable by addon authors.

The code I had was doing the following:

  1. Find the setup named “AMR Latest Setup”
  2. Delete that setup if it exists
  3. Create a new setup with that same name via C_ClassTalents.ImportLoadout
  4. Activate the newly created setup

The last step was the only thing not really working. And it also seems that C_ClassTalents.ImportLoadout tries to do something to the talent UI… maybe it implicitly does something similar to LoadConfig upon creation… but it is even more inconsistent.

If I call ClassTalentHelper.SwitchToLoadoutByName after C_ClassTalents.ImportLoadout to actually activate that loadout, it works… but only if I put enough of a delay. A minimum of 2 seconds seems to be required for it to function consistently. I’m not a huge fan of doing that… it is very easy for a player to interrupt that and end with their talent tree in a goofy state.

I’m going to try a couple more things to see if I can get something more consistent working.

it might be easier to use the ClassTalentHelper.SwitchToLoadoutByIndex function.
then you could import whatever name you want, and the swap wouldnt have to reference the name. so if they had 3 loadouts and you are importing a 4th you would know the index=4. might make things work a bit quicker since you won’t have two functions searching for a name(the delete config). might even be able to remove the delay if my theory is right.
I feel like the delete loadout is just as wonky as load config. and if you press multiple times it doesnt actually delete but creates multiple setups of “amr latest setup”.