From 88cd3a54c0009c171e0a38dfb67507725b703e59 Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Thu, 18 Jun 2009 19:03:30 +0000 Subject: [PATCH] - bug : action bar were not updated when switching specs - added TargetBuffPresent git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@68 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Condition.lua | 17 +++++++++++++++++ Ovale.lua | 55 ++++++++++++------------------------------------------- Ovale.toc | 2 +- 3 files changed, 30 insertions(+), 44 deletions(-) diff --git a/Condition.lua b/Condition.lua index b88854c..8c5db26 100644 --- a/Condition.lua +++ b/Condition.lua @@ -415,6 +415,23 @@ Ovale.conditions= end return compare(Ovale.pointsTalent[condition[1]], condition[2], condition[3]) end, + -- Test if a buff is present on the target + -- 1 : buff spell id + -- stacks : how many stacks + TargetBuffPresent = function(condition) + local timeLeft, stacksLeft = GetTargetAura(condition, "HELPFUL", "target") + local tempsMin = avecHate(condition[2], condition.haste) + + if (timeLeft and (condition[2]==nil or timeLeft>tempsMin)) then + if (stacksLeft~=0 and condition.stacks and stacksLeft