From c2c3d64a11ef71784056027556ad0c0aaf21d452 Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Tue, 7 Jul 2020 17:25:53 +0300 Subject: [PATCH] fix spellUsable condition --- WeakAuras/Prototypes.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 4a5f9a9..c95edaa 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -2050,12 +2050,12 @@ WeakAuras.event_prototypes = { test = "true", conditionType = "bool", conditionTest = function(state, needle) - return state and state.show and (IsUsableSpell(state.spellname) == (needle == 1)) + return state and state.show and (IsUsableSpell(state.spellname) == needle) end, conditionEvents = { "SPELL_UPDATE_USABLE", "PLAYER_TARGET_CHANGED", - "UNIT_POWER_FREQUENT", + "UNIT_MANA", "UNIT_RAGE", "UNIT_FOCUS", "UNIT_ENERGY", "UNIT_RUNIC_POWER" }, }, { @@ -2065,12 +2065,12 @@ WeakAuras.event_prototypes = { test = "true", conditionType = "bool", conditionTest = function(state, needle) - return state and state.show and (select(2, IsUsableSpell(state.spellname)) == (needle == 1)); + return state and state.show and (select(2, IsUsableSpell(state.spellname)) == needle); end, conditionEvents = { "SPELL_UPDATE_USABLE", "PLAYER_TARGET_CHANGED", - "UNIT_POWER_FREQUENT", + "UNIT_MANA", "UNIT_RAGE", "UNIT_FOCUS", "UNIT_ENERGY", "UNIT_RUNIC_POWER" } }, {