From c68041f16b22383709c92af334aa0c7bbd943dcd Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Fri, 22 Dec 2006 12:39:34 +0000 Subject: [PATCH] * Removed range checking logic for non-healers --- PerfectRaid.lua | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/PerfectRaid.lua b/PerfectRaid.lua index 3281401..7db6f3c 100644 --- a/PerfectRaid.lua +++ b/PerfectRaid.lua @@ -572,6 +572,7 @@ function PerfectRaid:ShowHideTitles() end end + local class = select(2, UnitClass("player")) local spells = { DRUID = "Healing Touch", @@ -582,20 +583,22 @@ local spells = { local rangespell = spells[class] -local elapsed = 0 -function PerfectRaid.OnUpdate(frame, arg1) - for unit,tbl in pairs(frames) do - local range = IsSpellInRange(rangespell, unit) == 1 - local alpha = range and 1.0 or 0.3 - for frame in pairs(tbl) do - frame:SetAlpha(alpha) +if rangespell then + local elapsed = 0 + function PerfectRaid.OnUpdate(frame, arg1) + for unit,tbl in pairs(frames) do + local range = IsSpellInRange(rangespell, unit) == 1 + local alpha = range and 1.0 or 0.3 + for frame in pairs(tbl) do + frame:SetAlpha(alpha) + end end + elapsed = 0 end - elapsed = 0 -end -local frame = CreateFrame("Frame", "PRUpdateFrame") -frame:SetScript("OnUpdate", PerfectRaid.OnUpdate) + local frame = CreateFrame("Frame", "PRUpdateFrame") + frame:SetScript("OnUpdate", PerfectRaid.OnUpdate) +end local buffcache = {} local work = {} -- 1.7.9.5