* Removed range checking logic for non-healers
James Whitehead II [12-22-06 - 12:39]
* Removed range checking logic for non-healers
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 = {}