Added SoulShards function
Sidoine De Wispelaere [12-05-10 - 15:31]
Added SoulShards function
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@339 d5049fe3-3747-40f7-a4b5-f36d6801af5f
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