Quantcast

added SpellList command to create a new spell list to use with Aura conditions

Sidoine De Wispelaere [11-20-10 - 16:45]
added SpellList command to create a new spell list to use with Aura conditions
added Curse, Disease, Magic, and Poison spell lists
now player cc are spell lists
added mine=0 condition (exclude your own auras)
use SetScale to change icon size (compatible with ButtonFacade)
added font scale option

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@333 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Condition.lua
Locale-enUS.lua
Locale-frFR.lua
Locale-zhTW.lua
Ovale.lua
Ovale.toc
OvaleCompile.lua
OvaleFrame.lua
OvaleIcone.lua
defaut/Druide.lua
defaut/Guerrier.lua
diff --git a/Condition.lua b/Condition.lua
index 9bef8c3..a77cc59 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -20,122 +20,17 @@ local totemType =
 	air = 4
 }

-local fearSpellIdList =
-{
-	5782, -- Fear
-	5484, -- Howl of terror
-	5246, -- Intimidating Shout
-	8122, -- Psychic scream
-}
 local fearSpellList = nil
-
-local stunSpellIdList =
-{
-	5211, -- Bash
-	44415, -- Blackout
-	6409, -- Cheap Shot
-	22427, -- Concussion Blow
-	853, -- Hammer of Justice
-	408, -- Kidney Shot
-	12798, -- Revenge Stun
-	46968, -- Shockwave
-}
 local stunSpellList = nil
-
-local incapacitateSpellIdList =
-{
-	6770, -- Sap
-	12540, -- Gouge
-	20066, -- Repentance
-}
 local incapacitateSpellList = nil
-
-local rootSpellIdList =
-{
-	23694, -- Improved Hamstring
-	339, -- Entangling Roots
-	122, -- Frost Nova
-	47168, -- Improved Wing Clip
-}
 local rootSpellList = nil

-local buffSpellList =
-{
-	strengthagility=
-	{
-		6673, -- Battle Shout
-		8076, -- Strength of Earth
-		57330, -- Horn of Winter
-		93435 --Roar of Courage (Cat, Spirit Beast)
-	},
-	stamina =
-	{
-		21562, -- Fortitude TODO: vérifier
-		469, -- Commanding Shout
-		6307 -- Blood Pact
-	},
-	lowerarmor=
-	{
-		58567, -- Sunder Armor (x3)
-		8647, -- Expose Armor
-		91565, -- Faerie Fire (x3)
-		35387, --Corrosive Spit (x3 Serpent)
-		50498 --Tear Armor (x3 Raptor)
-	},
-	magicaldamagetaken=
-	{
-		65142, -- Ebon Plague
-		60433, -- Earth and Moon
-		93068, -- Master Poisoner
-		1490, -- Curse of the Elements
-		34889, --Fire Breath (Dragonhawk)
-		24844 --Lightning Breath (Wind serpent)
-	},
-	-- physicaldamagetaken
-	lowerphysicaldamage=
-	{
-		99, -- Demoralizing Roar
-		702, -- Curse of Weakness
-		1160, -- Demoralizing Shout
-		26017, -- Vindication
-		81130, -- Scarlet Fever
-		50256 --Demoralizing Roar (Bear)
-	},
-	meleeslow=
-	{
-		45477, --Icy Touch
-		58179, --Infected Wounds rank 1
-		58180, --Infected Wounds rank 2
-		68055, --Judgments of the just
-		6343, --Thunderclap
-		8042, --Earth Shock
-		50285 --Dust Cloud (Tallstrider)
-	},
-	bleed=
-	{
-		33876, --Mangle cat
-		33878, --Mangle bear
-		46856, -- Trauma rank 1
-		46857, -- Trauma rank 2
-		16511, --Hemorrhage
-		50271, --Tendon Rip (Hyena)
-		35290 --Gore (Boar)
-	},
-	heroism=
-	{
-		2825, --Bloodlust
-		32182, --Heroism
-		80353, --Time warp
-		90355 -- Ancient Hysteria (Core Hound)
-	}
-}
-
 local function buildRootSpellList()
 	if (rootSpellList) then
 		return
 	end
 	rootSpellList = {}
