From 4c53385a50e9687735822e4d278955f7676f80f7 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Mon, 1 Jan 2007 22:53:37 +0000 Subject: [PATCH] * Disabled range checking for non-healers --- PerfectRaid_Range.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/PerfectRaid_Range.lua b/PerfectRaid_Range.lua index 20a48b2..21e1136 100644 --- a/PerfectRaid_Range.lua +++ b/PerfectRaid_Range.lua @@ -40,6 +40,8 @@ function Range:Initialize() frames = PerfectRaid.frames end +-- TODO: Only works for healers, make it an option + function Range:Enable() if not PerfectRaid.defaults.profile.RangeCheck then return end local class = select(2, UnitClass("player")) @@ -52,13 +54,15 @@ function Range:Enable() rangespell = spells[class] - if not self.frame then - self.frame = CreateFrame("Frame") + if rangespell then + if not self.frame then + self.frame = CreateFrame("Frame") + end + self.frame:SetScript("OnUpdate", self.OnUpdate) + rate = PerfectRaid.db.profile.RangeRate + alpha = PerfectRaid.db.profile.RangeAlpha + self:RegisterEvent("DONGLE_PROFILE_CHANGED") end - self.frame:SetScript("OnUpdate", self.OnUpdate) - rate = PerfectRaid.db.profile.RangeRate - alpha = PerfectRaid.db.profile.RangeAlpha - self:RegisterEvent("DONGLE_PROFILE_CHANGED") end function Range:Disable() -- 1.7.9.5