From 9fe1b70e096881cbafd15a62cd98bda950db400d Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Mon, 5 Oct 2009 18:04:58 +0000 Subject: [PATCH] - bug with recount support - better DK script (death rune for every ability) git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@108 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Ovale.lua | 17 ++++------------- Ovale.toc | 2 +- OvaleRecount.lua | 11 +++++++++-- defaut/Chevalier.lua | 9 +++++++-- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Ovale.lua b/Ovale.lua index 794514e..a42afba 100644 --- a/Ovale.lua +++ b/Ovale.lua @@ -463,22 +463,13 @@ function Ovale:UNIT_SPELLCAST_SENT(event,unit,name,rank,target) if unit=="player" and self.enCombat then -- self.lastSpellCast=name if (not self.spellInfo[name] or not self.spellInfo[name].toggle) and self.scoreSpell[name] then - local previousAmount = 0 - if self.maxScore>0 then - previousAmount = self.score/self.maxScore*1000 - end local scored = self.frame:GetScore(name) - self.score = self.score + scored - self.maxScore = self.maxScore + 1 - local newAmount = self.score/self.maxScore*1000 -- self:Print(scored .. " for "..name) if Recount then local source =Recount.db2.combatants[UnitName("player")] if source then - -- self:Print(previousAmount) - -- self:Print(newAmount) - -- self:Print(newAmount-previousAmount) - Recount:AddAmount(source,"Ovale",newAmount-previousAmount) + Recount:AddAmount(source,"Ovale",scored) + Recount:AddAmount(source,"OvaleMax",1) end end end @@ -957,7 +948,7 @@ function Ovale:CalculerMeilleureAction(element) end return nil end - if (actionEnable>0) then + if (actionEnable and actionEnable>0) then local restant if (not actionCooldownDuration or actionCooldownStart==0) then restant = 0 @@ -1125,7 +1116,7 @@ function Ovale:CalculerMeilleureAction(element) if (meilleurTempsFils) then if (Ovale.trace) then - self:Print("Best action "..meilleurFils.." remains "..meilleurTempsFils) + self:Print("Best action "..bestElement.params[1].." remains "..meilleurTempsFils) end return meilleurTempsFils,meilleurePrioriteFils, bestElement else diff --git a/Ovale.toc b/Ovale.toc index 782e600..9e83c6c 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.6 +## Version: 3.2.7 ## OptionalDeps: Ace3, ButtonFacade, Recount ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC diff --git a/OvaleRecount.lua b/OvaleRecount.lua index 2c0a3aa..1dc431b 100644 --- a/OvaleRecount.lua +++ b/OvaleRecount.lua @@ -3,10 +3,17 @@ local RL = LibStub("AceLocale-3.0"):GetLocale("Recount") local function DataModes(self,data, num) if not data then return 0, 0 end + local fight = data.Fights[Recount.db.profile.CurDataSet] + local score + if fight and fight.Ovale and fight.OvaleMax then + score = fight.Ovale*1000/fight.OvaleMax + else + score = 0 + end if num == 1 then - return (data.Fights[Recount.db.profile.CurDataSet].Ovale or 0) + return score end - return (data.Fights[Recount.db.profile.CurDataSet].Ovale or 0), nil --{{}} + return score, nil end local function TooltipFuncs(self,name,data) diff --git a/defaut/Chevalier.lua b/defaut/Chevalier.lua index f0080aa..883a96b 100644 --- a/defaut/Chevalier.lua +++ b/defaut/Chevalier.lua @@ -37,8 +37,13 @@ SpellAddTargetDebuff(ICYTOUCH FROSTFEVER=15) SpellAddTargetDebuff(PLAGUESTRIKE BLOODPLAGUE=15) SpellInfo(ICYTOUCH frost=-1 forcecd=DEATHCOIL) SpellInfo(PLAGUESTRIKE unholy=-1 forcecd=DEATHCOIL) -SpellInfo(DEATHSTRIKE unholy=-1 frost=-1) -SpellInfo(HEARTSTRIKE blood=-1) +SpellInfo(DEATHSTRIKE unholy=-1 frost=-1 forcecd=DEATHCOIL) +SpellInfo(HEARTSTRIKE blood=-1 forcecd=DEATHCOIL) +SpellInfo(HOWLINGBLAST frost=-1 cd=8) +SpellInfo(BLOODSTRIKE blood=-1 forcecd=DEATHCOIL) +SpellInfo(SCOURGESTRIKE unholy=-1 frost=-1 forcecd=DEATHCOIL) +SpellInfo(OBLITERATE unholy=-1 frost=-1 forcecd=DEATHCOIL) + ScoreSpells(HOWLINGBLAST HEARTSTRIKE BLOODSTRIKE DEATHSTRIKE SCOURGESTRIKE OBLITERATE HEARTSTRIKE PESTILENCE ICYTOUCH PLAGUESTRIKE FROSTSTRIKE DEATHCOIL RAISEDEAD) -- 1.7.9.5