initial commit v.2.1.0
This commit is contained in:
@@ -1,21 +1,40 @@
|
||||
-- Modules/RaidCooldownTracker.lua
|
||||
-- Raid cooldown tracker based on the shared single-frame tracker base.
|
||||
|
||||
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 Base = HMGT.SingleFrameTrackerBase
|
||||
if not Base then return end
|
||||
local module = HMGT:NewModule("RaidCooldownTracker")
|
||||
HMGT.RaidCooldownTracker = module
|
||||
|
||||
Base:CreateModule("RaidCooldownTracker", {
|
||||
profileKey = "raidCooldownTracker",
|
||||
frameName = "RaidCooldownTracker",
|
||||
module.definition = {
|
||||
moduleName = "RaidCooldownTracker",
|
||||
dbKey = "raidCooldownTracker",
|
||||
trackerType = "normal",
|
||||
trackerKey = "raidCooldownTracker",
|
||||
title = function()
|
||||
return L["RCD_TITLE"]
|
||||
end,
|
||||
demoKey = "raidCooldownTracker",
|
||||
database = function()
|
||||
return HMGT_SpellData.RaidCooldowns
|
||||
end,
|
||||
})
|
||||
categories = { "lust", "defensive", "healing", "tank", "utility", "offensive", "cc", "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
|
||||
|
||||
Reference in New Issue
Block a user