-	for k, v in pairs(rootSpellIdList) do
+	for k, v in pairs(Ovale.buffSpellList.fear) do
 		rootSpellList[v] = true
 	end
 end
@@ -145,7 +40,7 @@ local function buildStunSpellList()
 		return
 	end
 	stunSpellList = {}
-	for k, v in pairs(stunSpellIdList) do
+	for k, v in pairs(Ovale.buffSpellList.stun) do
 		stunListList[v] = true
 	end
 end
@@ -155,7 +50,7 @@ local function buildIncapacitateSpellList()
 		return
 	end
 	incapacitateSpellList = {}
-	for k, v in pairs(incapacitateSpellIdList) do
+	for k, v in pairs(Ovale.buffSpellList.incapacitate) do
 		incapacitateSpellList[v] = true
 	end
 end
@@ -165,7 +60,7 @@ local function buildFearSpellList()
 		return
 	end
 	fearSpellList = {}
-	for k, v in pairs(fearSpellIdList) do
+	for k, v in pairs(Ovale.buffSpellList.fear) do
 		fearSpellList[v] = true
 	end
 end
@@ -340,16 +235,20 @@ local function GetTargetAura(condition, filter, target)
 		stacks = 1
 	end
 	local spellId = condition[1]
+
+
 	local aura
 	if type(spellId) == "number" then
 		aura = Ovale:GetAura(target, filter, spellId)
-	elseif buffSpellList[spellId] then
-		for k,v in pairs(buffSpellList[spellId]) do
+	elseif Ovale.buffSpellList[spellId] then
+		for k,v in pairs(Ovale.buffSpellList[spellId]) do
 			local newAura = Ovale:GetAura(target, filter, v)
 			if not aura or newAura.stacks>aura.stacks then
 				aura = newAura
 			end
 		end
+	elseif spellId == "Magic" or spellId == "Disease" or spellId=="Curse" or spellId=="Poison" then
+		aura = Ovale:GetAura(target, filter, spellId)
 	else
 		Ovale:Print("ERROR: unknown buff "..spellId)
 		Ovale.bug = true
@@ -360,7 +259,7 @@ local function GetTargetAura(condition, filter, target)
 		Ovale:Print("GetTargetAura = start=".. nilstring(aura.start) .. " end="..nilstring(aura.ending).." stacks=" ..nilstring(aura.stacks).."/"..stacks)
 	end

-	if (not condition.mine or aura.mine) and aura.stacks>=stacks then
+	if (not condition.mine or (aura.mine and condition.mine==1) or (not aura.mine and condition.mine==0)) and aura.stacks>=stacks then
 		local ending
 		if condition.forceduration then
 			if Ovale.spellInfo[spellId] and Ovale.spellInfo[spellId].duration then
@@ -867,7 +766,13 @@ Ovale.conditions=
 	TargetIsCasting = function(condition)
 		local casting
 		local target = getTarget(condition.target)
-		return testbool(UnitCastingInfo(target) or UnitChannelInfo(target), condition[1])
+		local spellId = condition.spell
+		if not spellId then
+			return testbool(UnitCastingInfo(target) or UnitChannelInfo(target), condition[1])
+		else
+			local spellName = GetSpellInfo(spellId)
+			return testbool(UnitCastingInfo(target)==spellName or UnitChannelInfo(target) == spellName, condition[1])
+		end
 	end,
 	TargetIsInterruptible = function(condition)
 		local target = getTarget(condition.target)
diff --git a/Locale-enUS.lua b/Locale-enUS.lua
index 743880c..03b86f1 100644
--- a/Locale-enUS.lua
+++ b/Locale-enUS.lua
@@ -1,14 +1,12 @@
 local AceLocale = LibStub:GetLibrary("AceLocale-3.0")
 local L = AceLocale:NewLocale("Ovale", "enUS", true)
 if not L then return end
