diff --git a/Ovale.lua b/Ovale.lua index 95d12bb..17f25c6 100644 --- a/Ovale.lua +++ b/Ovale.lua @@ -362,20 +362,19 @@ function Ovale:WithHaste(temps, hate) end function Ovale:COMBAT_LOG_EVENT_UNFILTERED(event, ...) - if self.otherDebuffsEnabled then - local time, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...) - -- self:Print("event="..event.." source="..sourceName.." destName="..destName) - if sourceName == UnitName("player") then - if string.find(event, "SPELL_") == 1 then - local spellId, spellName = select(9, ...) - for i,v in ipairs(self.lastSpell) do - if v.name == spellName then - self:Print("on supprime " ..spellName.." a "..time) - table.remove(self.lastSpell, i) - break - end + local time, event, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags = select(1, ...) + -- self:Print("event="..event.." source="..sourceName.." destName="..destName) + if sourceName == UnitName("player") then + if string.find(event, "SPELL_") == 1 then + local spellId, spellName = select(9, ...) + for i,v in ipairs(self.lastSpell) do + if v.name == spellName then + table.remove(self.lastSpell, i) + break end end + end + if self.otherDebuffsEnabled then if string.find(event, "SPELL_AURA_") == 1 then local spellId, spellName, spellSchool, auraType = select(9, ...) if auraType == "DEBUFF" and self.spellInfo[spellName] and self.spellInfo[spellName].duration then @@ -390,6 +389,8 @@ function Ovale:COMBAT_LOG_EVENT_UNFILTERED(event, ...) end end end + end + if self.otherDebuffsEnabled then if event == "UNIT_DIED" then for k,v in pairs(self.otherDebuffs) do for j,w in pairs(v) do @@ -587,6 +588,8 @@ function Ovale:OnEnable() self:RegisterEvent("PLAYER_TARGET_CHANGED") self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") self:RegisterEvent("CHAT_MSG_ADDON") + self:RegisterEvent("GLYPH_UPDATED") + self:RegisterEvent("GLYPH_ADDED") if (not self.firstInit) then self:FirstInit() @@ -595,6 +598,33 @@ function Ovale:OnEnable() self:UpdateVisibility() end +function Ovale:OnDisable() + -- Called when the addon is disabled + self:UnregisterEvent("ACTIONBAR_PAGE_CHANGED") + self:UnregisterEvent("PLAYER_REGEN_ENABLED") + self:UnregisterEvent("PLAYER_REGEN_DISABLED") + self:UnregisterEvent("PLAYER_TALENT_UPDATE") + self:UnregisterEvent("ACTIONBAR_SLOT_CHANGED") + self:UnregisterEvent("SPELLS_CHANGED") + self:UnregisterEvent("CHARACTER_POINTS_CHANGED") + self:UnregisterEvent("UPDATE_BINDINGS") + self:UnregisterEvent("UNIT_AURA") + self:UnregisterEvent("UNIT_SPELLCAST_SENT") + self:UnregisterEvent("PLAYER_TARGET_CHANGED") + self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + self:UnregisterEvent("CHAT_MSG_ADDON") + self:UnregisterEvent("GLYPH_UPDATED") + self.frame:Hide() +end + +function Ovale:GLYPH_ADDED(event) + self:Print("GLYPH_ADDED") +end + +function Ovale:GLYPH_UPDATED(event) + self:Print("GLYPH_UPDATED") +end + function Ovale:UNIT_SPELLCAST_SENT(event,unit,name,rank,target) -- self:Print("UNIT_SPELLCAST_SENT"..event.." unit="..unit.." name="..name.." tank="..rank.." target="..target) if unit=="player" then @@ -673,23 +703,6 @@ function Ovale:PLAYER_REGEN_DISABLED() self:UpdateVisibility() end -function Ovale:OnDisable() - -- Called when the addon is disabled - self:UnregisterEvent("ACTIONBAR_PAGE_CHANGED") - self:UnregisterEvent("PLAYER_REGEN_ENABLED") - self:UnregisterEvent("PLAYER_REGEN_DISABLED") - self:UnregisterEvent("PLAYER_TALENT_UPDATE") - self:UnregisterEvent("ACTIONBAR_SLOT_CHANGED") - self:UnregisterEvent("SPELLS_CHANGED") - self:UnregisterEvent("CHARACTER_POINTS_CHANGED") - self:UnregisterEvent("UPDATE_BINDINGS") - self:UnregisterEvent("UNIT_AURA") - self:UnregisterEvent("UNIT_SPELLCAST_SENT") - self:UnregisterEvent("PLAYER_TARGET_CHANGED") - self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") - self:UnregisterEvent("CHAT_MSG_ADDON") - self.frame:Hide() -end function Ovale_GetNomAction(i) local actionText = GetActionText(i); diff --git a/Ovale.toc b/Ovale.toc index 224709f..f97be56 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.3.20 +## Version: 3.3.21 ## OptionalDeps: Ace3, ButtonFacade, Recount, LibBabble-CreatureType-3.0 ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC diff --git a/defaut/Chevalier.lua b/defaut/Chevalier.lua index c4632ea..896f055 100644 --- a/defaut/Chevalier.lua +++ b/defaut/Chevalier.lua @@ -36,20 +36,26 @@ Define(HORNOFWINTER 57330) AddCheckBox(rolldes SpellName(GLYPHDISEASE) default glyph=GLYPHDISEASE) -SpellAddTargetDebuff(ICYTOUCH FROSTFEVER=15) -SpellAddTargetDebuff(PLAGUESTRIKE BLOODPLAGUE=15) SpellInfo(ICYTOUCH frost=-1) #forcecd=DEATHCOIL +SpellAddTargetDebuff(ICYTOUCH FROSTFEVER=15) SpellInfo(PLAGUESTRIKE unholy=-1) +SpellAddTargetDebuff(PLAGUESTRIKE BLOODPLAGUE=15) SpellInfo(DEATHSTRIKE unholy=-1 frost=-1) SpellInfo(HEARTSTRIKE blood=-1) SpellInfo(HOWLINGBLAST frost=-1 cd=8) +SpellAddTargetDebuff(HOWLINGBLAST FROSTFEVER=15 glyph=GLYPHHOWLINGBLAST) SpellInfo(BLOODSTRIKE blood=-1) SpellInfo(SCOURGESTRIKE unholy=-1 frost=-1) SpellInfo(OBLITERATE unholy=-1 frost=-1) SpellInfo(RUNESTRIKE toggle=1) - +SpellAddBuff(BONESHIELD BONESHIELD=300) +SpellAddBuff(UNBREAKABLEARMOR UNBREAKABLEARMOR=20) +SpellAddBuff(ICEBOUNDFORTITUDE ICEBOUNDFORTITUDE=18) +SpellInfo(HYSTERIA cd=300) +SpellInfo(SUMMONGARGOYLE cd=180) +SpellInfo(ARMYOFTHEDEAD cd=600) ScoreSpells(HOWLINGBLAST HEARTSTRIKE BLOODSTRIKE DEATHSTRIKE SCOURGESTRIKE OBLITERATE HEARTSTRIKE - PESTILENCE ICYTOUCH PLAGUESTRIKE FROSTSTRIKE DEATHCOIL RAISEDEAD) + PESTILENCE ICYTOUCH PLAGUESTRIKE FROSTSTRIKE DEATHCOIL) AddIcon help=main { @@ -131,7 +137,7 @@ AddIcon help=cd } unless BuffPresent(FROSTPRESENCE) { - Spell(SUMMONGARGOYLE) + Spell(SUMMONGARGOYLE) Spell(HYSTERIA) } Item(Trinket0Slot usable=1) diff --git a/defaut/Demoniste.lua b/defaut/Demoniste.lua index 27c9e77..74dd43b 100644 --- a/defaut/Demoniste.lua +++ b/defaut/Demoniste.lua @@ -34,6 +34,7 @@ Define(FIRESTONE 6366) Define(SPELLSTONE 2362) Define(GLYPHLIFETAP 63320) Define(LIFETAP 1454) +Define(SEEDOFCORRUPTION 27243) AddListItem(curse elements SpellName(CURSEELEMENTS)) AddListItem(curse agony SpellName(CURSEAGONY)) @@ -91,7 +92,8 @@ if List(curse doom) and TargetDebuffExpires(CURSEDOOM 0 mine=1) if List(curse tongues) and TargetDebuffExpires(CURSETONGUES 2) Spell(CURSETONGUES) if List(curse weakness) and TargetDebuffExpires(CURSEWEAKNESS 2) Spell(CURSEWEAKNESS) if List(curse agony) and TargetDebuffExpires(CURSEAGONY 0 mine=1) and TargetDeadIn(more 10) Spell(CURSEAGONY) -if TargetDebuffExpires(CORRUPTION 0 mine=1) and TargetDeadIn(more 9) and TalentPoints(TALENTEMBERSTORM less 1) Spell(CORRUPTION) +if TargetDebuffExpires(CORRUPTION 0 mine=1) and TargetDebuffExpires(SEEDOFCORRUPTION 0 mine=1) + and TargetDeadIn(more 9) and TalentPoints(TALENTEMBERSTORM less 1) Spell(CORRUPTION) if BuffPresent(DECIMATION) Spell(SOULFIRE) diff --git a/defaut/Druide.lua b/defaut/Druide.lua index 7f21581..064089d 100644 --- a/defaut/Druide.lua +++ b/defaut/Druide.lua @@ -14,8 +14,8 @@ Define(INSECTSWARM 27013) Define(MOONFIRE 8921) Define(STARFIRE 2912) Define(WRATH 5176) -Define(ECLIPSESTARFIRE 48518) -Define(ECLIPSEWRATH 48517) +Define(ECLIPSESTARFIRE 48518) #Critical strike chance of Starfire increased, fired by Wrath +Define(ECLIPSEWRATH 48517) #Damage done by Wrath increased, fired by Starfire Define(TIGERSFURY 5217) Define(FORCEOFNATURE 33831) Define(RAKE 59886) @@ -141,12 +141,12 @@ AddIcon help=main if CheckBoxOff(wrath) { - if BuffGain(ECLIPSEWRATH 30) Spell(STARFIRE) + if BuffGain(ECLIPSEWRATH 29) Spell(STARFIRE) Spell(WRATH) } if CheckBoxOn(wrath) { - if BuffGain(ECLIPSESTARFIRE 30) Spell(WRATH) + if BuffGain(ECLIPSESTARFIRE 29) Spell(WRATH) Spell(STARFIRE) } }