Pickup talent spells that are not learned
I've picked up an abandoned addon to try to update it for the last version of WoW and learn a bit of LUA development (I'm a web developer).
The addon is called ActionBarSaver, and it allows you to save spells positions in your bars (you can save profiles and restore them, they are saved by class). When I downloaded it, it worked for spells and objects (like 90% of what we need ^^), but not with mounts, pets, learned pve/pvp talents and unlearned pve/pvp talents.
For the first 3 I managed to make it work after finding the proper API methods, but I can't make the last one...
Basically, when you select a talent that gives you a spell, if you place it in your bars and learn another talent on the same line, the spell can't be used anymore but it stays in your bars (and I wanted to keep it, so that if you have to change your spec quickly the spell is already in your bars, no need to open your spellbook).
I can save the spellID, but when I want to restore it doesn't pickup the spell :(
Here is what I tried:
(at the moment I just print out the name, testing ^^)
To save a spell (when saving a profile), it gets the spellInfo and store it into a string that's later used to restore:
What I do is first generate an array with all the spells names/IDs, and then go through my saved bar to get the spell, find it from my "cache", and pick it up to put it in the position it's supposed to be. But for unlearned talents, I tried "PickupSpell", "PickupSpellBookItem" (both with the spellID) and "PickupTalent" (tried with spellID and talentID) but nothing worked :(
Do you know if it's possible? And if so what am I doing wrong?
I looked through the "Pickup..." methods on WoW API on Gamepedia, but didn't find anything that could help.
I have a personal addon that saves bars and also replace macro tabs (general become char macros and char macros become general macros) my solution for this problem is sketched bellow:
Pretty sure it's just a limitation of the way unlearned talents spells work. If you re-specced and specced back while having one such spell on your bars I'm pretty sure it would remove itself. I want to try that now if I can confirm it.
Edit: I was wrong. I'm pretty sure there was something that acted that way but I really can't remember what it was. Probably not related to talents, anyway.
Though, don't they have placeholder spells for talent rows, which automatically change into the selected talent? I might need to look into that, not sure if they exist for PvP talents though. Actually I'm not sure how PvP talents behave when outside of PvP areas, since the game unlearns them on leaving and re-learns them on entering (as opposed to simply disabling/enabling their use >.> gotta love spaghetti)
Like 175686 Stopping Power, for Hunters. Placeholder for Lv. 60 talents, there should be a spell like this for all classes and all active talent rows, might need to bring up a list. Not sure how one would detect that the unlearned spell is an unlearned talent, I guess if you can still read spell name then you could compare with class and have a table of talent spell names for that class or something, and instead save that placeholder spell.
Might have some unwanted side-effects though, I guess. If they wanted different spells on their talent row to be on different action bar slots. This would effectively be putting all of them on the same slot with no way to undo it unless the user manually removed it (or maybe place duplicates of the spell on different action bar slots.)
Edit: Apparently those placeholder spells don't exist if even just one talent in the row is passive. That's lame. I guess this isn't a solution, then.
Banknorris' idea seems clever enough to work with minimal side-effects, though one limitation I can think of is that it wouldn't work if the player has already used all their macro slots.
@Oren: You should be aware that it is not "LUA" but rather "Lua" as it is the Portuguese word for "moon", not an acronym.
I am sorry, but, that just drives me up the wall.
@jeffy162: You're right, I will try to remember that :D
@Banknorris: Thanks! That's a good workaround actually, doesn't solve entirely the problem since, like @Ammako said, some people might have used all of their general macro slots (not me, so I'll try doing that ^^).
@Ammako: So I just did the test on my DK: row 3 of honor talents contains 2 spells (Dark Simulacrum & Anti-Magic zone), I put the 2 of them in a bar with Frost spec, outside of a battleground (both spells disabled, one of them having the mention "Honor Talent" in its tooltip). I switch to Unholy spec (I even tried to reload UI and logout), go back to frost spec and the spells are still there, same if I try with PvE talents!
So the games allows that, but maybe there's no way to do it through the API :( I'll still try to find the proper solution while using @Banknorris workaround for the time being ^^ but if anyone has an idea, please tell!
|All times are GMT -6. The time now is 07:35 AM.|
vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI