From 47dbdc091fc838389d44c9eeff64f4f6763b41da Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Mon, 5 Jan 2009 22:55:12 +0000 Subject: [PATCH] - stacks for BuffPresent git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@3 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Condition.lua | 17 ++++++++++++++- Ovale.lua | 28 ++++++++++++++++++++++++- OvaleFrame.xml | 56 -------------------------------------------------- defaut/Demoniste.lua | 3 +++ defaut/Guerrier.lua | 27 ++++++++++++++++-------- 5 files changed, 65 insertions(+), 66 deletions(-) delete mode 100644 OvaleFrame.xml diff --git a/Condition.lua b/Condition.lua index fc80373..745752e 100644 --- a/Condition.lua +++ b/Condition.lua @@ -82,6 +82,7 @@ Ovale.conditions= end, -- Test if a buff is active -- 1 : the buff spell id + -- stacks : minimum number of stacks BuffPresent = function(condition) if (not condition[1]) then return nil @@ -94,7 +95,15 @@ Ovale.conditions= break end if (name == buffName and icon==buffIcon) then - return 0 + if (condition.stacks) then + if (count>=condition.stacks) then + return 0 + else + return nil + end + else + return 0 + end end i = i + 1; end @@ -127,6 +136,12 @@ Ovale.conditions= local points = GetComboPoints("player") return compare(points, condition[1], condition[2]) end, + -- Compare with the player level + -- 1 : "less" or "more" + -- 2 : the limit + Level = function(condition) + return compare(UnitLevel("player"), condition[1], condition[2]) + end, -- Test if the player life is bellow/above a given value in percent -- 1 : "less" or "more" -- 2 : the limit, in percent diff --git a/Ovale.lua b/Ovale.lua index 23c5d04..7e54ac6 100644 --- a/Ovale.lua +++ b/Ovale.lua @@ -35,6 +35,25 @@ local options = type = "group", args = { + apparence = + { + name = "Apparence", + type = "group", + args = + { + combatUniquement = + { + type = "toggle", + name = "Afficher en combat uniquement", + get = function(info) + return Ovale.db.profile.apparence.enCombat + end, + set = function(info, v) + Ovale.db.profile.apparence.enCombat = v + end + } + } + }, code = { name = "Code", @@ -170,9 +189,15 @@ function Ovale:OnEnable() end function Ovale:PLAYER_REGEN_ENABLED() + if (self.db.profile.apparence.enCombat) then + self.frame:Hide() + end end function Ovale:PLAYER_REGEN_DISABLED() + if (self.db.profile.apparence.enCombat) then + self.frame:Show() + end end function Ovale:OnDisable() @@ -576,7 +601,8 @@ function Ovale:ChargerDefaut() left = 0, top = 0, check = {}, - list = {} + list = {}, + apparence = {enCombat=false} } }) end diff --git a/OvaleFrame.xml b/OvaleFrame.xml deleted file mode 100644 index 1b70ed4..0000000 --- a/OvaleFrame.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - - - - OvaleFrame_OnMouseDown(self,button); - OvaleFrame_OnMouseUp(self,button); - OvaleFrame_OnLoad(self); - - OvaleFrame_OnUpdate(self); - - - - - - diff --git a/defaut/Demoniste.lua b/defaut/Demoniste.lua index 957d537..bfbb77c 100644 --- a/defaut/Demoniste.lua +++ b/defaut/Demoniste.lua @@ -25,6 +25,7 @@ Define(SHADOWBOLT 686) Define(HAUNT 48181) Define(TALENTBACKDRAFT 1888) Define(CONFLAGRATE 17962) +Define(DRAINSOUL 47855) if List(curse recklessness) and TargetDebuffExpires(CURSERECKLESSNESS 2) Spell(CURSERECKLESSNESS) @@ -40,6 +41,8 @@ if TargetDebuffExpires(CORRUPTION 0 mine=1) Spell(CORRUPTION) if TalentPoints(TALENTBACKDRAFT more 0) and TargetDebuffExpires(IMMOLATE 3 mine=1) and TargetDebuffPresent(IMMOLATE mine=1) Spell(CONFLAGRATE doNotRepeat=1) if TargetDebuffExpires(IMMOLATE 1.5 mine=1) Spell(IMMOLATE doNotRepeat=1) + +if TargetLifePercent(less 25) and Level(more 76) Spell(DRAINSOUL) if TalentPoints(TALENTEMBERSTORM more 0) Spell(SOULFIRE) Spell(SHADOWBOLT) diff --git a/defaut/Guerrier.lua b/defaut/Guerrier.lua index f4688ec..549f4eb 100644 --- a/defaut/Guerrier.lua +++ b/defaut/Guerrier.lua @@ -25,6 +25,9 @@ Define(SLAMTALENT 2233) Define(CLEAVE 845) Define(HEROICSTRIKE 78) Define(SUNDER 7386) +Define(CONCUSSIONBLOW 12809) +Define(REND 772) +Define(OVERPOWER 7384) if List(cri commandement) and BuffExpires(COMMANDSHOUT 3) Spell(COMMANDSHOUT) @@ -57,7 +60,12 @@ if Stance(3) #berserker { Spell(VICTORY usable=1) - if TargetLifePercent(less 20) Spell(EXECUTE) + # if TargetLifePercent(less 20) Spell(EXECUTE) + Spell(EXECUTE usable=1) + + Spell(SHIELDSLAM usable=1) + Spell(SHOCKWAVE) + Spell(CONCUSSIONBLOW) Spell(BLOODTHIRST) if CheckBoxOn(tourbillon) Spell(WHIRLWIND) @@ -65,20 +73,23 @@ if Stance(3) #berserker Spell(MORTALSTRIKE) Spell(DEVASTATE) - if Talent(SLAMTALENT more 1) and AfterWhiteHit(0.2) - Spell(SLAM) - - #todo execute par talent + if TalentPoints(SLAMTALENT more 1) and AfterWhiteHit(0.2) + Spell(SLAM) } if Stance(1) #combat { Spell(VICTORY usable=1) - if TargetLifePercent(less 20) Spell(EXECUTE) + Spell(OVERPOWER usable=1) Spell(MORTALSTRIKE) - Spell(DEVASTATE) - #todo + Spell(REND) + + Spell(SHIELDSLAM usable=1) + Spell(SHOCKWAVE) + Spell(CONCUSSIONBLOW) + + Spell(DEVASTATE) } if Mana(more 50) -- 1.7.9.5