Quantcast

fixes for arm warrior script

Sidoine De Wispelaere [01-26-11 - 19:06]
fixes for arm warrior script
added Ovale:SetCheckBox
updated with last mage and priest scripts from contributors

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@349 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Ovale.lua
Ovale.toc
defaut/Guerrier.lua
defaut/Mage.lua
defaut/Pretre.lua
diff --git a/Ovale.lua b/Ovale.lua
index a8ebd69..185b87a 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -2272,6 +2272,17 @@ function Ovale:EnableOtherDebuffs()
 	self.otherDebuffsEnabled = true
 end

+function Ovale:SetCheckBox(v,on)
+	for k,checkBox in pairs(self.casesACocher) do
+		if v==0 then
+			self.checkBoxes[k]:SetValue(on)
+			self.db.profile.check[k] = on
+			break
+		end
+		v = v - 1
+	end
+end
+
 function Ovale:ToggleCheckBox(v)
 	for k,checkBox in pairs(self.casesACocher) do
 		if v==0 then
diff --git a/Ovale.toc b/Ovale.toc
index 1385048..1289371 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.22
+## Version: 4.0.23
 ## OptionalDeps: Ace3, ButtonFacade, Recount, Skada, LibBabble-CreatureType-3.0
 ## SavedVariables: OvaleDB
 ## SavedVariablesPerCharacter: OvaleDBPC
diff --git a/defaut/Guerrier.lua b/defaut/Guerrier.lua
index 67122f3..e536f50 100644
--- a/defaut/Guerrier.lua
+++ b/defaut/Guerrier.lua
@@ -107,15 +107,15 @@ AddIcon help=main mastery=1
 		if BuffExpires(SWEEPINGSTRIKES) and BuffExpires(DEADLYCALM) Spell(BLADESTORM)
 		Spell(CLEAVE)
 	}
-	if BuffExpires(TASTEFORBLOOD 1.5) Spell(OVERPOWER)
+	if BuffExpires(TASTEFORBLOOD 1.5) and BuffPresent(TASTEFORBLOOD) Spell(OVERPOWER)
 	if TargetDebuffExpires(RENDDEBUFF) Spell(REND)
 	Spell(COLOSSUSSMASH)
 	Spell(MORTALSTRIKE)
 	#overpower,if=!buff.lambs_to_the_slaughter.up&rage>35&target.health_pct<20
 	if BuffExpires(SLAUGHTER 0) and Mana(more 35) and TargetLifePercent(less 20)
-		Spell(OVERPOWER)
+		Spell(OVERPOWER usable=1)
     if TargetLifePercent(less 20) Spell(EXECUTE)
-	Spell(OVERPOWER)
+	Spell(OVERPOWER usable=1)
 	unless 1.5s before Spell(MORTALSTRIKE) Spell(SLAM)
 }

diff --git a/defaut/Mage.lua b/defaut/Mage.lua
index b5183a0..990aec7 100644
--- a/defaut/Mage.lua
+++ b/defaut/Mage.lua
@@ -69,6 +69,8 @@ Define(SHADOWANDFLAME 17800)

 #Talent
 Define(FIRESTARTERTALENT 11431)
+Define(CRITICALMASSTALENT 10541)
+Define(IMPROVEDSCORCH 10547)

 #CheckBoxes
 AddListItem(fb fb SpellName(FIREBALL) default)
@@ -106,7 +108,7 @@ AddIcon help=main mastery=2
 {
     unless InCombat() if BuffExpires(MAGEARMOR 400) and BuffExpires(MOLTENARMOR 400) and BuffExpires(ICEARMOR 400) Spell(MOLTENARMOR)

-    if TargetDebuffExpires(CRITICALMASS) and TargetDebuffExpires(SHADOWANDFLAME) Spell(SCORCH)
+    if TalentPoints(CRITICALMASSTALENT more 0) and TargetDebuffExpires(CRITICALMASS) and TargetDebuffExpires(SHADOWANDFLAME) Spell(SCORCH)
     if TargetDebuffPresent(LIVINGBOMB mine=1) and TargetDebuffPresent(IGNITE mine=1)
             and TargetDebuffPresent(PYROBLAST mine=1)
         Spell(COMBUSTION)
@@ -118,12 +120,12 @@ AddIcon help=main mastery=2
     if List(fb ffb) and TargetDeadIn(less 60) Spell(FROSTFIREBOLT)
     if List(fb fb) and ManaPercent(more 39) Spell(FIREBALL)
     if List(fb ffb) and ManaPercent(more 39) Spell(FROSTFIREBOLT)
-    if ManaPercent(less 95)
+    if ManaPercent(less 95) and TalentPoints(IMPROVEDSCORCH more 0)
     {
            unless 60s before Spell(EVOCATION) Spell(SCORCH)
     }
     Spell(EVOCATION)
-    Spell(SCORCH)
+    if TalentPoints(IMPROVEDSCORCH more 0) Spell(SCORCH)
 }

 AddIcon help=main mastery=3
diff --git a/defaut/Pretre.lua b/defaut/Pretre.lua
index 865c32f..a47a1a8 100644
--- a/defaut/Pretre.lua
+++ b/defaut/Pretre.lua
@@ -130,7 +130,7 @@ AddIcon help=main mastery=3
 AddIcon help=cd
 {
         #Check that you won't have to reapply dots during DA
-	if BuffPresent(EVANGELISM stacks=5) and TargetDebuffPresent(DEVOURINGPLAGUE 18 mine=1) and TargetDebuffPresent(VAMPIRICTOUCH 18 mine=1) Spell(ARCHANGEL)
+	if BuffPresent(EVANGELISM stacks=5) and TargetDebuffPresent(DEVOURINGPLAGUE 18 mine=1) and TargetDebuffPresent(VAMPIRICTOUCH 13 mine=1) Spell(ARCHANGEL)
 	Item(Trinket0Slot usable=1)
 	Item(Trinket1Slot usable=1)
 }