Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Util:CreateCheck(Name,ID)
- local Ingredient = CraftIDToProfessionInfo:spellIDToIngredients(ID)
- local DName = CraftIDToProfessionInfo:spellIDToName(ID)
- local Check
- TSM:CoolDownTimes(ID) -- Refresh DB for ID
- if (DName and Ingredient) then
- Check = {
- type = "CheckBox",
- value = TSM.db.factionrealm["CoolDowns"][ID]["Enabled"],
- label = DName.." "..Ingredient..TSM.cdTime,
- fullWidth = false,
- callback = function()
- if TSM.db.factionrealm["CoolDowns"][ID]["Enabled"] == false then
- TSM.db.factionrealm["CoolDowns"][ID]["Enabled"] = true
- elseif TSM.db.factionrealm["CoolDowns"][ID]["Enabled"] == true then
- TSM.db.factionrealm["CoolDowns"][ID]["Enabled"] = false
- end
- end
- }
- else
- Ingredient = "|cff44bbccID "..ID.." |r"
- --print("|cffffcc00TSM_CoolDowns:|r Spell ID#"..ID.." Not found or returned nil, please report to the addon author that "..ID.." was not found")
- Check = {
- type = "CheckBox",
- value = TSM.db.factionrealm["CoolDowns"][ID]["Enabled"],
- label = Name.." "..Ingredient..TSM.cdTime,
- tooltip = "Please report this Spell ID to the addon author.",
- fullWidth = false,
- callback = function()
- if TSM.db.factionrealm["CoolDowns"][ID]["Enabled"] == false then
- TSM.db.factionrealm["CoolDowns"][ID]["Enabled"] = true
- elseif TSM.db.factionrealm["CoolDowns"][ID]["Enabled"] == true then
- TSM.db.factionrealm["CoolDowns"][ID]["Enabled"] = false
- end
- end
- }
- end
- return Check
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement