* Disabled range checking for non-healers
James Whitehead II [01-01-07 - 22:53]
* Disabled range checking for non-healers
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()