From 15363fce6ab79d27f4f2ff1eea78b2e114ba559e Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Sun, 5 Dec 2010 15:31:17 +0000 Subject: [PATCH] Added SoulShards function git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@339 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Condition.lua | 3 +++ Ovale.lua | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/Condition.lua b/Condition.lua index 90e5785..98932fa 100644 --- a/Condition.lua +++ b/Condition.lua @@ -660,6 +660,9 @@ Ovale.conditions= end return maxCD end, + SoulShards = function(condition) + return compare(Ovale.state.shard, condition[1], condition[2]) + end, Speed = function(condition) return compare(GetUnitSpeed("player")*100/7, condition[1], condition[2]) end, diff --git a/Ovale.lua b/Ovale.lua index aa1d0cc..ab5826b 100644 --- a/Ovale.lua +++ b/Ovale.lua @@ -1308,6 +1308,14 @@ function Ovale:AddSpellToStack(spellId, startCast, endCast, nextCast, nocd) self.state.holy = 3 end end + if newSpellInfo.shard then + self.state.shard = self.state.shard + newSpellInfo.shard + if self.state.shard < 0 then + self.state.shard = 0 + elseif self.state.shard > 3 then + self.state.shard = 3 + end + end end end @@ -1414,6 +1422,7 @@ function Ovale:InitCalculerMeilleureAction() self.attenteFinCast = Ovale.maintenant self.state.combo = GetComboPoints("player") self.state.mana = UnitPower("player") + self.state.shard = UnitPower("player", 7) self.state.eclipse = UnitPower("player", 8) self.state.holy = UnitPower("player", 9) if self.className == "DEATHKNIGHT" then -- 1.7.9.5