From c05998f28fd7368060c38148079a0cbb2d8ca4af Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Mon, 21 Apr 2014 05:03:01 +0000 Subject: [PATCH] Fix BuffCount() when the buff never expires. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1309 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- conditions/BuffCount.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conditions/BuffCount.lua b/conditions/BuffCount.lua index 95c871b..7a22dc8 100644 --- a/conditions/BuffCount.lua +++ b/conditions/BuffCount.lua @@ -1,6 +1,6 @@ --[[-------------------------------------------------------------------- Ovale Spell Priority - Copyright (C) 2013 Johnny C. Lam + Copyright (C) 2013, 2014 Johnny C. Lam This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License in the LICENSE @@ -36,8 +36,8 @@ do local _, filter, mine = ParseCondition(condition) local count, startChangeCount, endingChangeCount, startFirst, endingLast = state:AuraCount(auraId, filter, mine) - Ovale:Logf("BuffCount(%d) is %d, %d, %d, %d, %d", auraId, count, startChangeCount, endingChangeCount, startFirst, endingLast) - if count > 0 then + Ovale:Logf("BuffCount(%d) is %s, %s, %s, %s, %s", auraId, count, startChangeCount, endingChangeCount, startFirst, endingLast) + if count > 0 and startChangeCount < math.huge then local origin = startChangeCount local rate = -1 / (endingChangeCount - startChangeCount) local start, ending = startFirst, endingLast -- 1.7.9.5