Add OvalePower.PRIMARY_POWER as a list of power types to wait on.
Johnny C. Lam [04-25-14 - 20:57]
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
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