diff --git a/Condition.lua b/Condition.lua
index 3e91dcf..a9db9a5 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -360,6 +360,13 @@ Ovale.conditions=
end
return compare(nombre, condition[2], condition[3])
end,
+ BuffDuration = function(condition)
+ local name, rank, icon, count, debuffType, duration = UnitBuff("player", Ovale:GetSpellInfoOrNil(condition[1]))
+ if not name then
+ return nil
+ end
+ return compare(duration, condition[2], condition[3])
+ end,
-- Test if a buff will expire on the player after a given time
-- 1 : buff spell id
-- 2 : expiration time
diff --git a/Ovale.lua b/Ovale.lua
index 1ac820e..949fd79 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -1362,6 +1362,13 @@ function Ovale:GetActionInfo(element)
actionUsable, actionShortcut, actionIsCurrent, actionEnable, spellName, target, element.params.nored
end
+local function subTime(time1, duration)
+ if not time1 then
+ return nil
+ else
+ return time1 - duration
+ end
+end
local function addTime(time1, duration)
if not time1 then
diff --git a/Ovale.toc b/Ovale.toc
index 917a35a..1a5be44 100644
--- a/Ovale.toc
+++ b/Ovale.toc
@@ -3,7 +3,7 @@
## Notes: Show the icon of the next spell to cast
## Notes-frFR: Affiche l'icône du prochain sort à lancer
## Author: Sidoine
-## Version: 3.3.32
+## Version: 3.3.33
## OptionalDeps: Ace3, ButtonFacade, Recount, LibBabble-CreatureType-3.0
## SavedVariables: OvaleDB
## SavedVariablesPerCharacter: OvaleDBPC
diff --git a/OvaleCompile.lua b/OvaleCompile.lua
index 783cf6d..a948451 100644
--- a/OvaleCompile.lua
+++ b/OvaleCompile.lua
@@ -241,21 +241,29 @@ local function ParseAddIcon(params, text)
text = string.gsub(text, "(%d+%.?%d*)s", ParseTime)
text = string.gsub(text, "between%s+node(%d+)%s+and%s+node(%d+)", ParseBetween)
text = string.gsub(text, "from%s+node(%d+)%s+until%s+node(%d+)", ParseFromUntil)
- text = string.gsub(text, "node(%d+)%s+and%s+node(%d+)", ParseAnd)
- text = string.gsub(text, "node(%d+)%s+or%s+node(%d+)", ParseOr)
- text = string.gsub(text, "node(%d+)%s+before%s+node(%d+)", ParseBefore)
- text = string.gsub(text, "if%s+node(%d+)%s+node(%d+)",ParseIf)
- text = string.gsub(text, "unless%s+node(%d+)%s+node(%d+)",ParseUnless)
- text = string.gsub(text, "{([node%d ]*)}", ParseGroup)
text = string.gsub(text, "(more)%s+than%s+node(%d+)%s+node(%d+)", ParseCompare)
text = string.gsub(text, "(less)%s+than%s+node(%d+)%s+node(%d+)", ParseCompare)
text = string.gsub(text, "(at least)%s+node(%d+)%s+node(%d+)", ParseCompare)
text = string.gsub(text, "(at most)%s+node(%d+)%s+node(%d+)", ParseCompare)
+ text = string.gsub(text, "node(%d+)%s+before%s+node(%d+)", ParseBefore)
if (was == text) then
break
end
end
+
+ while (1==1) do
+ local was = text
+ text = string.gsub(text, "node(%d+)%s+and%s+node(%d+)", ParseAnd)
+ text = string.gsub(text, "node(%d+)%s+or%s+node(%d+)", ParseOr)
+ text = string.gsub(text, "if%s+node(%d+)%s+node(%d+)",ParseIf)
+ text = string.gsub(text, "unless%s+node(%d+)%s+node(%d+)",ParseUnless)
+ text = string.gsub(text, "{([node%d ]*)}", ParseGroup)
+ if (was == text) then
+ break
+ end
+ end
+
local masterNode
if (text) then
diff --git a/defaut/Chevalier.lua b/defaut/Chevalier.lua
index 38d1666..123bb29 100644
--- a/defaut/Chevalier.lua
+++ b/defaut/Chevalier.lua
@@ -36,6 +36,8 @@ Define(HORNOFWINTER 57330)
Define(STRENGTHOFEARTHTOTEM 8075)
Define(GLYPHOFRAISEDEAD 60200)
Define(BLOODTAP 45529)
+Define(FREEZINGFOG 59052)
+Define(KILLINGMACHINE 51124)
AddCheckBox(rolldes SpellName(GLYPHDISEASE) default glyph=GLYPHDISEASE)
@@ -72,6 +74,8 @@ AddIcon help=main
{TargetDebuffExpires(FROSTFEVER 3 mine=1) or TargetDebuffExpires(BLOODPLAGUE 3 mine=1)}
Spell(PESTILENCE)
+ if BuffPresent(KILLINGMACHINE) Spell(FROSTSTRIKE usable=1)
+
if TargetDebuffPresent(FROSTFEVER mine=1) and TargetDebuffPresent(BLOODPLAGUE mine=1)
{
if TalentPoints(TALENTBLOODYSTRIKES more 0)
@@ -112,8 +116,10 @@ AddIcon help=main
Spell(FROSTSTRIKE usable=1)
if PetPresent(no) and Glyph(RAISEDEAD) Spell(RAISEDEAD)
-
if Mana(more 39) Spell(DEATHCOIL usable=1)
+
+ if BuffPresent(FREEZINGFOG) Spell(HOWLINGBLAST)
+
Spell(HORNOFWINTER priority=2)
unless Runes(frost 1) and Runes(unholy 1) Spell(BLOODTAP)
diff --git a/defaut/Guerrier.lua b/defaut/Guerrier.lua
index 56f8e49..5e26f79 100644
--- a/defaut/Guerrier.lua
+++ b/defaut/Guerrier.lua
@@ -50,7 +50,7 @@ SpellAddTargetDebuff(DEVASTATE SUNDER=30)
SpellAddTargetDebuff(SUNDER SUNDER=30)
SpellAddBuff(BATTLESHOUT BATTLESHOUT=120)
SpellAddBuff(COMMANDSHOUT COMMANDSHOUT=120)
-SpellAddBuff(SLAM SLAMBUFF=0)
+SpellAddBuff(SLAM SLAMBUFF=-1)
SpellInfo(WHIRLWIND cd=8)
SpellInfo(BLOODTHIRST cd=4)
SpellInfo(DEATHWISH cd=180)
@@ -115,8 +115,10 @@ AddIcon help=main
Spell(VICTORY usable=1)
if BuffPresent(SLAMBUFF)
{
- if BuffExpires(SLAMBUFF 2)
+ if BuffExpires(SLAMBUFF 2.5)
Spell(SLAM nored=1)
+ if BuffDuration(SLAMBUFF more 6) and 1s before Spell(BLOODTHIRST) and 1s before Spell(WHIRLWIND)
+ Spell(SLAM)
Spell(SLAM priority=2 nored=1)
}