-L["Largeur des icônes"] = "Icon width"
-L["La largeur des icônes"] = "The icons width"
-L["Hauteur des icônes"] = "Icon height"
-L["La hauteur des icônes"] = "The icons height"
-L["Largeur des petites icônes"] = "Small icon width"
-L["La largeur des petites icônes"] = "The small icons width"
-L["Hauteur des petites icônes"] = "Small icon height"
-L["La hauteur des petites icônes"] = "The small icons height"
+L["Taille des icônes"] = "Icon scale"
+L["La taille des icônes"] = "The icons scale"
+L["Taille des petites icônes"] = "Small icon scale"
+L["La taille des petites icônes"] = "The small icons scale"
+L["Taille des polices"] = "Font scale"
+L["La taille des polices"] = "The font scale"
 L["En combat uniquement"] = "Show in combat only"
 L["Code"] = "Code"
 L["Afficher la fenêtre"] = "Show Ovale"
diff --git a/Locale-frFR.lua b/Locale-frFR.lua
index 3ceb025..8caab21 100644
--- a/Locale-frFR.lua
+++ b/Locale-frFR.lua
@@ -1,14 +1,12 @@
 local AceLocale = LibStub:GetLibrary("AceLocale-3.0")
 local L = AceLocale:NewLocale("Ovale", "frFR", false)
 if not L then return end
-L["Largeur des icônes"] = true
-L["La largeur des icônes"] = true
-L["Hauteur des icônes"] = true
-L["La hauteur des icônes"] = true
-L["Largeur des petites icônes"] = true
-L["La largeur des petites icônes"] = true
-L["Hauteur des petites icônes"] = true
-L["La hauteur des petites icônes"] = true
+L["Taille des icônes"] = true
+L["La taille des icônes"] = true
+L["Taille des petites icônes"] = true
+L["La taille des petites icônes"] = true
+L["Taille des polices"] = true
+L["La taille des polices"] = true
 L["En combat uniquement"] = true
 L["Code"] = true
 L["Afficher la fenêtre"] = true
diff --git a/Locale-zhTW.lua b/Locale-zhTW.lua
index 147de2d..67ab039 100644
--- a/Locale-zhTW.lua
+++ b/Locale-zhTW.lua
@@ -1,14 +1,12 @@
 local AceLocale = LibStub:GetLibrary("AceLocale-3.0")
 local L = AceLocale:NewLocale("Ovale", "zhTW", true)
 if not L then return end
-L["Largeur des icônes"] = "圖示寬度"
-L["La largeur des icônes"] = "調整圖示寬度"
-L["Hauteur des icônes"] = "圖示高度"
-L["La hauteur des icônes"] = "調整圖示高度"
-L["Largeur des petites icônes"] = "小圖示寬度"
-L["La largeur des petites icônes"] = "調整小圖示寬度"
-L["Hauteur des petites icônes"] = "小圖示高度"
-L["La hauteur des petites icônes"] = "調整小圖示高度"
+L["Taille des icônes"] = "圖示寬度"
+L["La taille des icônes"] = "調整圖示寬度"
+L["Taille des petites icônes"] = "小圖示寬度"
+L["La taille des petites icônes"] = "調整小圖示寬度"
+L["Taille des polices"] = "Font scale"
+L["La taille des polices"] = "The font scale"
 L["En combat uniquement"] = "在戰鬥中顯示"
 L["Code"] = "守則"
 L["Afficher la fenêtre"] = "顯示窗口"
diff --git a/Ovale.lua b/Ovale.lua
index e7b0464..f219a5a 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -70,6 +70,108 @@ Ovale.counter = {}
 --the result is computed by the simulator, allowing to ignore lag or missile travel time
 Ovale.lastSpell = {}

