Add RunicPowerCost(spellId) to get runic power needed to cast a spell.
Johnny C. Lam [06-06-14 - 21:12]
Add RunicPowerCost(spellId) to get runic power needed to cast a spell.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1520 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/conditions/PowerCost.lua b/conditions/PowerCost.lua
index b7f113a..ea38e41 100644
--- a/conditions/PowerCost.lua
+++ b/conditions/PowerCost.lua
@@ -77,8 +77,22 @@ do
return PowerCost("rage", condition)
end
+ --- Get the amount of runic power required to cast the given spell.
+ -- @name RunicPowerCost
+ -- @paramsig number or boolean
+ -- @param id The spell ID.
+ -- @param operator Optional. Comparison operator: less, atMost, equal, atLeast, more.
+ -- @param number Optional. The number to compare against.
+ -- @return The amount of runic power.
+ -- @return A boolean value for the result of the comparison.
+
+ local function RunicPowerCost(condition)
+ return PowerCost("runicpower", condition)
+ end
+
OvaleCondition:RegisterCondition("energycost", true, EnergyCost)
OvaleCondition:RegisterCondition("focuscost", true, FocusCost)
OvaleCondition:RegisterCondition("manacost", true, ManaCost)
OvaleCondition:RegisterCondition("ragecost", true, RageCost)
-end
\ No newline at end of file
+ OvaleCondition:RegisterCondition("runicpowercost", true, RunicPowerCost)
+end