From 7977936bc9735818b29dafdf85e165fa74b33eec Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Fri, 25 Apr 2014 20:57:12 +0000 Subject: [PATCH] Add OvalePower.PRIMARY_POWER as a list of power types to wait on. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1330 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleBestAction.lua | 2 +- OvalePower.lua | 28 ++++++++++++++++++++-------- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua index e7f6e61..58a4fbf 100644 --- a/OvaleBestAction.lua +++ b/OvaleBestAction.lua @@ -748,7 +748,7 @@ function OvaleBestAction:GetActionInfo(element, state) return nil end end - for _, powerType in pairs(OvalePower.SECONDARY_POWER) do + for powerType in pairs(OvalePower.SECONDARY_POWER) do if si[powerType] then -- Spell requires "secondary" resources, e.g., chi, focus, rage, etc., local cost = state:PowerCost(spellId, powerType) diff --git a/OvalePower.lua b/OvalePower.lua index 7225d25..9029fc2 100644 --- a/OvalePower.lua +++ b/OvalePower.lua @@ -68,15 +68,27 @@ OvalePower.POWER_INFO = shards = { id = SPELL_POWER_SOUL_SHARDS, token = "SOUL_SHARDS_POWER", mini = 0 }, } OvalePower.SECONDARY_POWER = { - "burningembers", - "chi", - "demonicfury", - "focus", - "holy", - "rage", - "shadoworbs", - "shards", + alternate = true, + burningembers = true, + chi = true, + demonicfury = true, + focus = true, + holy = true, + rage = true, + shadoworbs = true, + shards = true, } +OvalePower.PRIMARY_POWER = {} +do + for powerType in pairs(OvalePower.POWER_INFO) do + if not OvalePower.SECONDARY_POWER[powerType] then + -- Eclipse has special semantics; it's not a cost/generated resource. + if powerType ~= "eclipse" then + OvalePower.PRIMARY_POWER[powerType] = true + end + end + end +end OvalePower.POWER_TYPE = {} do for powerType, v in pairs(OvalePower.POWER_INFO) do -- 1.7.9.5