Druid Swipe at low levels
I am levelling some Horde toons, and noticed that Swipe appears to LUA as being always available, even though it is not until level 32:
local playerSpellSwipeUseable = IsUsableSpell("Swipe"); or local playerSpellSwipeUseable = IsUsableSpell(213771); Always returns true!!! I am level 20 and it is not available until level 32. Other spells, eg Barkskin, return false (correctly): local playerSpellBarkskinUseable = IsUsableSpell("Barkskin"); Is this a bug associated with "Swipe" and is there a way around it other than manually checking the player's level ? |
Try IsSpellKnown or IsPlayerSpell.
We use the latter in oUF to check if Shred is known, thus showing combo points for druids in cat form. |
Quick differences (not comprehensive):
Lua Code:
|
Guys thanks, I did not know about these two API calls.
However both IsSpellKnown(213771) and IsPlayerSpell(213771) (Swipe) return false, even when I know the spell and have just casted it! I have also noticed that the API call IsUsableSpell() works fine for other spells, eg: local playerSpellBarkskinUseable = IsUsableSpell("Barkskin"); which correctly returns "true" on my 120 druid and "false" on my level 23 druid. I have not tried those two functions on "Barkskin" to see how they perform since the "IsUsableSpell" works as intended. |
It’s possible you may have the wrong spell ID. Pick up Swipe from your spellbook (you can use the one on your bars, but it has to be the spell itself, not a macro) and while it’s on your cursor, type /dump GetCursorInfo() into chat. The number next to [3]= in your chat window is the spell ID.
|
All times are GMT -6. The time now is 04:20 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI