mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-25 21:40:49 +00:00
librange: query player class only once
This commit is contained in:
+2
-2
@@ -38,6 +38,8 @@ local spells = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local _, class = UnitClass("player")
|
||||||
|
|
||||||
-- units that should be scanned
|
-- units that should be scanned
|
||||||
local units = {}
|
local units = {}
|
||||||
table.insert(units, "pet")
|
table.insert(units, "pet")
|
||||||
@@ -61,8 +63,6 @@ librange:RegisterEvent("PLAYER_ENTERING_WORLD")
|
|||||||
librange:RegisterEvent("PLAYER_ENTER_COMBAT")
|
librange:RegisterEvent("PLAYER_ENTER_COMBAT")
|
||||||
librange:RegisterEvent("PLAYER_LEAVE_COMBAT")
|
librange:RegisterEvent("PLAYER_LEAVE_COMBAT")
|
||||||
librange:SetScript("OnEvent", function()
|
librange:SetScript("OnEvent", function()
|
||||||
local _, class = UnitClass("player")
|
|
||||||
|
|
||||||
-- disable range checking activities
|
-- disable range checking activities
|
||||||
if C.unitframes.rangecheck == "0" or not spells[class] then
|
if C.unitframes.rangecheck == "0" or not spells[class] then
|
||||||
this:Hide()
|
this:Hide()
|
||||||
|
|||||||
Reference in New Issue
Block a user