mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-07 14:10:01 +00:00
New module - InnervateCall (only for druids)
- This module will call in group/raid and battleground if you innervated yourself or someone else. - The module will inform your group/raid/battleground if innervate is ready again.
This commit is contained in:
@@ -258,17 +258,20 @@ end
|
||||
-- a one-time prompt asking if they want to enable them.
|
||||
pfUI.new_modules = {}
|
||||
|
||||
function pfUI:RegisterNewModule(name, label)
|
||||
table.insert(pfUI.new_modules, { name = name, label = label })
|
||||
function pfUI:RegisterNewModule(name, label, class)
|
||||
table.insert(pfUI.new_modules, { name = name, label = label, class = class })
|
||||
end
|
||||
|
||||
function pfUI:CheckNewModules()
|
||||
pfUI_init.seen_modules = pfUI_init.seen_modules or {}
|
||||
|
||||
local pending = 0
|
||||
local _, playerClass = UnitClass("player")
|
||||
for _, entry in pairs(pfUI.new_modules) do
|
||||
if not pfUI_init.seen_modules[entry.name] and pfUI_init["finalize"] then
|
||||
pending = pending + 1
|
||||
if not entry.class or entry.class == playerClass then
|
||||
pending = pending + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -287,6 +290,10 @@ function pfUI:CheckNewModules()
|
||||
for _, entry in pairs(pfUI.new_modules) do
|
||||
local name = entry.name
|
||||
if not pfUI_init.seen_modules[name] then
|
||||
-- Skip modules restricted to a different class
|
||||
if entry.class and entry.class ~= playerClass then
|
||||
-- don't mark as seen - player might have a druid alt later
|
||||
else
|
||||
pfUI_init.seen_modules[name] = true
|
||||
|
||||
-- Only prompt existing users (firstrun wizard already ran)
|
||||
@@ -312,6 +319,7 @@ function pfUI:CheckNewModules()
|
||||
}
|
||||
StaticPopup_Show("PFUI_NEW_MODULE_" .. strupper(name))
|
||||
end
|
||||
end -- else (class match)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user