From e9b64b99e602caf67c72e5ccd731584447b444b8 Mon Sep 17 00:00:00 2001 From: Taracque Date: Fri, 1 Mar 2013 13:01:52 +0100 Subject: [PATCH] Blood Charges indicator now removed if buff expired. v0.7.1 --- DKCrutch.lua | 22 +++++++++++++--------- DKCrutch.toc | 2 +- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/DKCrutch.lua b/DKCrutch.lua index 0852778..50ac20a 100755 --- a/DKCrutch.lua +++ b/DKCrutch.lua @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- DKCrutch 0.7.0 +-- DKCrutch 0.7.1 -- -- Death Knight rune tracker and ability advisor ------------------------------------------------------------------------------- @@ -8,7 +8,7 @@ DKCrutch = {Locals = {}} local L = DKCrutch.Locals -DKCrutch.versionNumber = '0.7.0' +DKCrutch.versionNumber = '0.7.1' DKCrutch.talent = "" DKCrutch.talentUnsure = true DKCrutch.DebugMode = false @@ -977,16 +977,20 @@ function DKCrutch:Update() end local name ,_ , _, count = DKCrutch:hasBuff("player", DKCrutch.SpellList["Blood Charge"]); - if (name) and (count ~= DKCrutch.lastBloodCharge) then - local x,y + if (name) then + if (count ~= DKCrutch.lastBloodCharge) then + local x,y - DKCrutch.lastBloodCharge = count; + DKCrutch.lastBloodCharge = count; - y = math.floor(count / 4); - x = count - (y * 4); + y = math.floor(count / 4); + x = count - (y * 4); - DKCrutch:Debug("X,Y: " .. x, y); - DKCrutch.bloodFrame.texture:SetTexCoord(x / 4, (x / 4) + 0.25, y / 4, (y / 4) + 0.25); + DKCrutch:Debug("X,Y: " .. x, y); + DKCrutch.bloodFrame.texture:SetTexCoord(x / 4, (x / 4) + 0.25, y / 4, (y / 4) + 0.25); + end + else + DKCrutch.lastBloodCharge = 0; end end if (not DKCrutchDB.debuffDisabled) then diff --git a/DKCrutch.toc b/DKCrutch.toc index f598004..ccaea9d 100755 --- a/DKCrutch.toc +++ b/DKCrutch.toc @@ -2,7 +2,7 @@ ## Title: DKCrutch ## Notes: Death Knight rune tracker and rotation helper ## Author: Taracque, Dšgrov‡s of Arathor -## Version: 0.7.0 +## Version: 0.7.1 ## SavedVariables: DKCrutchDB ## OptionalDeps: ## Dependencies: -- 1.7.9.5