mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 22:20:00 +00:00
libs: skip library loading if already existing
This commit is contained in:
@@ -25,6 +25,9 @@ setfenv(1, pfUI:GetEnvironment())
|
||||
-- spell can be set to "INTERRUPT" to force remove an action.
|
||||
--
|
||||
|
||||
-- return instantly when another libcast is already active
|
||||
if pfUI.api.libcast then return end
|
||||
|
||||
local libcast = CreateFrame("Frame", "pfEnemyCast")
|
||||
local player = UnitName("player")
|
||||
|
||||
|
||||
+4
-1
@@ -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
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
-- load pfUI environment
|
||||
setfenv(1, pfUI:GetEnvironment())
|
||||
|
||||
-- return instantly when another libspell is already active
|
||||
if pfUI.api.libspell then return end
|
||||
|
||||
local scanner = libtipscan:GetScanner("libspell")
|
||||
local libspell = {}
|
||||
|
||||
|
||||
@@ -25,6 +25,9 @@ setfenv(1, pfUI:GetEnvironment())
|
||||
-- <scanner>:List()
|
||||
-- prints a list of all available scanner methods
|
||||
|
||||
-- return instantly when another libtipscan is already active
|
||||
if pfUI.api.libtipscan then return end
|
||||
|
||||
local libtipscan = {}
|
||||
local baseName = "pfUIScan"
|
||||
local methods = {
|
||||
|
||||
Reference in New Issue
Block a user