Files
HailMaryGuildTools/Modules/Tracker/GroupCooldownTracker/GroupCooldownTracker.lua
2026-04-24 23:43:55 +02:00

66 lines
1.8 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()
local profile = HMGT.db and HMGT.db.profile
return profile and profile[self.definition.dbKey] or 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