From b56f1a91c64c07be6a56c5bca02a5c77d86c7768 Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Sat, 19 Dec 2009 11:30:17 +0000 Subject: [PATCH] - bug fix with multidoting - more multidoting support for shadow priest (multidot is disabled by default now) - various fix for feral script - small fix for unholy death knight script - may fix bug with ButtonFacade range indicator? - fix TotemExpires git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@168 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Condition.lua | 31 ++++++++++++++++++++----------- Locale-enUS.lua | 3 ++- Locale-frFR.lua | 3 ++- Ovale.lua | 27 +++++++++++++++++++-------- Ovale.toc | 2 +- OvaleFrame.lua | 2 +- OvaleIcone.lua | 1 + defaut/Chaman.lua | 1 + defaut/Chevalier.lua | 6 ++++-- defaut/Druide.lua | 48 ++++++++++++++++++++++++------------------------ defaut/Pretre.lua | 20 +++++++++++++++----- 11 files changed, 90 insertions(+), 54 deletions(-) diff --git a/Condition.lua b/Condition.lua index 48ae8da..433dc17 100644 --- a/Condition.lua +++ b/Condition.lua @@ -270,6 +270,9 @@ local function getTargetDead() savedHealth = {} end local newHealth = UnitHealth("target") + if UnitHealthMax("target")==1 then + return Ovale.maintenant + 10000 + end if second~=lastSaved and targetGUID then lastSaved = second local mod10 = second % 10 @@ -516,26 +519,37 @@ Ovale.conditions= end end if not minTime then - return 0 + return nil end minTime = minTime - timeBefore return minTime end - return 0 + return nil end, OtherDebuffPresent = function(condition) Ovale:EnableOtherDebuffs() local otherDebuff = Ovale.otherDebuffs[GetSpellInfo(condition[1])] if otherDebuff then + -- print("otherDebuff") local maxTime = 0 + local suppTime = condition[3] or 10 for target,expireTime in pairs(otherDebuff) do + -- print("target "..target.. " "..expireTime) if target~=UnitGUID("target") then - if expireTime > maxTime then + if Ovale.maintenant - suppTime > expireTime then + otherDebuff[target] = nil + elseif expireTime > maxTime then maxTime = expireTime end end end - return 0, addTime(maxTime, -condition[2]) + -- print("maxTime final "..maxTime) + if maxTime>0 then + local timeBefore = condition[2] or 0 + return 0, addTime(maxTime, -timeBefore) + else + return nil + end end return nil end, @@ -711,18 +725,13 @@ Ovale.conditions= end, TotemExpires = function(condition) local haveTotem, totemName, startTime, duration = GetTotemInfo(totemType[condition[1]]) - if (totemName==nil) then + if not startTime then return 0 end if (condition.totem and Ovale:GetSpellInfoOrNil(condition.totem)~=totemName) then return 0 end - local timeLeft = duration - (Ovale.maintenant - startTime) - if (condition[2] and timeLeftOvale.maintenant then local _, _, _, cost = GetSpellInfo(spellName) self.state.mana = self.state.mana - cost diff --git a/Ovale.toc b/Ovale.toc index de199a6..38ff5b3 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.2 +## Version: 3.3.3 ## OptionalDeps: Ace3, ButtonFacade, Recount ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC diff --git a/OvaleFrame.lua b/OvaleFrame.lua index 56ccf45..cba471e 100644 --- a/OvaleFrame.lua +++ b/OvaleFrame.lua @@ -385,7 +385,7 @@ do self.skinGroup.SkinID = Ovale.db.profile.SkinID self.skinGroup.Gloss = Ovale.db.profile.Gloss self.skinGroup.Backdrop = Ovale.db.profile.Backdrop - self.skinGroup.Colors = Ovale.db.profile.Colors + self.skinGroup.Colors = Ovale.db.profile.Colors or {} LBF:RegisterSkinCallback("Ovale", self.OnSkinChanged, self) end diff --git a/OvaleIcone.lua b/OvaleIcone.lua index c9745ee..c4c2c38 100644 --- a/OvaleIcone.lua +++ b/OvaleIcone.lua @@ -85,6 +85,7 @@ local function Update(self, minAttente, actionTexture, actionInRange, actionCool self.shortcut:SetText(actionShortcut) else self.shortcut:Hide() + self.shortcut:SetText("") end -- L'indicateur de portée diff --git a/defaut/Chaman.lua b/defaut/Chaman.lua index 3cf5b5f..1f58a07 100644 --- a/defaut/Chaman.lua +++ b/defaut/Chaman.lua @@ -73,6 +73,7 @@ ScoreSpells(WATERSHIELD FLAMESHOCK LAVABURST CHAINLIGHTNING LIGHTNINGBOLT LAVALA SpellInfo(EARTHSHOCK cd=6 sharedcd=shock) SpellInfo(FLAMESHOCK cd=6 sharedcd=shock) SpellAddBuff(LIGHTNINGSHIELD LIGHTNINGSHIELD=600) +SpellAddBuff(WATERSHIELD WATERSHIELD=600) SpellInfo(LAVALASH cd=6) SpellInfo(STORMSTRIKE cd=8) diff --git a/defaut/Chevalier.lua b/defaut/Chevalier.lua index 9ae9d30..cc332c6 100644 --- a/defaut/Chevalier.lua +++ b/defaut/Chevalier.lua @@ -71,10 +71,12 @@ AddIcon help=main Spell(BLOODSTRIKE) } } + if Runes(unholy 1) and Runes(frost 1) + Spell(SCOURGESTRIKE) + if Runes(unholy 1 nodeath=1) and Runes(frost 1 nodeath=1) { if TalentPoints(TALENTDEATSTRIKE more 0) Spell(DEATHSTRIKE) - Spell(SCOURGESTRIKE) Spell(OBLITERATE) Spell(DEATHSTRIKE) } @@ -116,7 +118,7 @@ AddIcon help=aoe AddIcon help=cd { - Spell(BONESHIELD) + unless BuffPresent(BONESHIELD) Spell(BONESHIELD) if BuffPresent(FROSTPRESENCE) { Spell(UNBREAKABLEARMOR) diff --git a/defaut/Druide.lua b/defaut/Druide.lua index 96c43f7..4075542 100644 --- a/defaut/Druide.lua +++ b/defaut/Druide.lua @@ -25,6 +25,7 @@ Define(BERSERK 50334) Define(CLEARCASTING 16870) Define(CLAW 16827) Define(STARFALL 48505) +Define(TRAUMA 46856) AddCheckBox(multi L(AOE)) AddCheckBox(mangle SpellName(MANGLECAT) default) @@ -83,35 +84,34 @@ AddIcon help=main if CheckBoxOn(lucioles) and TargetDebuffExpires(FAERIEFERAL 2) and TargetDeadIn(more 15) Spell(FAERIEFERAL) - if ComboPoints(more 4) and Mana(more 70) - { - if BuffExpires(SAVAGEROAR 5) Spell(SAVAGEROAR) - if TargetDebuffExpires(RIP 0 mine=1) and TargetDeadIn(more 7) Spell(RIP) - } - - if {3s between BuffExpires(SAVAGEROAR 0) and TargetDebuffExpires(RIP 0)} and ComboPoints(more 2) - Spell(SAVAGEROAR) + unless BuffPresent(BERSERK) if Mana(less 40) Spell(TIGERSFURY) + + if ComboPoints(more 0) and BuffExpires(SAVAGEROAR 1) Spell(SAVAGEROAR) - if ComboPoints(less 5) + if ComboPoints(more 4) { - if Mana(less 30) Spell(TIGERSFURY) - if TargetDebuffExpires(MANGLECAT 0 mine=1) and CheckBoxOn(mangle) - Spell(MANGLECAT) - if TargetDebuffExpires(RAKE 0 mine=1) and Mana(more 34) - Spell(RAKE) - if Mana(more 42) and CheckBoxOn(shred) Spell(SHRED) + if BuffExpires(SAVAGEROAR 6) and Mana(more 70) and TargetDebuffPresent(RIP 5 mine=1) Spell(SAVAGEROAR) + if TargetDebuffExpires(RIP 0 mine=1) and TargetDeadIn(more 6) Spell(RIP) + + if Mana(more 34) + { + unless BuffPresent(BERSERK) and {BuffExpires(SAVAGEROAR 8) or TargetDebuffExpires(RIP 10 mine=1)} + Spell(FEROCIOUSBITE) + if TargetDeadIn(less 7) + Spell(FEROCIOUSBITE) + } } - - if BuffPresent(CLEARCASTING) and CheckBoxOn(shred) Spell(SHRED) - if ComboPoints(more 4) and Mana(more 34) + if TargetDebuffExpires(MANGLECAT 0) and TargetDebuffExpires(MANGLEBEAR 0) and TargetDebuffExpires(TRAUMA 0) and CheckBoxOn(mangle) + Spell(MANGLECAT) + if TargetDebuffExpires(RAKE 0 mine=1) and Mana(more 34) and TargetDeadIn(more 10) + Spell(RAKE) + + if CheckBoxOn(shred) { - unless BuffExpires(SAVAGEROAR 8) or TargetDebuffExpires(RIP 8 mine=1) - Spell(FEROCIOUSBITE) - if TargetDeadIn(less 7) - Spell(FEROCIOUSBITE) - if Mana(more 90) and CheckBoxOn(shred) - Spell(SHRED) + if Mana(more 69) or BuffPresent(CLEARCASTING) or TargetDeadIn(less 10) or BuffPresent(BERSERK) + Spell(SHRED) + if ComboPoints(less 5) and TargetDebuffExpires(RIP 3 mine=1) Spell(SHRED) } } diff --git a/defaut/Pretre.lua b/defaut/Pretre.lua index 5b7b733..be66904 100644 --- a/defaut/Pretre.lua +++ b/defaut/Pretre.lua @@ -14,11 +14,14 @@ Define(Focus 14751) # Inner Focus Define(Dispersion 47585) Define(Shadowfiend 34433) +AddCheckBox(multidot L(multidot)) + # Spells with cast time that add buff or debuff SpellAddTargetDebuff(SWP SWP=18) SpellInfo(SWP duration=18) SpellAddBuff(SWP SW=15) SpellAddTargetDebuff(VT VT=15) +SpellInfo(VT duration=15) SpellAddBuff(VT SW=15) SpellInfo(MF canStopChannelling=3) SpellAddBuff(MF SW=15) @@ -26,6 +29,7 @@ SpellInfo(MB cd=5.5) SpellAddBuff(MB SW=15) SpellAddBuff(IF IF=1800) SpellAddTargetDebuff(DP DP=24) +SpellInfo(DP duration=24) SpellInfo(Focus cd=180) SpellInfo(Dispersion cd=120) SpellInfo(Shadowfiend cd=300) @@ -55,17 +59,23 @@ if BuffPresent(SW stacks=5) and TargetDebuffExpires(SWP 0 mine=1) and TargetDead } #Refresh VT -if TargetDebuffExpires(VT 1.4 mine=1 haste=spell) and TargetDeadIn(more 8) - Spell(VT) +unless CheckBoxOn(multidot) and OtherDebuffPresent(VT) +{ + if TargetDebuffExpires(VT 1.4 mine=1 haste=spell) and TargetDeadIn(more 8) + Spell(VT) +} #cast MB if up Spell(MB) #Refresh devouring plague -if TargetDebuffExpires(DP 0 mine=1) and TargetDeadIn(more 8) - Spell(DP) +unless CheckBoxOn(multidot) and OtherDebuffPresent(DP) +{ + if TargetDebuffExpires(DP 0 mine=1) and TargetDeadIn(more 8) + Spell(DP) +} -if OtherDebuffExpires(SWP) +if CheckBoxOn(multidot) and OtherDebuffExpires(SWP) Texture(INV_Misc_Coin_01) #cast Mind flay if nothing else can be done -- 1.7.9.5