+Ovale.buffSpellList =
+{
+	fear =
+	{
+		5782, -- Fear
+		5484, -- Howl of terror
+		5246, -- Intimidating Shout
+		8122, -- Psychic scream
+	},
+	root =
+	{
+		23694, -- Improved Hamstring
+		339, -- Entangling Roots
+		122, -- Frost Nova
+		47168, -- Improved Wing Clip
+	},
+	incapacitate =
+	{
+		6770, -- Sap
+		12540, -- Gouge
+		20066, -- Repentance
+	},
+	stun =
+	{
+		5211, -- Bash
+		44415, -- Blackout
+		6409, -- Cheap Shot
+		22427, -- Concussion Blow
+		853, -- Hammer of Justice
+		408, -- Kidney Shot
+		46968, -- Shockwave
+	},
+	strengthagility=
+	{
+		6673, -- Battle Shout
+		8076, -- Strength of Earth
+		57330, -- Horn of Winter
+		93435 --Roar of Courage (Cat, Spirit Beast)
+	},
+	stamina =
+	{
+		21562, -- Fortitude TODO: vérifier
+		469, -- Commanding Shout
+		6307 -- Blood Pact
+	},
+	lowerarmor=
+	{
+		58567, -- Sunder Armor (x3)
+		8647, -- Expose Armor
+		91565, -- Faerie Fire (x3)
+		35387, --Corrosive Spit (x3 Serpent)
+		50498 --Tear Armor (x3 Raptor)
+	},
+	magicaldamagetaken=
+	{
+		65142, -- Ebon Plague
+		60433, -- Earth and Moon
+		93068, -- Master Poisoner
+		1490, -- Curse of the Elements
+		34889, --Fire Breath (Dragonhawk)
+		24844 --Lightning Breath (Wind serpent)
+	},
+	-- physicaldamagetaken
+	lowerphysicaldamage=
+	{
+		99, -- Demoralizing Roar
+		702, -- Curse of Weakness
+		1160, -- Demoralizing Shout
+		26017, -- Vindication
+		81130, -- Scarlet Fever
+		50256 --Demoralizing Roar (Bear)
+	},
+	meleeslow=
+	{
+		45477, --Icy Touch
+		58179, --Infected Wounds rank 1
+		58180, --Infected Wounds rank 2
+		68055, --Judgments of the just
+		6343, --Thunderclap
+		8042, --Earth Shock
+		50285 --Dust Cloud (Tallstrider)
+	},
+	bleed=
+	{
+		33876, --Mangle cat
+		33878, --Mangle bear
+		46856, -- Trauma rank 1
+		46857, -- Trauma rank 2
+		16511, --Hemorrhage
+		50271, --Tendon Rip (Hyena)
+		35290 --Gore (Boar)
+	},
+	heroism=
+	{
+		2825, --Bloodlust
+		32182, --Heroism
+		80353, --Time warp
+		90355 -- Ancient Hysteria (Core Hound)
+	}
+}
+
+
 --Key bindings
 BINDING_HEADER_OVALE = "Ovale"
 BINDING_NAME_OVALE_CHECKBOX0 = L["Inverser la boîte à cocher "].."(1)"
@@ -102,7 +204,7 @@ local options =
 						Ovale.db.profile.apparence.enCombat = v
 						Ovale:UpdateVisibility()
 					end,
-					width = full
+					width = "full"
 				},
 				targetOnly =
 				{
@@ -116,39 +218,39 @@ local options =
 						Ovale.db.profile.apparence.avecCible = v
 						Ovale:UpdateVisibility()
 					end,
-					width = full
+					width = "full"
 				},
-				iconWidth =
+				iconScale =
 				{
 					order = 2,
 					type = "range",
-					name = L["Largeur des icônes"],
-					desc = L["La largeur des icônes"],
-					min = 16, max = 256, step = 2,
-					get = function(info) return Ovale.db.profile.apparence.iconWidth end,
-					set = function(info,value) Ovale.db.profile.apparence.iconWidth = value; Ovale:UpdateFrame() end
+					name = L["Taille des icônes"],
+					desc = L["La taille des icônes"],
+					min = 0.1, max = 16, step = 0.1,
+					get = function(info) return Ovale.db.profile.apparence.iconScale end,
+					set = function(info,value) Ovale.db.profile.apparence.iconScale = value; Ovale:UpdateFrame() end
 				},
-				iconHeight =
+				fontScale =
 				{
 					order = 3,
 					type = "range",
-					name = L["Hauteur des icônes"],
-					desc = L["La hauteur des icônes"],
-					min = 16, max = 256, step = 2,
-					get = function(info) return Ovale.db.profile.apparence.iconHeight end,
-					set = function(info,value) Ovale.db.profile.apparence.iconHeight = value; Ovale:UpdateFrame() end
+					name = L["Taille des polices"],
+					desc = L["La taille des polices"],
+					min = 0.1, max = 2, step = 0.1,
+					get = function(info) return Ovale.db.profile.apparence.fontScale end,
+					set = function(info,value) Ovale.db.profile.apparence.fontScale = value; Ovale:UpdateFrame() end
 				},
