From 57f742614b61f40f7aa8090f9ffd29bc76b0ca10 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Thu, 15 May 2014 23:18:06 +0000 Subject: [PATCH] Script conditions use death=0 or death=1, not death=none or death=any. Support using either notation to specify the death rune condition. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1446 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleRunes.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OvaleRunes.lua b/OvaleRunes.lua index 6ed1061..dc23e0f 100644 --- a/OvaleRunes.lua +++ b/OvaleRunes.lua @@ -383,7 +383,7 @@ statePrototype.RuneCount = function(state, name, deathCondition, atTime) local startCooldown, endCooldown = math.huge, math.huge local runeType = RUNE_TYPE[name] if runeType ~= DEATH_RUNE then - if deathCondition == "any" then + if deathCondition == "any" or deathCondition == 1 then -- Match runes of the given type or any death runes. for slot, rune in ipairs(state.rune) do if rune.type == runeType or rune.type == DEATH_RUNE then @@ -398,7 +398,7 @@ statePrototype.RuneCount = function(state, name, deathCondition, atTime) -- Match only the runes of the given type. for _, slot in ipairs(RUNE_SLOTS[runeType]) do local rune = state.rune[slot] - if not deathCondition or (deathCondition == "none" and rune.type ~= DEATH_RUNE) then + if not deathCondition or ((deathCondition == "none" or deathCondition == 0) and rune.type ~= DEATH_RUNE) then if rune:IsActiveRune(atTime) then count = count + 1 elseif rune.endCooldown < endCooldown then @@ -467,7 +467,7 @@ do end end -- Use death runes of the matching rune type to meet the count requirements. - if deathCondition ~= "none" then + if deathCondition ~= "none" and deathCondition ~= 0 then for slot, rune in ipairs(state.rune) do if rune.type == DEATH_RUNE then local runeType = rune.slotType @@ -485,7 +485,7 @@ do end -- Use death runes of any type to meet any remaining count requirements. - if deathCondition == "any" then + if deathCondition == "any" or deathCondition == 1 then for _, slot in ipairs(DEATH_RUNE_PRIORITY) do local rune = state.rune[slot] local runeType = DEATH_RUNE -- 1.7.9.5