From 5842048e0f6d7b61b6b3ddb8e103abe1bb95beaf Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Sun, 19 Feb 2012 11:48:48 +0000 Subject: [PATCH] added debuffTick function git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@479 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Condition.lua | 17 +++++++++++++++++ Ovale.toc | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Condition.lua b/Condition.lua index 026297d..e976bd0 100644 --- a/Condition.lua +++ b/Condition.lua @@ -688,6 +688,23 @@ Ovale.conditions= local timeBefore = avecHate(condition[2], condition.haste) return start, addTime(ending, -timeBefore) end, + debuffTick = function(condition) + local start, ending = GetTargetAura(condition, "HARMFUL", getTarget(condition.target)) + local si = Ovale.spellInfo[condition[1]] + if not si or not si.duration then + return nil + end + local ticks = floor(Ovale.spellHaste * (si.duration/(si.tick or 3)) + 0.5) + local tickLength = (ending - start) / ticks + local tickTime = start + tickLength + for i=1,ticks do + if Ovale.currentTime<=tickTime then + break + end + tickTime = tickTime + tickLength + end + return tickTime, 0, -1 + end, Distance = function(condition) if LRC then local target = getTarget(condition.target) diff --git a/Ovale.toc b/Ovale.toc index d9aedb4..c825668 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: 4.3.9 +## Version: 4.3.10 ## OptionalDeps: Ace3, Masque, Recount, Skada, LibBabble-CreatureType-3.0, LibRangeCheck-2.0 ## SavedVariables: OvaleDB ## SavedVariablesPerCharacter: OvaleDBPC -- 1.7.9.5