libs: skip library loading if already existing

This commit is contained in:
shagu
2018-09-30 13:44:03 +02:00
parent 2c66e5c0c2
commit 0e2303ae1e
4 changed files with 13 additions and 1 deletions
+4 -1
View File
@@ -8,6 +8,9 @@ setfenv(1, pfUI:GetEnvironment())
-- Returns `1` if the unit is within a 40y range
--
-- return instantly when another librange is already active
if pfUI.api.librange then return end
local librange = CreateFrame("Frame", "pfRangecheck", UIParent)
-- table of 40y spells per class
@@ -183,5 +186,5 @@ function librange:UnitInSpellRange(unit)
end
end
-- add libdebuff to pfUI API
-- add librange to pfUI API
pfUI.api.librange = librange