70 lines
1.9 KiB
Lua
70 lines
1.9 KiB
Lua
local ADDON_NAME = "HailMaryGuildTools"
|
|
local HMGT = LibStub("AceAddon-3.0"):GetAddon(ADDON_NAME)
|
|
if not HMGT then return end
|
|
|
|
local L = LibStub("AceLocale-3.0"):GetLocale(ADDON_NAME)
|
|
|
|
local module = HMGT:NewModule("GroupCooldownTracker")
|
|
HMGT.GroupCooldownTracker = module
|
|
|
|
module.definition = {
|
|
moduleName = "GroupCooldownTracker",
|
|
dbKey = "groupCooldownTracker",
|
|
trackerType = "group",
|
|
trackerKey = "groupCooldownTracker",
|
|
title = function()
|
|
return L["GCD_TITLE"]
|
|
end,
|
|
categories = { "tank", "defensive", "healing", "cc", "utility", "offensive", "lust", "interrupt" },
|
|
}
|
|
|
|
function module:GetDefinition()
|
|
return self.definition
|
|
end
|
|
|
|
function module:GetSettings()
|
|
for _, tracker in ipairs(HMGT:GetTrackerConfigs()) do
|
|
if tracker.trackerKey == self.definition.trackerKey then
|
|
return tracker
|
|
end
|
|
end
|
|
return nil
|
|
end
|
|
|
|
function module:Enable()
|
|
if HMGT.TrackerManager and HMGT.TrackerManager.Enable then
|
|
HMGT.TrackerManager:Enable()
|
|
end
|
|
end
|
|
|
|
function module:Disable()
|
|
if HMGT.TrackerManager and HMGT.TrackerManager.UpdateDisplay then
|
|
HMGT.TrackerManager:UpdateDisplay()
|
|
end
|
|
end
|
|
|
|
function module:SetLockedAll(locked)
|
|
if HMGT.TrackerManager and HMGT.TrackerManager.SetAllLocked then
|
|
HMGT.TrackerManager:SetAllLocked(locked)
|
|
end
|
|
end
|
|
|
|
function module:RefreshAnchors(force)
|
|
if HMGT.TrackerManager and HMGT.TrackerManager.RefreshAnchors then
|
|
HMGT.TrackerManager:RefreshAnchors(force)
|
|
end
|
|
end
|
|
|
|
function module:InvalidateAnchorLayout()
|
|
if HMGT.TrackerManager and HMGT.TrackerManager.InvalidateAnchorLayout then
|
|
HMGT.TrackerManager:InvalidateAnchorLayout()
|
|
end
|
|
end
|
|
|
|
function module:GetAnchorableFrames()
|
|
if HMGT.TrackerManager and HMGT.TrackerManager.GetAnchorableFrames then
|
|
return HMGT.TrackerManager:GetAnchorableFrames()
|
|
end
|
|
return {}
|
|
end
|