Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Fix Insufficient Resources condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maczuga committed May 27, 2021
1 parent 3f2c9c8 commit 401377b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion WeakAuras/Prototypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3557,7 +3557,10 @@ Private.event_prototypes = {
test = "true",
conditionType = "bool",
conditionTest = function(state, needle)
return state and state.show and (select(2, IsUsableSpell(state.spellname)) == (needle == 1));
local _, _, _, powerCost, _, powerIndex = GetSpellInfo(state.spellname)
local power = UnitPower("player" , powerIndex);

return state and state.show and ((power < powerCost) == (needle == 1));
end,
conditionEvents = {
"SPELL_UPDATE_USABLE",
Expand Down

0 comments on commit 401377b

Please sign in to comment.