From 4f21cf175298e422373876959446542ee64f981f Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Sat, 7 Feb 2009 19:51:46 +0000 Subject: [PATCH] option haste=spell or haste=melee added to some functions git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@20 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Condition.lua | 24 ++++++++++++++++++----- Ovale.lua | 53 +++++++++++++++++++++++++++++++++++++++++++++++++- Ovale.toc | 2 +- defaut/Demoniste.lua | 4 ++-- defaut/Pretre.lua | 2 +- 5 files changed, 75 insertions(+), 10 deletions(-) diff --git a/Condition.lua b/Condition.lua index ef0da9e..9437928 100644 --- a/Condition.lua +++ b/Condition.lua @@ -1,5 +1,17 @@ local LBCT = LibStub("LibBabble-CreatureType-3.0"):GetLookupTable() +local function avecHate(temps, hate) + if (not hate) then + return temps + elseif (hate == "spell") then + return temps/(1+Ovale.spellHaste/100) + elseif (hate == "melee") then + return temps/(1+Ovale.meleeHaste/100) + else + return temps + end +end + local function compare(a, comparison, b) if (comparison == "more") then if (not b or (a~=nil and a>b)) then @@ -64,7 +76,7 @@ Ovale.conditions= -- 2 : expiration time BuffExpires = function(condition) local buffName = Ovale:GetSpellInfoOrNil(condition[1]) - i=1; + local i=1; while (true) do local name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitBuff("player", i); if (not name) then @@ -72,10 +84,11 @@ Ovale.conditions= end if (name == buffName) then local timeLeft = expirationTime - Ovale.maintenant - if (timeLeft