From d4ce50d26dc7d3e839714687eda423dd9ab7c940 Mon Sep 17 00:00:00 2001 From: Pawel Date: Sat, 24 Dec 2016 20:33:37 +0100 Subject: [PATCH] v7.1.4.1 - Aura filter support --- MaxDps.toc | 2 +- helper.lua | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/MaxDps.toc b/MaxDps.toc index f7d1991..b214065 100644 --- a/MaxDps.toc +++ b/MaxDps.toc @@ -1,6 +1,6 @@ ## Title: MaxDps ## Notes: Rotation helper framework. -## Version: 7.1.4 +## Version: 7.1.4.1 ## Author: Kaminaris ## Interface: 70100 ## SavedVariables: MaxDpsOptions diff --git a/helper.lua b/helper.lua index a90ad8d..3ff2d16 100644 --- a/helper.lua +++ b/helper.lua @@ -65,10 +65,11 @@ function MaxDps:PersistentAura(name) return false, 0; end -function MaxDps:Aura(name, timeShift) +function MaxDps:Aura(name, timeShift, filter) + filter = filter or nil; timeShift = timeShift or 0.2; local spellName = GetSpellInfo(name) or name; - local _, _, _, count, _, _, expirationTime = UnitAura('player', spellName); + local _, _, _, count, _, _, expirationTime = UnitAura('player', spellName, nil, filter); local time = GetTime(); if expirationTime ~= nil and (expirationTime - time) > timeShift then return true, count, (expirationTime - time); -- 1.7.9.5