- conditionally removed unused checkbox and list items (talent and glyph parameters)
Sidoine De Wispelaere [01-10-10 - 13:21]
- conditionally removed unused checkbox and list items (talent and glyph parameters)
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@195 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleCompile.lua b/OvaleCompile.lua
index af0fb16..e0a303e 100644
--- a/OvaleCompile.lua
+++ b/OvaleCompile.lua
@@ -193,19 +193,29 @@ local function subtest(text, pattern, func)
end
local function ParseAddListItem(list,item,text, default)
+ local paramList = ParseParameters(params)
+ if (paramList.talent and not HasTalent(paramList.talent)) or
+ (paramList.glyph and not HasGlyph(paramList.glyph)) then
+ return ""
+ end
if (not Ovale.listes[list]) then
Ovale.listes[list] = {items={},default=nil}
end
Ovale.listes[list].items[item] = text
- if default == "default" then
+ if paramList[1] == "default" then
Ovale.listes[list].default=item
end
return ""
end
-local function ParseAddCheckBox(item, text, checked)
+local function ParseAddCheckBox(item, text, params)
+ local paramList = ParseParameters(params)
+ if (paramList.talent and not HasTalent(paramList.talent)) or
+ (paramList.glyph and not HasGlyph(paramList.glyph)) then
+ return ""
+ end
Ovale.casesACocher[item] = {text = text}
- if checked=="checked" then
+ if paramList[1]=="checked" then
Ovale.casesACocher[item].checked = true
end
return ""
diff --git a/defaut/Chaman.lua b/defaut/Chaman.lua
index 1652d1a..b10b802 100644
--- a/defaut/Chaman.lua
+++ b/defaut/Chaman.lua
@@ -19,6 +19,7 @@ Define(FERALSPIRIT 51533)
Define(HEROISM 32182)
Define(BLOODLUST 2825)
Define(TALENTFLURRY 602)
+Define(TALENTCALLOFTHUNDER 562)
Define(FIRENOVA 1535)
#Fire
@@ -44,7 +45,7 @@ Define(STRENGTHOFEARTHTOTEM 8075)
Define(TREMORTOTEM 8143)
AddCheckBox(aoe L(AOE))
-AddCheckBox(chain SpellName(CHAINLIGHTNING) default)
+AddCheckBox(chain SpellName(CHAINLIGHTNING) default talent=TALENTCALLOFTHUNDER)
AddCheckBox(firenova SpellName(MAGMATOTEM))
SpellInfo(LAVABURST cd=8)
diff --git a/defaut/Chevalier.lua b/defaut/Chevalier.lua
index cc332c6..052b788 100644
--- a/defaut/Chevalier.lua
+++ b/defaut/Chevalier.lua
@@ -34,7 +34,7 @@ Define(TALENTABOMINATIONMIGHT 2105)
Define(RAISEDEAD 46584)
Define(HORNOFWINTER 57330)
-AddCheckBox(rolldes SpellName(GLYPHDISEASE) default)
+AddCheckBox(rolldes SpellName(GLYPHDISEASE) default glyph=GLYPHDISEASE)
SpellAddTargetDebuff(ICYTOUCH FROSTFEVER=15)
SpellAddTargetDebuff(PLAGUESTRIKE BLOODPLAGUE=15)
diff --git a/defaut/Demoniste.lua b/defaut/Demoniste.lua
index aab2345..c4289bf 100644
--- a/defaut/Demoniste.lua
+++ b/defaut/Demoniste.lua
@@ -55,7 +55,7 @@ SpellAddTargetDebuff(CONFLAGRATE IMMOLATE=0)
SpellAddTargetDebuff(CONFLAGRATE glyph=GLYPHOFCONFLAGRATE)
ScoreSpells(CURSEELEMENTS SHADOWBOLT HAUNT UNSTABLEAFFLICTION IMMOLATE CONFLAGRATE CURSEDOOM CURSETONGUES CURSEWEAKNESS
- CURSEAGONY CORRUPTION SOULFIRE DRAINSOUL INCINERATE SHADOWBOLT)
+ CURSEAGONY CORRUPTION SOULFIRE DRAINSOUL INCINERATE SHADOWBOLT CHAOSBOLT)
AddIcon help=main
{
diff --git a/defaut/Mage.lua b/defaut/Mage.lua
index f57fa9e..6b12b4b 100644
--- a/defaut/Mage.lua
+++ b/defaut/Mage.lua
@@ -4,6 +4,7 @@ Define(TALENTLIVINGBOMB 1852)
Define(TALENTPIERCINGICE 61)
Define(TALENTCHILLEDTOTHEBONES 1856)
Define(TALENTARCANEBARRAGE 1847)
+Define(TALENTIMPROVEDSCORSH 25)
Define(HOTSTREAK 48108)
Define(IMPROVEDSCORCH 22959)
@@ -29,8 +30,8 @@ Define(MIRRORIMAGE 55342)
Define(SUMMONWATERELEMENTAL 31687)
Define(PRESENCEOFMIND 12043)
-AddCheckBox(scorch SpellName(SCORCH) default)
-AddCheckBox(abarr SpellName(ARCANEBARRAGE) default)
+AddCheckBox(scorch SpellName(SCORCH) default talent=TALENTIMPROVEDSCORSH)
+AddCheckBox(abarr SpellName(ARCANEBARRAGE) default talent=TALENTARCANEBARRAGE)
SpellAddDebuff(PYROBLAST HOTSTREAK=0)
SpellAddDebuff(ARCANEBLAST ARCANEBLAST=10)