diff --git a/Locale-enUS.lua b/Locale-enUS.lua index cd86911..012782b 100644 --- a/Locale-enUS.lua +++ b/Locale-enUS.lua @@ -26,4 +26,12 @@ L["Verrouiller position"] = "Lock position" L["Vertical"] = true L["Marge entre deux icônes"] = "Margin between icons" L["Focus"] = true -L["Apparence"] = "Appearance" \ No newline at end of file +L["Apparence"] = "Appearance" +L["Cacher bouton vide"] = "Hide empty buttons" +L["Cacher si cible amicale ou morte"] = "Hide if friendly or dead target" +L["main"] = "Main Attack" +L["offgcd"] = "Out of global cooldown ability.\nCast alongside your Main Attack." +L["cd"] = "Long cooldown abilities.\nCast as soon as possible or keep for multiplied damagage phases." +L["aoe"] = "Multiple targets Attack" +L["mana"] = "Mana gain" +L["Cliquer pour afficher/cacher les options"] = "Click to hide/show options" \ No newline at end of file diff --git a/Locale-frFR.lua b/Locale-frFR.lua index f5b3aa6..d94beca 100644 --- a/Locale-frFR.lua +++ b/Locale-frFR.lua @@ -26,4 +26,12 @@ L["Verrouiller position"] = true L["Vertical"] = true L["Marge entre deux icônes"] = true L["Focus"] = true -L["Apparence"] = true \ No newline at end of file +L["Apparence"] = true +L["Cacher bouton vide"] = true +L["Cacher si cible amicale ou morte"] = true +L["main"] = "Attaque principale" +L["offgcd"] = "Attaque hors temps de recharge globale.\nLancer en parallèle de l'attaque principale." +L["cd"] = "Techniques à longs temps de recharge.\nLancer dès que possible ou conserver pour les phases de dégâts amplifiés." +L["aoe"] = "Attaque multi-cible" +L["mana"] = "Regain de mana" +L["Cliquer pour afficher/cacher les options"] = true \ No newline at end of file diff --git a/Ovale.lua b/Ovale.lua index 607e5fc..d5c9c64 100644 --- a/Ovale.lua +++ b/Ovale.lua @@ -170,7 +170,22 @@ local options = get = function(info) return Ovale.db.profile.apparence.predictif end, set = function(info, value) Ovale.db.profile.apparence.predictif = value; Ovale:UpdateFrame() end }, - + hideEmpty = + { + order = 11, + type = "toggle", + name = L["Cacher bouton vide"], + get = function(info) return Ovale.db.profile.apparence.hideEmpty end, + set = function(info, value) Ovale.db.profile.apparence.hideEmpty = value; Ovale:UpdateFrame() end + }, + targetHostileOnly = + { + order = 11, + type = "toggle", + name = L["Cacher si cible amicale ou morte"], + get = function(info) return Ovale.db.profile.apparence.targetHostileOnly end, + set = function(info, value) Ovale.db.profile.apparence.targetHostileOnly = value; Ovale:UpdateFrame() end + }, } }, code = @@ -1229,6 +1244,10 @@ function Ovale:UpdateVisibility() if (Ovale.db.profile.apparence.enCombat and not Ovale.enCombat) then self.frame:Hide() end + + if Ovale.db.profile.apparence.targetHostileOnly and (UnitIsDead("target") or UnitCanCooperate("target", "player")) then + self.frame:Hide() + end end function Ovale:UpdateFrame() diff --git a/Ovale.toc b/Ovale.toc index dfdfd15..3ad39bf 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.2.13 +## Version: 3.2.14 ## OptionalDeps: Ace3, ButtonFacade, Recount ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC diff --git a/OvaleFrame.lua b/OvaleFrame.lua index 7499aff..7ec51cb 100644 --- a/OvaleFrame.lua +++ b/OvaleFrame.lua @@ -53,6 +53,7 @@ do local function frameOnLeave(this) this.obj.barre:Hide() + end local function frameOnUpdate(self) @@ -257,6 +258,7 @@ do 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:SetHelp(node.params.help) if LBF then icon:SetSkinGroup(self.skinGroup) diff --git a/OvaleIcone.lua b/OvaleIcone.lua index 0b4e62e..46661ec 100644 --- a/OvaleIcone.lua +++ b/OvaleIcone.lua @@ -91,13 +91,21 @@ local function Update(self, minAttente, actionTexture, actionInRange, actionCool else self.focusText:Hide() end + self:Show() else self.icone:Hide() self.aPortee:Hide() self.shortcut:Hide() self.remains:Hide() self.focusText:Hide() + if Ovale.db.profile.apparence.hideEmpty then + self:Hide() + else + self:Show() + end end + + return minAttente,element end @@ -117,11 +125,34 @@ local function SetSize(self, width, height) end end +local function SetHelp(self, help) + self.help = help +end + function OvaleIcone_OnClick(self) Ovale:ToggleOptions() self:SetChecked(0) end +function OvaleIcone_OnEnter(self) + if self.help or next(Ovale.casesACocher) or next(Ovale.listes) then + GameTooltip:SetOwner(self, "ANCHOR_BOTTOMLEFT") + if self.help then + GameTooltip:SetText(L[self.help]) + end + if next(Ovale.casesACocher) or next(Ovale.listes) then + GameTooltip:AddLine(L["Cliquer pour afficher/cacher les options"],1,1,1) + end + GameTooltip:Show() + end +end + +function OvaleIcone_OnLeave(self) + if self.help or next(Ovale.casesACocher) or next(Ovale.listes) then + GameTooltip:Hide() + end +end + function OvaleIcone_OnLoad(self) local name = self:GetName() self.icone = _G[name.."Icon"] @@ -142,4 +173,5 @@ function OvaleIcone_OnLoad(self) self.SetSkinGroup = SetSkinGroup self.Update = Update self.SetSize = SetSize + self.SetHelp = SetHelp end diff --git a/OvaleIcone.xml b/OvaleIcone.xml index d12bc7b..06177d3 100644 --- a/OvaleIcone.xml +++ b/OvaleIcone.xml @@ -4,6 +4,8 @@ <Scripts> <OnLoad>OvaleIcone_OnLoad(self);</OnLoad> <OnClick>OvaleIcone_OnClick(self)</OnClick> + <OnEnter>OvaleIcone_OnEnter(self)</OnEnter> + <OnLeave>OvaleIcone_OnLeave(self)</OnLeave> </Scripts> </CheckButton> </Ui> diff --git a/defaut/Chaman.lua b/defaut/Chaman.lua index 7814c80..8c92018 100644 --- a/defaut/Chaman.lua +++ b/defaut/Chaman.lua @@ -17,6 +17,7 @@ Define(THUNDERSTORM 51490) Define(FERALSPIRIT 51533) Define(HEROISM 32182) Define(BLOODLUST 2825) +Define(TALENTFLURRY 602) #Fire Define(TOTEMOFWRATH 30706) @@ -43,7 +44,6 @@ Define(TREMORTOTEM 8143) AddCheckBox(aoe L(AOE)) AddCheckBox(chain SpellName(CHAINLIGHTNING)) -AddCheckBox(melee L(Melee)) AddListItem(fire wrath SpellName(TOTEMOFWRATH)) AddListItem(fire nova SpellName(FIRENOVATOTEM)) AddListItem(fire tong SpellName(FLAMETONGTOTEM)) @@ -69,15 +69,16 @@ SpellAddBuff(CHAINLIGHTNING MAELSTROMWEAPON=0) ScoreSpells(WATERSHIELD FLAMESHOCK LAVABURST CHAINLIGHTNING LIGHTNINGBOLT LAVALASH EARTHSHOCK LIGHTNINGSHIELD STORMSTRIKE) -AddIcon +AddIcon help=main { - unless CheckBoxOn(melee) + unless TalentPoints(TALENTFLURRY more 0) { # if BuffExpires(FLAMETHONG 2) Spell(FLAMETHONG) if BuffExpires(WATERSHIELD 2) Spell(WATERSHIELD) if TargetDebuffExpires(FLAMESHOCK 0 mine=1) Spell(FLAMESHOCK) Spell(LAVABURST) - if CheckBoxOn(aoe) Spell(CHAINLIGHTNING) + if CheckBoxOn(aoe) + Spell(CHAINLIGHTNING) if CheckBoxOn(chain) { @@ -87,7 +88,7 @@ AddIcon } if CheckBoxOff(chain) Spell(LIGHTNINGBOLT) } - if CheckBoxOn(melee) + if TalentPoints(TALENTFLURRY more 0) { if TargetDebuffExpires(FLAMESHOCK 0 mine=1) Spell(FLAMESHOCK) if TargetDebuffExpires(FLAMESHOCK 1.5 haste=spell mine=1) and 1.5s before Spell(LAVALASH) @@ -101,7 +102,7 @@ AddIcon } } -AddIcon +AddIcon help=cd { Spell(ELEMENTALMASTERY) Spell(FERALSPIRIT) @@ -110,7 +111,7 @@ AddIcon Spell(FIREELEMENTALTOTEM) } -AddIcon size=small +AddIcon size=small help=mana { if ManaPercent(less 25) Spell(SHAMANISTICRAGE) @@ -124,7 +125,7 @@ AddIcon size=small Spell(BLOODLUST) } -AddIcon size=small +AddIcon size=small nocd=1 { if TotemExpires(fire) { diff --git a/defaut/Chasseur.lua b/defaut/Chasseur.lua index 8e277b1..51887da 100644 --- a/defaut/Chasseur.lua +++ b/defaut/Chasseur.lua @@ -20,7 +20,7 @@ Define(CHIMERASHOT 53209) AddCheckBox(multi SpellName(MULTISHOT)) ScoreSpells(HUNTERSMARK BLACKARROW SERPENTSTING CHIMERASHOT AIMEDSHOT MULTISHOT ARCANESHOT KILLSHOT STEADYSHOT) -AddIcon +AddIcon help=main { if TargetDebuffExpires(HUNTERSMARK 0) Spell(HUNTERSMARK) if TargetDebuffExpires(BLACKARROW 0 mine=1) Spell(BLACKARROW) @@ -35,7 +35,7 @@ AddIcon unless TargetDebuffPresent(EXPLOSIVESHOT mine=1) and {2s before Spell(EXPLOSIVESHOT)} Spell(STEADYSHOT) } -AddIcon +AddIcon help=cd { Spell(BESTIALWRATH usable=1) Spell(KILLCOMMAND usable=1) diff --git a/defaut/Chevalier.lua b/defaut/Chevalier.lua index e46bd40..973800e 100644 --- a/defaut/Chevalier.lua +++ b/defaut/Chevalier.lua @@ -49,7 +49,7 @@ SpellInfo(OBLITERATE unholy=-1 frost=-1 forcecd=DEATHCOIL) ScoreSpells(HOWLINGBLAST HEARTSTRIKE BLOODSTRIKE DEATHSTRIKE SCOURGESTRIKE OBLITERATE HEARTSTRIKE PESTILENCE ICYTOUCH PLAGUESTRIKE FROSTSTRIKE DEATHCOIL RAISEDEAD) -AddIcon +AddIcon help=main { Spell(DANCINGRUNEWEAPON usable=1) @@ -93,12 +93,15 @@ AddIcon if TargetDebuffExpires(BLOODPLAGUE 0 mine=1) and Runes(unholy 1) Spell(PLAGUESTRIKE) + if BuffPresent(FROSTPRESENCE) + Spell(RUNESTRIKE usable=1) + Spell(FROSTSTRIKE usable=1) if PetPresent(no) Spell(RAISEDEAD) Spell(DEATHCOIL usable=1) } -AddIcon +AddIcon help=aoe { if Runes(unholy 1) and Runes(frost 1) Spell(HOWLINGBLAST) if TargetDebuffPresent(BLOODPLAGUE) or TargetDebuffPresent(FROSTFEVER) @@ -107,15 +110,7 @@ AddIcon Spell(BLOODBOIL usable=1) } -AddIcon size=small -{ - if BuffPresent(FROSTPRESENCE) - { - Spell(RUNESTRIKE usable=1) - } -} - -AddIcon size=small +AddIcon help=cd { Spell(BONESHIELD) if BuffPresent(FROSTPRESENCE) diff --git a/defaut/Demoniste.lua b/defaut/Demoniste.lua index f7ecaed..03b8b5d 100644 --- a/defaut/Demoniste.lua +++ b/defaut/Demoniste.lua @@ -42,7 +42,7 @@ SpellAddTargetDebuff(IMMOLATE IMMOLATE=15) ScoreSpells(CURSEELEMENTS SHADOWBOLT HAUNT UNSTABLEAFFLICTION IMMOLATE CONFLAGRATE CURSEDOOM CURSETONGUES CURSEWEAKNESS CURSEAGONY CORRUPTION SOULFIRE DRAINSOUL INCINERATE SHADOWBOLT) -AddIcon +AddIcon help=main { if List(curse elements) and TargetDebuffExpires(CURSEELEMENTS 2) Spell(CURSEELEMENTS) if TalentPoints(TALENTSHADOWEMBRACE more 0) and TargetDebuffExpires(SHADOWEMBRACE 0) Spell(SHADOWBOLT) @@ -68,7 +68,7 @@ if TalentPoints(TALENTEMBERSTORM more 0) Spell(INCINERATE) Spell(SHADOWBOLT) } -AddIcon +AddIcon help=cd { Spell(METAMORPHOSIS) Spell(DEMONICEMPOWERMENT) diff --git a/defaut/Druide.lua b/defaut/Druide.lua index 695643a..f5193b9 100644 --- a/defaut/Druide.lua +++ b/defaut/Druide.lua @@ -38,7 +38,7 @@ ScoreSpells(FAERIEFERAL DEMOROAR MANGLEBEAR LACERATE SAVAGEROAR RIP SpellInfo(MAUL toggle=1) -AddIcon +AddIcon help=main { if Stance(1) # bear { @@ -117,7 +117,7 @@ AddIcon } } -AddIcon +AddIcon help=offgcd { if Stance(1) { @@ -125,7 +125,7 @@ AddIcon } } -AddIcon +AddIcon help=cd { unless Stance(1) or Stance(3) Spell(STARFALL) Spell(FORCEOFNATURE) diff --git a/defaut/Guerrier.lua b/defaut/Guerrier.lua index 7c82384..07255d6 100644 --- a/defaut/Guerrier.lua +++ b/defaut/Guerrier.lua @@ -55,7 +55,7 @@ SpellInfo(HEROICSTRIKE toggle=1) SpellInfo(CLEAVE toggle=1) ScoreSpells(WHIRLWIND BLOODTHIRST SLAM REND MORTALSTRIKE EXECUTE SHIELDSLAM REVENGE) -AddIcon +AddIcon help=main { if List(shout command) and BuffExpires(COMMANDSHOUT 3) @@ -111,7 +111,12 @@ AddIcon if CheckBoxOn(whirlwind) Spell(WHIRLWIND) Spell(BLOODTHIRST) Spell(VICTORY usable=1) - if BuffPresent(SLAMBUFF) Spell(SLAM) + if BuffPresent(SLAMBUFF) + { + if BuffExpires(SLAMBUFF 2) + Spell(SLAM) + Spell(SLAM priority=2) + } Spell(MORTALSTRIKE) @@ -147,7 +152,7 @@ AddIcon } } -AddIcon +AddIcon help=offgcd { if CheckBoxOff(multi) { @@ -166,7 +171,7 @@ AddIcon Spell(CLEAVE) } -AddIcon +AddIcon help=cd { if Stance(2) #Defense { diff --git a/defaut/Mage.lua b/defaut/Mage.lua index f77eb0c..4fbf833 100644 --- a/defaut/Mage.lua +++ b/defaut/Mage.lua @@ -32,7 +32,7 @@ SpellAddTargetDebuff(SCORCH IMPROVEDSCORCH=30) SpellAddTargetDebuff(LIVINGBOMB LIVINGBOMB=12) ScoreSpells(SCORCH PYROBLAST LIVINGBOMB FROSTFIREBOLT FIREBALL SUMMONWATERELEMENTAL FROSTBOLT ARCANEBLAST ARCANEMISSILES) -AddIcon +AddIcon help=main { if TalentPoints(TALENTLIVINGBOMB more 0) { @@ -62,13 +62,9 @@ AddIcon } } -AddIcon +AddIcon help=cd { Spell(MIRRORIMAGE) -} - -AddIcon -{ if DebuffPresent(ARCANEBLAST stacks=3) Spell(ARCANEPOWER) Spell(COMBUSTION) Spell(ICYVEINS) diff --git a/defaut/Paladin.lua b/defaut/Paladin.lua index 972c211..fcae93b 100644 --- a/defaut/Paladin.lua +++ b/defaut/Paladin.lua @@ -31,7 +31,7 @@ AddCheckBox(coleredivine SpellName(HOLYWRATH)) ScoreSpells(SEALRIGHTEOUSNESS SEALCOMMAND SEALVENGEANCE SEALCORRUPTION HOLYSHIELD HAMMEROFTHERIGHTEOUS CRUSADERSTRIKE HAMMEROFWRATH JUDGELIGHT JUDGEWISDOM DIVINESTORM CONSECRATE EXORCISM HOLYWRATH HOLYSHOCK SHIELDOFRIGHTEOUSNESS) -AddIcon +AddIcon help=main { if List(sceau piete) and BuffExpires(SEALRIGHTEOUSNESS 3) Spell(SEALRIGHTEOUSNESS) if List(sceau autorite) and BuffExpires(SEALCOMMAND 3) Spell(SEALCOMMAND) @@ -57,7 +57,7 @@ AddIcon if BuffPresent(THEARTOFWAR) Spell(FLASHOFLIGHT priority=2) } -AddIcon +AddIcon help=cd { Spell(AVENGINGWRATH) Item(Trinket0Slot usable=1) diff --git a/defaut/Pretre.lua b/defaut/Pretre.lua index 8b8facf..8fa53b8 100644 --- a/defaut/Pretre.lua +++ b/defaut/Pretre.lua @@ -32,7 +32,8 @@ SpellInfo(Shadowfiend cd=300) ScoreSpells(MB SWP VT DP MF) # Add main monitor -AddIcon { +AddIcon help=main +{ #Check shadowform is up unless BuffPresent(SF) @@ -72,14 +73,14 @@ Spell(MF priority=2) } # End of main monitor -AddIcon +AddIcon help=cd { Item(Trinket0Slot usable=1) Item(Trinket1Slot usable=1) } # Add mana monitor -AddIcon { +AddIcon help=mana { #if up, launch focus (and then MB since it's the first priority) Spell(Focus usable=1) diff --git a/defaut/Voleur.lua b/defaut/Voleur.lua index 17b372d..a198e43 100644 --- a/defaut/Voleur.lua +++ b/defaut/Voleur.lua @@ -22,7 +22,7 @@ Define(CLOACKOFSHADOWS 31224) ScoreSpells(SLICEANDDICE HUNGERFORBLOOD ENVENOM RUPTURE EVISCERATE MUTILATE SINISTERSTRIKE) -AddIcon +AddIcon help=main { unless BuffPresent(SLICEANDDICE) { @@ -58,7 +58,7 @@ AddIcon } } -AddIcon +AddIcon help=cd { unless BuffPresent(KILLINGSPREE) Spell(ADRENALINERUSH) unless BuffPresent(ADRENALINERUSH) Spell(KILLINGSPREE)