diff --git a/Ovale.lua b/Ovale.lua index b920102..fe4a604 100644 --- a/Ovale.lua +++ b/Ovale.lua @@ -427,6 +427,7 @@ function Ovale:DebugListAura(target, filter) break end Ovale:Print(name..": "..spellId) + i = i + 1 end end @@ -777,6 +778,16 @@ end function Ovale:UNIT_SPELLCAST_SUCCEEDED(event, unit, name, rank, lineId, spellId) --self:Print("UNIT_SPELLCAST_SUCCEEDED "..event.." name="..name.." lineId="..lineId.." spellId="..spellId.. " time="..GetTime()) + if unit == "player" then + for i,v in ipairs(self.lastSpell) do + if v.lineId == lineId then + --Already added in UNIT_SPELLCAST_START + return + end + end + local now = GetTime() + self:AddSpellToList(spellId, lineId, now, now, false) + end end function Ovale:AddSpellToList(spellId, lineId, startTime, endTime, channeled) @@ -792,6 +803,7 @@ function Ovale:AddSpellToList(spellId, lineId, startTime, endTime, channeled) if self.spellInfo[spellId] then local si = self.spellInfo[spellId] + --self:Print("spellInfo found") if si and si.buffnocd and UnitBuff("player", GetSpellInfo(si.buffnocd)) then newSpell.nocd = true else @@ -800,6 +812,7 @@ function Ovale:AddSpellToList(spellId, lineId, startTime, endTime, channeled) --Increase or reset the counter that is used by the Counter function if si.resetcounter then self.counter[si.resetcounter] = 0 + --self:Print("reset counter "..si.resetcounter) end if si.inccounter then local cname = si.inccounter @@ -807,19 +820,23 @@ function Ovale:AddSpellToList(spellId, lineId, startTime, endTime, channeled) self.counter[cname] = 0 end self.counter[cname] = self.counter[cname] + 1 + --self:Print("inc counter "..cname.." to "..self.counter[cname]) end end if self.enCombat then + --self:Print(tostring(self.scoreSpell[spellId])) if (not self.spellInfo[spellId] or not self.spellInfo[spellId].toggle) and self.scoreSpell[spellId] then --Compute the player score local scored = self.frame:GetScore(spellId) + --self:Print("Scored "..scored) 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 + --self:Print("Record score "..scored) Recount:AddAmount(source,"Ovale",scored) Recount:AddAmount(source,"OvaleMax",1) end diff --git a/Ovale.toc b/Ovale.toc index e2fe9a5..e556e0a 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.7 +## Version: 4.0.8 ## OptionalDeps: Ace3, ButtonFacade, Recount, LibBabble-CreatureType-3.0 ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC diff --git a/OvaleCompile.lua b/OvaleCompile.lua index 2810fd0..181d4b3 100644 --- a/OvaleCompile.lua +++ b/OvaleCompile.lua @@ -124,6 +124,7 @@ local function ParseScoreSpells(params) for v in string.gmatch(params, "(%d+)") do local spellId = tonumber(v) if spellId then + --Ovale:Print("Add spell to score "..spellId) Ovale.scoreSpell[spellId] = true else Ovale:Print("unknown spell "..v) @@ -234,7 +235,7 @@ local function ParseAddCheckBox(item, text, params) return "" end Ovale.casesACocher[item] = {text = text} - if paramList[1] and paramList[1]=="checked" then + if paramList[1] and paramList[1]=="default" then Ovale.casesACocher[item].checked = true end return "" diff --git a/defaut/Chasseur.lua b/defaut/Chasseur.lua index 4ada0eb..9f968a0 100644 --- a/defaut/Chasseur.lua +++ b/defaut/Chasseur.lua @@ -56,10 +56,10 @@ AddIcon help=main mastery=1 { if Mana(less 40) {Spell(FERVOR) Spell(STEADYSHOT)} if TargetBuffPresent(FRENZYEFFECT stacks=5 target=pet) Spell(FOCUSFIRE) + if CheckBoxOn(multi) Spell(MULTISHOT) if TargetDebuffExpires(SERPENTSTING 0 mine=1) and TargetDeadIn(more 8) Spell(SERPENTSTING) Spell(KILLCOMMAND) Spell(ARCANESHOT) - if CheckBoxOn(multi) Spell(MULTISHOT) if TargetLifePercent(less 20) Spell(KILLSHOT) Spell(STEADYSHOT) } @@ -67,12 +67,12 @@ AddIcon help=main mastery=1 AddIcon help=main mastery=2 { if TargetLifePercent(less 20) Spell(KILLSHOT) + if CheckBoxOn(multi) Spell(MULTISHOT) if TargetDebuffExpires(SERPENTSTING 0 mine=1) and TargetDeadIn(more 8) Spell(SERPENTSTING) if TargetDebuffPresent(SERPENTSTING) Spell(CHIMERASHOT) if BuffPresent(FIRE) Spell(AIMEDSHOT) if Mana(less 44) or Counter(ss equal 1) Spell(STEADYSHOT) unless 1.6s before Spell(CHIMERASHOT) Spell(ARCANESHOT) - if CheckBoxOn(multi) Spell(MULTISHOT) if Mana(more 66) Spell(ARCANESHOT) unless 0.25s before Spell(CHIMERASHOT) Spell(STEADYSHOT) }