cleanup
This commit is contained in:
parent
e45118484b
commit
048fbb55e7
@ -554,8 +554,6 @@ function Auras:Test(unit)
|
|||||||
self:AURA_GAIN(unit,v.value.track, spellid, spellName, icon, duration, GetTime() + duration)
|
self:AURA_GAIN(unit,v.value.track, spellid, spellName, icon, duration, GetTime() + duration)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- /run LibStub("Gladdy").modules["Auras"]:Test("arena1")
|
|
||||||
-- /run LibStub("Gladdy"):JoinedArena()
|
|
||||||
|
|
||||||
--Interrupts
|
--Interrupts
|
||||||
if (unit == "arena1" or unit == "arena3") then
|
if (unit == "arena1" or unit == "arena3") then
|
||||||
|
@ -115,7 +115,6 @@ end
|
|||||||
|
|
||||||
function Cooldowns:CreateFrame(unit)
|
function Cooldowns:CreateFrame(unit)
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
-- Cooldown frame
|
|
||||||
local spellCooldownFrame = CreateFrame("Frame", nil, button)
|
local spellCooldownFrame = CreateFrame("Frame", nil, button)
|
||||||
spellCooldownFrame:EnableMouse(false)
|
spellCooldownFrame:EnableMouse(false)
|
||||||
spellCooldownFrame:SetMovable(true)
|
spellCooldownFrame:SetMovable(true)
|
||||||
@ -126,7 +125,7 @@ function Cooldowns:CreateFrame(unit)
|
|||||||
self.frames[unit] = spellCooldownFrame
|
self.frames[unit] = spellCooldownFrame
|
||||||
end
|
end
|
||||||
|
|
||||||
function Cooldowns:CreateIcon() -- returns iconFrame
|
function Cooldowns:CreateIcon()
|
||||||
local icon
|
local icon
|
||||||
if (#self.iconCache > 0) then
|
if (#self.iconCache > 0) then
|
||||||
icon = tremove(self.iconCache, #self.iconCache)
|
icon = tremove(self.iconCache, #self.iconCache)
|
||||||
@ -264,7 +263,6 @@ end
|
|||||||
|
|
||||||
function Cooldowns:UpdateFrame(unit)
|
function Cooldowns:UpdateFrame(unit)
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
-- Cooldown frame
|
|
||||||
local testAgain = false
|
local testAgain = false
|
||||||
if (Gladdy.db.cooldown) then
|
if (Gladdy.db.cooldown) then
|
||||||
button.spellCooldownFrame:SetHeight(Gladdy.db.cooldownSize)
|
button.spellCooldownFrame:SetHeight(Gladdy.db.cooldownSize)
|
||||||
@ -359,7 +357,7 @@ function Cooldowns:Test(unit)
|
|||||||
if Gladdy.frame.testing then
|
if Gladdy.frame.testing then
|
||||||
self:UpdateTestCooldowns(unit)
|
self:UpdateTestCooldowns(unit)
|
||||||
end
|
end
|
||||||
Cooldowns:AURA_GAIN(_, AURA_TYPE_BUFF, "22812", "Barkskin", _, 20, _, _, _, _, unit, true) -- unit, auraType, spellID, spellName, texture, duration, expirationTime
|
Cooldowns:AURA_GAIN(_, AURA_TYPE_BUFF, "22812", "Barkskin", _, 20, _, _, _, _, unit, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Cooldowns:UpdateTestCooldowns(unit)
|
function Cooldowns:UpdateTestCooldowns(unit)
|
||||||
@ -403,10 +401,6 @@ function Cooldowns:UNIT_DESTROYED(unit)
|
|||||||
self:ResetUnit(unit)
|
self:ResetUnit(unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
|
||||||
/run local a=LibStub("Gladdy").modules["Cooldowns"] a:AURA_GAIN("arena1",22812)
|
|
||||||
/run local a=LibStub("Gladdy").modules["Cooldowns"] a:AURA_FADE("arena1",22812)
|
|
||||||
--]]
|
|
||||||
function Cooldowns:AURA_GAIN(_, auraType, spellID, spellName, _, duration, _, _, _, _, unitCaster, test)
|
function Cooldowns:AURA_GAIN(_, auraType, spellID, spellName, _, duration, _, _, _, _, unitCaster, test)
|
||||||
local arenaUnit = test and unitCaster or Gladdy:GetArenaUnit(unitCaster, true)
|
local arenaUnit = test and unitCaster or Gladdy:GetArenaUnit(unitCaster, true)
|
||||||
if not Gladdy.db.cooldownIconGlow or not arenaUnit or not Gladdy.buttons[arenaUnit] or auraType ~= AURA_TYPE_BUFF then
|
if not Gladdy.db.cooldownIconGlow or not arenaUnit or not Gladdy.buttons[arenaUnit] or auraType ~= AURA_TYPE_BUFF then
|
||||||
@ -450,7 +444,6 @@ end
|
|||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
function Cooldowns:CooldownStart(button, spellId, duration, start)
|
function Cooldowns:CooldownStart(button, spellId, duration, start)
|
||||||
-- starts timer frame
|
|
||||||
if not duration or duration == nil or type(duration) ~= "number" then
|
if not duration or duration == nil or type(duration) ~= "number" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -526,13 +519,11 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond
|
|||||||
if not button then
|
if not button then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- if (self.db.cooldownList[spellId] == false) then return end
|
|
||||||
|
|
||||||
local cooldown = Gladdy:GetCooldownList()[unitClass][spellId]
|
local cooldown = Gladdy:GetCooldownList()[unitClass][spellId]
|
||||||
local cd = cooldown
|
local cd = cooldown
|
||||||
if (type(cooldown) == "table") then
|
if (type(cooldown) == "table") then
|
||||||
-- return if the spec doesn't have a cooldown for this spell
|
-- return if the spec doesn't have a cooldown for this spell
|
||||||
--if (arenaSpecs[unit] ~= nil and cooldown.notSpec ~= nil and arenaSpecs[unit] == cooldown.notSpec) then return end
|
|
||||||
if (button.spec ~= nil and cooldown.notSpec ~= nil and button.spec == cooldown.notSpec) then
|
if (button.spec ~= nil and cooldown.notSpec ~= nil and button.spec == cooldown.notSpec) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -545,7 +536,6 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, expirationTimeInSecond
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- check if there is a special cooldown for the units spec
|
-- check if there is a special cooldown for the units spec
|
||||||
--if (arenaSpecs[unit] ~= nil and cooldown[arenaSpecs[unit]] ~= nil) then
|
|
||||||
if (button.spec ~= nil and cooldown[button.spec] ~= nil) then
|
if (button.spec ~= nil and cooldown[button.spec] ~= nil) then
|
||||||
cd = cooldown[button.spec]
|
cd = cooldown[button.spec]
|
||||||
else
|
else
|
||||||
|
@ -7,7 +7,6 @@ local CreateFrame = CreateFrame
|
|||||||
local GetTime = GetTime
|
local GetTime = GetTime
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
--local DRData = LibStub("DRData-1.0-BCC")
|
|
||||||
local DRData = LibStub("DRList-1.0")
|
local DRData = LibStub("DRList-1.0")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local function defaultCategories()
|
local function defaultCategories()
|
||||||
|
@ -146,7 +146,6 @@ local function getGradient(start, ending, percentage, factor)
|
|||||||
return start * abs(-2 * percentage + 1) + ending * factor
|
return start * abs(-2 * percentage + 1) + ending * factor
|
||||||
end
|
end
|
||||||
|
|
||||||
-- /run LibStub("Gladdy").modules["Health Bar"]:SetHealthStatusBarColor("arena1", 51, 100)
|
|
||||||
local rMax, gMax, bMax, rMid, gMid, bMid, rMin, gMin, bMin, rNow, gNow, bNow, percentage, factor, stealthAlpha
|
local rMax, gMax, bMax, rMid, gMid, bMid, rMin, gMin, bMin, rNow, gNow, bNow, percentage, factor, stealthAlpha
|
||||||
function Healthbar:SetHealthStatusBarColor(unit, health, healthMax)
|
function Healthbar:SetHealthStatusBarColor(unit, health, healthMax)
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
|
@ -357,8 +357,6 @@ function RangeCheck:GetSpells()
|
|||||||
end,
|
end,
|
||||||
set = function(_, value)
|
set = function(_, value)
|
||||||
Gladdy.db.rangeCheckDefaultSpells[class].min = tonumber(value)
|
Gladdy.db.rangeCheckDefaultSpells[class].min = tonumber(value)
|
||||||
--Gladdy.options.args["Range Check"].args.oorSpells.args[class].args.min.name = GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min) and format("|T%s:20|t %s", select(3, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(1, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)))
|
|
||||||
-- or "nil"
|
|
||||||
Gladdy.options.args["Range Check"].args.oorSpells.args[class].args.headerMin.name = GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min) and format("|T%s:20|t %s - %d" .. L["yds"], select(3, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(1, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(6, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)))
|
Gladdy.options.args["Range Check"].args.oorSpells.args[class].args.headerMin.name = GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min) and format("|T%s:20|t %s - %d" .. L["yds"], select(3, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(1, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)), select(6, GetSpellInfo(Gladdy.db.rangeCheckDefaultSpells[class].min)))
|
||||||
or "nil"
|
or "nil"
|
||||||
end
|
end
|
||||||
|
@ -25,9 +25,6 @@ local ShadowsightTimer = Gladdy:NewModule("Shadowsight Timer", nil, {
|
|||||||
shadowsightTimerFrameLevel = 20,
|
shadowsightTimerFrameLevel = 20,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- /run LibStub("Gladdy").modules["Shadowsight Timer"]:AURA_GAIN(nil, nil, 34709)
|
|
||||||
-- /run LibStub("Gladdy").modules["Shadowsight Timer"].timerFrame1:SetAlpha(0)
|
|
||||||
|
|
||||||
function ShadowsightTimer:OnEvent(event, ...)
|
function ShadowsightTimer:OnEvent(event, ...)
|
||||||
self[event](self, ...)
|
self[event](self, ...)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user