-				smallIconWidth =
+				smallIconScale =
 				{
 					order = 4,
 					type = "range",
-					name = L["Largeur des petites icônes"],
-					desc = L["La largeur des petites icônes"],
-					min = 16, max = 256, step = 2,
-					get = function(info) return Ovale.db.profile.apparence.smallIconWidth end,
-					set = function(info,value) Ovale.db.profile.apparence.smallIconWidth = value; Ovale:UpdateFrame() end
+					name = L["Taille des petites icônes"],
+					desc = L["La taille des petites icônes"],
+					min = 0.1, max = 16, step = 0.1,
+					get = function(info) return Ovale.db.profile.apparence.smallIconScale end,
+					set = function(info,value) Ovale.db.profile.apparence.smallIconScale = value; Ovale:UpdateFrame() end
 				},
-				smallIconHeight =
+				--[[smallIconHeight =
 				{
 					order = 5,
 					type = "range",
@@ -157,7 +259,7 @@ local options =
 					min = 16, max = 256, step = 2,
 					get = function(info) return Ovale.db.profile.apparence.smallIconHeight end,
 					set = function(info,value) Ovale.db.profile.apparence.smallIconHeight = value; Ovale:UpdateFrame() end
-				},
+				},]]
 				margin =
 				{
 					order = 5.5,
@@ -718,11 +820,11 @@ function Ovale:UNIT_AURA(event, unit)
 			self.buff[spellId].lastSeen = Ovale.maintenant
 			self.buff[spellId].present = true

-			if spellId == 24907 or 2895 then --moonkin aura / wrath of air
+			if spellId == 24907 or spellId == 2895 then --moonkin aura / wrath of air
 				hateSorts = 5 --add shadow form?
 			elseif spellId == 8515 or spellId == 55610 or spellId == 53290 then --windfury / improved icy talons / hunting party
 				hateCaC = 10
-			elseif spellId == 2825 or 32182 then --bloodlust / heroism
+			elseif spellId == 2825 or spellId == 32182 then --bloodlust / heroism
 				hateHero = 30
 			elseif spellId == 53657 then --judgements of the pure
 				hateClasse = 9
@@ -800,13 +902,14 @@ function Ovale:SendScoreToDamageMeter(name, guid, scored, scoreMax)
 		end
 	end
 	if Skada then
-		if not guid then return end
-		local player = Skada:get_player(Skada.current, guid, name)
+		if not guid or not Skada.current or not Skada.total then return end
+		local player = Skada:get_player(Skada.current, guid, nil)
+		if not player then return end
 		if not player.ovale then player.ovale = 0 end
 		if not player.ovaleMax then player.ovaleMax = 0 end
 		player.ovale = player.ovale + scored
 		player.ovaleMax = player.ovaleMax + scoreMax
-		player = Skada:get_player(Skada.total, guid, name)
+		player = Skada:get_player(Skada.total, guid, nil)
 		player.ovale = player.ovale + scored
 		player.ovaleMax = player.ovaleMax + scoreMax
 	end
@@ -1059,7 +1162,7 @@ function Ovale:GetAura(target, filter, spellId, forceduration)
 		if not name then
 			break
 		end
-		if (unitCaster=="player" or not myAura.mine) and spellId == thisSpellId then
+		if (unitCaster=="player" or not myAura.mine) and (spellId == thisSpellId or spellId == debuffType) then
 			myAura.mine = (unitCaster == "player")
 			myAura.start = expirationTime - duration

@@ -1921,8 +2024,8 @@ function Ovale:ChargerDefaut()
 			top = 500,
 			check = {},
 			list = {},
-			apparence = {enCombat=false, iconWidth = 64, iconHeight = 64, margin = 4,
-				smallIconWidth=28, smallIconHeight=28, raccourcis=true, numeric=false, avecCible = false,
+			apparence = {enCombat=false, iconScale = 2, margin = 4, fontScale = 0.5,
+				smallIconScale=1, raccourcis=true, numeric=false, avecCible = false,
 				verrouille = false, vertical = false, predictif=false, highlightIcon = true, clickThru = false,
 				latencyCorrection=true, hideVehicule=true, flashIcon=true},
 			skin = {SkinID="Blizzard", Backdrop = true, Gloss = false, Colors = {}}
diff --git a/Ovale.toc b/Ovale.toc
index f152bfd..b1c2edf 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: 4.0.17
+## Version: 4.0.18
 ## OptionalDeps: Ace3, ButtonFacade, Recount, Skada, LibBabble-CreatureType-3.0
 ## SavedVariables: OvaleDB
 ## SavedVariablesPerCharacter: OvaleDBPC
diff --git a/OvaleCompile.lua b/OvaleCompile.lua
index 4fc9ead..70bd472 100644
--- a/OvaleCompile.lua
+++ b/OvaleCompile.lua
@@ -137,6 +137,15 @@ local function ParseScoreSpells(params)
 	end
 end

+local function ParseSpellList(name, params)
+	Ovale.buffSpellList[name] = {}
+	local i = 1
+	for v in string.gmatch(params, "(%d+)") do
+		Ovale.buffSpellList[name][i] = tonumber(v)
+		i = i + 1
+	end
+end
+
 local function ParseIf(a, b)
 	local newNode = {type="if", a=node[tonumber(a)], b=node[tonumber(b)]}
 	return AddNode(newNode)
@@ -377,6 +386,7 @@ function Ovale:Compile(text)
 	text = string.gsub(text, "SpellAddTargetDebuff%s*%((.-)%)", ParseSpellAddTargetDebuff)
 	text = string.gsub(text, "SpellInfo%s*%((.-)%)", ParseSpellInfo)
 	text = string.gsub(text, "ScoreSpells%s*%((.-)%)", ParseScoreSpells)
+	text = string.gsub(text, "SpellList%s*%(%s*(%w+)%s*(.-)%)", ParseSpellList)

 	-- On vire les espaces en trop
 	text = string.gsub(text, "\n", " ")
diff --git a/OvaleFrame.lua b/OvaleFrame.lua
index 1481e9c..1f18fb2 100644
--- a/OvaleFrame.lua
+++ b/OvaleFrame.lua
@@ -192,9 +192,9 @@ do
 				elseif top>1 then
 					top = 1
 				end
-				action.icons[1]:SetPoint("TOPLEFT",self.frame,"TOPLEFT",action.left + top*action.dx,action.top - top*action.dy)
+				action.icons[1]:SetPoint("TOPLEFT",self.frame,"TOPLEFT",(action.left + top*action.dx)/action.scale,(action.top - top*action.dy)/action.scale)
 				if action.icons[2] then
-					action.icons[2]:SetPoint("TOPLEFT",self.frame,"TOPLEFT",action.left + (top+1)*action.dx,action.top - (top+1)*action.dy)
+					action.icons[2]:SetPoint("TOPLEFT",self.frame,"TOPLEFT",(action.left + (top+1)*action.dx)/action.scale,(action.top - (top+1)*action.dy)/action.scale)
 				end
 			end

@@ -268,38 +268,39 @@ do
 			end
 			local action = self.actions[k]

-			local width, height
+			local width, height, newScale
 			local nbIcons
 			if (node.params.size == "small") then
-				width = Ovale.db.profile.apparence.smallIconWidth + margin
-				height = Ovale.db.profile.apparence.smallIconHeight + margin
+				newScale = Ovale.db.profile.apparence.smallIconScale
+				width = newScale * 36 + margin
+				height = newScale * 36 + margin
 				nbIcons = 1
 			else
-				width = Ovale.db.profile.apparence.iconWidth + margin
-				height = Ovale.db.profile.apparence.iconHeight + margin
+				newScale = Ovale.db.profile.apparence.iconScale
+				width =newScale * 36 + margin
+				height = newScale * 36 + margin
 				if Ovale.db.profile.apparence.predictif then
 					nbIcons = 2
 				else
 					nbIcons = 1
 				end
 			end
-			if (top + height > Ovale.db.profile.apparence.iconHeight + margin) then
+			if (top + height > Ovale.db.profile.apparence.iconScale * 36 + margin) then
 				top = 0
 				left = maxWidth
 			end

-			action.width = width - margin
-			action.height = height - margin
+			action.scale = newScale
 			if (Ovale.db.profile.apparence.vertical) then
 				action.left = top
 				action.top = -left-BARRE-margin
-				action.dx = action.width
+				action.dx = width
 				action.dy = 0
 			else
 				action.left = left
 				action.top = -top-BARRE-margin
 				action.dx = 0
-				action.dy = action.height
+				action.dy = height
 			end

 			for l=1,nbIcons do
@@ -307,8 +308,9 @@ do
 					action.icons[l] = CreateFrame("CheckButton", "Icon"..k.."n"..l,self.frame,"OvaleIcone");
 				end
 				local icon = action.icons[l]
-				icon:SetPoint("TOPLEFT",self.frame,"TOPLEFT",action.left + (l-1)*action.dx,action.top - (l-1)*action.dy)
-				icon:SetSize(action.width, action.height)
+				icon:SetPoint("TOPLEFT",self.frame,"TOPLEFT",(action.left + (l-1)*action.dx)/action.scale,(action.top - (l-1)*action.dy)/action.scale)
+				icon:SetScale(action.scale)
+				icon:SetFontScale(Ovale.db.profile.apparence.fontScale)
 				icon:SetHelp(node.params.help)
 				icon:EnableMouse(not Ovale.db.profile.apparence.clickThru)

diff --git a/OvaleIcone.lua b/OvaleIcone.lua
index 7f6d352..d832c62 100644
--- a/OvaleIcone.lua
+++ b/OvaleIcone.lua
@@ -146,21 +146,29 @@ local function SetSkinGroup(self, _skinGroup)
 	self.skinGroup:AddButton(self)
 end

-local function SetSize(self, width, height)
-	self:SetWidth(width)
-	self:SetHeight(height)
-	if (not LBF) then
-		self.normalTexture:SetWidth(width*66/36)
-		self.normalTexture:SetHeight(height*66/36)
-		self.shortcut:SetWidth(width)
-		self.remains:SetWidth(width)
-	end
+local function SetSize(self, scale)
+--	if not LBF then
+--		self:SetWidth(width)
+--		self:SetHeight(height)
+--		self.normalTexture:SetWidth(width*66/36)
+--		self.normalTexture:SetHeight(height*66/36)
+--
+--		self.remains:SetWidth(width)
+--	else
+		--self:SetScale(width/32)
+--	end
 end

 local function SetHelp(self, help)
 	self.help = help
 end

+local function SetFontScale(self, scale)
+	self.fontScale = scale
+	self.shortcut:SetFont(self.fontName, self.fontHeight * self.fontScale, self.fontFlags)
+	self.aPortee:SetFont(self.fontName, self.fontHeight * self.fontScale, self.fontFlags)
+end
+
 function OvaleIcone_OnClick(self)
 	Ovale:ToggleOptions()
 	self:SetChecked(0)
@@ -198,6 +206,11 @@ function OvaleIcone_OnLoad(self)
 	self.cd = _G[name.."Cooldown"]
 	self.normalTexture = _G[name.."NormalTexture"]

+	local fontName, fontHeight, fontFlags = self.shortcut:GetFont()
+	self.fontName = fontName
+	self.fontHeight = fontHeight
+	self.fontFlags = fontFlags
+
 	self.focusText = self:CreateFontString(nil, "OVERLAY");
 	self.focusText:SetFontObject("GameFontNormal");
 	self.focusText:SetAllPoints(self);
@@ -209,6 +222,7 @@ function OvaleIcone_OnLoad(self)
 	self.Update = Update
 	self.SetSize = SetSize
 	self.SetHelp = SetHelp
+	self.SetFontScale = SetFontScale
 	if Ovale.db.profile.clickThru then
 		self:EnableMouse(false)
 	end
diff --git a/defaut/Druide.lua b/defaut/Druide.lua
index 53a5cc7..de3fadd 100644
--- a/defaut/Druide.lua
+++ b/defaut/Druide.lua
@@ -159,7 +159,7 @@ AddIcon help=main mastery=2
 		if TargetDebuffPresent(LACERATE stacks=3)
 			Spell(PULVERIZE)

-		if CheckBoxOn(lucioles) and TargetDebuffExpires(lowerarmor 2) and TargetDebuffExpires(FAERIEFIREDEBUFF stacks=3)
+		if CheckBoxOn(lucioles) and TargetDebuffExpires(lowerarmor 2 mine=0) and TargetDebuffExpires(FAERIEFIREDEBUFF 3 stacks=3)
 			Spell(FAERIEFERAL)

 		if CheckBoxOn(demo) and TargetDebuffExpires(lowerphysicaldamage 2)
@@ -176,7 +176,7 @@ AddIcon help=main mastery=2
 	{
 		if BuffPresent(STAMPEDE) Spell(RAVAGE)

-		if CheckBoxOn(lucioles) and	TargetDebuffExpires(lowerarmor 2) and TargetDebuffExpires(FAERIEFIREDEBUFF stacks=3) and TargetDeadIn(more 15)
+		if CheckBoxOn(lucioles) and	TargetDebuffExpires(lowerarmor 2 mine=0) and TargetDebuffExpires(FAERIEFIREDEBUFF 3 stacks=3) and TargetDeadIn(more 15)
 			Spell(FAERIEFERAL)

 		#De-synchronize Roar and Rip if are both present but will expire with less than 6 seconds between
diff --git a/defaut/Guerrier.lua b/defaut/Guerrier.lua
index cad04a7..9e5e27a 100644
--- a/defaut/Guerrier.lua
+++ b/defaut/Guerrier.lua
@@ -94,7 +94,7 @@ AddIcon help=main mastery=1
 	if List(shout command) and {Mana(less 20) or BuffExpires(stamina 3)} Spell(COMMANDINGSHOUT nored=1)
     if List(shout battle) and {Mana(less 20) or BuffExpires(strengthagility 3)} Spell(BATTLESHOUT nored=1)
 	if TargetClassification(worldboss) and CheckBoxOn(demo) and TargetDebuffExpires(lowerphysicaldamage 2) Spell(DEMOSHOUT nored=1)
-	if TargetDebuffExpires(SUNDERARMORDEBUFF 2 stacks=3) and CheckBoxOn(sunder) and TargetDebuffExpires(lowerarmor 2) Spell(SUNDERARMOR nored=1)
+	if TargetDebuffExpires(SUNDERARMORDEBUFF 3 stacks=3) and CheckBoxOn(sunder) and TargetDebuffExpires(lowerarmor 2 mine=0) Spell(SUNDERARMOR nored=1)

 	if Mana(less 20) Spell(DEADLYCALM)
 	if TargetDebuffExpires(RENDDEBUFF) Spell(REND)
@@ -111,7 +111,7 @@ AddIcon help=main mastery=2
 	if List(shout command) and {Mana(less 20) or BuffExpires(stamina 3)} Spell(COMMANDINGSHOUT nored=1)
     if List(shout battle) and {Mana(less 20) or BuffExpires(strengthagility 3)} Spell(BATTLESHOUT nored=1)
 	if TargetClassification(worldboss) and CheckBoxOn(demo) and TargetDebuffExpires(lowerphysicaldamage 2) Spell(DEMOSHOUT nored=1)
-	if TargetDebuffExpires(SUNDERARMORDEBUFF 2 stacks=3) and CheckBoxOn(sunder) and TargetDebuffExpires(lowerarmor 2) Spell(SUNDERARMOR nored=1)
+	if TargetDebuffExpires(SUNDERARMORDEBUFF 3 stacks=3) and CheckBoxOn(sunder) and TargetDebuffExpires(lowerarmor 2 mine=0) Spell(SUNDERARMOR nored=1)

 	if CheckBoxOn(multi) Spell(WHIRLWIND)
 	Spell(COLOSSUSSMASH)