From 55cea0d968bb7d1253ba4999097c0479d1268c24 Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Fri, 20 Nov 2009 20:35:37 +0000 Subject: [PATCH] - small change in elemental shaman script - added icon highlighting when ability should be spammed git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@131 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Locale-enUS.lua | 4 +++- Locale-frFR.lua | 4 +++- Ovale.lua | 27 +++++++++++++++++++-------- Ovale.toc | 2 +- OvaleFrame.lua | 15 +++++++++++++-- OvaleIcone.lua | 26 ++++++++++++++++++++++++++ defaut/Chaman.lua | 7 +++++-- 7 files changed, 70 insertions(+), 15 deletions(-) diff --git a/Locale-enUS.lua b/Locale-enUS.lua index 012782b..407e303 100644 --- a/Locale-enUS.lua +++ b/Locale-enUS.lua @@ -34,4 +34,6 @@ 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 +L["Cliquer pour afficher/cacher les options"] = "Click to hide/show options" +L["Illuminer l'icône"] = "Highlight icon" +L["Illuminer l'icône quand la technique doit être spammée"] = "Hightlight icon when ability should be spammed" \ No newline at end of file diff --git a/Locale-frFR.lua b/Locale-frFR.lua index d94beca..0cb920e 100644 --- a/Locale-frFR.lua +++ b/Locale-frFR.lua @@ -34,4 +34,6 @@ L["offgcd"] = "Attaque hors temps de recharge globale.\nLancer en parallèle de 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 +L["Cliquer pour afficher/cacher les options"] = true +L["Illuminer l'icône"] = true +L["Illuminer l'icône quand la technique doit être spammée"] = true \ No newline at end of file diff --git a/Ovale.lua b/Ovale.lua index 52731c8..467457b 100644 --- a/Ovale.lua +++ b/Ovale.lua @@ -188,6 +188,15 @@ local options = get = function(info) return Ovale.db.profile.apparence.targetHostileOnly end, set = function(info, value) Ovale.db.profile.apparence.targetHostileOnly = value; Ovale:UpdateFrame() end }, + highlightIcon = + { + order = 11, + type = "toggle", + name = L["Illuminer l'icône"], + desc = L["Illuminer l'icône quand la technique doit être spammée"], + get = function(info) return Ovale.db.profile.apparence.highlightIcon end, + set = function(info, value) Ovale.db.profile.apparence.highlightIcon = value; Ovale:UpdateFrame() end + }, } }, code = @@ -511,13 +520,15 @@ function Ovale:UNIT_SPELLCAST_SENT(event,unit,name,rank,target) -- self.lastSpellCast=name if (not self.spellInfo[name] or not self.spellInfo[name].toggle) and self.scoreSpell[name] then local scored = self.frame:GetScore(name) - self.score = self.score + scored - self.maxScore = self.maxScore + 1 - if Recount then - local source =Recount.db2.combatants[UnitName("player")] - if source then - Recount:AddAmount(source,"Ovale",scored) - Recount:AddAmount(source,"OvaleMax",1) + if scored~=nil then + self.score = self.score + scored + self.maxScore = self.maxScore + 1 + if Recount then + local source =Recount.db2.combatants[UnitName("player")] + if source then + Recount:AddAmount(source,"Ovale",scored) + Recount:AddAmount(source,"OvaleMax",1) + end end end end @@ -1223,7 +1234,7 @@ function Ovale:ChargerDefaut() list = {}, apparence = {enCombat=false, iconWidth = 64, iconHeight = 64, margin = 4, smallIconWidth=28, smallIconHeight=28, raccourcis=true, numeric=false, avecCible = false, - verrouille = false, vertical = false, predictif=false}, + verrouille = false, vertical = false, predictif=false, highlightIcon = true}, skin = {SkinID="Blizzard", Backdrop = true, Gloss = false, Colors = {}} } }) diff --git a/Ovale.toc b/Ovale.toc index abe4f91..27478f6 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.15 +## Version: 3.2.16 ## OptionalDeps: Ace3, ButtonFacade, Recount ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC diff --git a/OvaleFrame.lua b/OvaleFrame.lua index 2267816..7fbebaf 100644 --- a/OvaleFrame.lua +++ b/OvaleFrame.lua @@ -115,16 +115,27 @@ do for k,action in pairs(self.actions) do if action.spellName == spellName then if not action.waitStart then + -- print("sort "..spellName.." parfait") return 1 else - if Ovale.maintenant - action.waitStart>1.5 then + local lag = Ovale.maintenant - action.waitStart + if lag>5 then + -- print("sort "..spellName.." ignoré (>5s)") + return nil + elseif lag>1.5 then + -- print("sort "..spellName.." trop lent !") return 0 + elseif lag>0 then + -- print("sort "..spellName.." un peu lent "..lag) + return 1-lag/1.5 else - return 1-(Ovale.maintenant - action.waitStart)/1.5 + -- print("sort "..spellName.." juste bon") + return 1 end end end end + print("sort "..spellName.." incorrect") return 0 end diff --git a/OvaleIcone.lua b/OvaleIcone.lua index 20f54d6..6d8a0dd 100644 --- a/OvaleIcone.lua +++ b/OvaleIcone.lua @@ -63,6 +63,28 @@ local function Update(self, minAttente, actionTexture, actionInRange, actionCool self.cd:Hide() end + -- La latence + if minAttente>0 and Ovale.db.profile.apparence.highlightIcon then + local lag = 0.6 + local newShouldClick + if minAttente