Bug: 2.1.2 isUsableSpell() not fixed
by Drome | 09/07/2007 17:32:46![]() This is especially annoying creating buttons targeted to a unit with spells Power Word: Shield (PWS) and Blessing of Protection (BOP) in eXtremeUnitButtons. The Issue: For some spells IsUsableSpell returns nil if the "Target" is not valid. This is not consistent across all spells but is true for PWS and BOP. In the end I will have many buttons that cast a spell against their assigned unit which is usually not the "Target" and i need some way of knowing if the spell is castable. example: myUsable, myNoMana = IsUsableSpell("Power Word: Shield"); returns myUsable = 1 when no target, or when a party member is targeted; and nil when an NPC or non-party member is selected. Other Spells in game do not exhibit this reliance on the "Target" for IsSpellUsable. For example "Lesser Heal" returns myUsable = 1 no matter what is targeted (party, NPC, NPC for other Faction). I created a simple addon with the following functions; then create a macro that calls IUS_test_all(). function IUS_test_all() |
by Slouken | 09/07/2007 18:19:45![]() This is by design, because of the special target state requirements for the spell. |
by Slouken | 09/07/2007 19:08:12![]() You should be passing the target in, and it will work properly. (or if it doesn't now, it does in 2.2) |


Recent Blizzard Announcements