Merge branch 'release/v1.17' into main
This commit is contained in:
commit
90b146e433
@ -508,6 +508,13 @@ local importantAuras = {
|
|||||||
priority = 20,
|
priority = 20,
|
||||||
spellID = 31224,
|
spellID = 31224,
|
||||||
},
|
},
|
||||||
|
-- Evasion
|
||||||
|
[GetSpellInfo(26669)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 15,
|
||||||
|
priority = 10,
|
||||||
|
spellID = 26669,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
-- Fear
|
-- Fear
|
||||||
@ -527,6 +534,13 @@ local importantAuras = {
|
|||||||
priority = 40,
|
priority = 40,
|
||||||
spellID = 27223,
|
spellID = 27223,
|
||||||
},
|
},
|
||||||
|
--Banish
|
||||||
|
[GetSpellInfo(710)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 710,
|
||||||
|
},
|
||||||
-- Shadowfury
|
-- Shadowfury
|
||||||
[GetSpellInfo(30283)] = {
|
[GetSpellInfo(30283)] = {
|
||||||
track = AURA_TYPE_DEBUFF,
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
14
Frame.lua
14
Frame.lua
@ -32,6 +32,12 @@ Gladdy.BUTTON_DEFAULTS = {
|
|||||||
|
|
||||||
function Gladdy:CreateFrame()
|
function Gladdy:CreateFrame()
|
||||||
self.frame = CreateFrame("Frame", "GladdyFrame", UIParent)
|
self.frame = CreateFrame("Frame", "GladdyFrame", UIParent)
|
||||||
|
|
||||||
|
self.frame.background = CreateFrame("Frame", nil, self.frame, BackdropTemplateMixin and "BackdropTemplate")
|
||||||
|
self.frame.background:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = false, tileSize = 16})
|
||||||
|
self.frame.background:SetFrameStrata("BACKGROUND")
|
||||||
|
self.frame.background:SetBackdropColor(self.db.backgroundColor.r, self.db.backgroundColor.g, self.db.backgroundColor.b, self.db.backgroundColor.a)
|
||||||
|
self.frame.background:SetAllPoints(self.frame)
|
||||||
--self.frame.texture = self.frame:CreateTexture(nil, "OVERLAY")
|
--self.frame.texture = self.frame:CreateTexture(nil, "OVERLAY")
|
||||||
--self.frame.texture:SetAllPoints(self.frame)
|
--self.frame.texture:SetAllPoints(self.frame)
|
||||||
--self.frame.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
--self.frame.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
||||||
@ -104,7 +110,7 @@ function Gladdy:CreateFrame()
|
|||||||
self.anchor:Hide()
|
self.anchor:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
self.frame:Hide()
|
self.frame:SetAlpha(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:UpdateFrame()
|
function Gladdy:UpdateFrame()
|
||||||
@ -186,6 +192,8 @@ function Gladdy:UpdateFrame()
|
|||||||
self.frame:SetScale(self.db.frameScale)
|
self.frame:SetScale(self.db.frameScale)
|
||||||
self.frame:SetWidth(width)
|
self.frame:SetWidth(width)
|
||||||
self.frame:SetHeight(height)
|
self.frame:SetHeight(height)
|
||||||
|
self.frame:ClearAllPoints()
|
||||||
|
self.frame.background:SetBackdropColor(self.db.backgroundColor.r, self.db.backgroundColor.g, self.db.backgroundColor.b, self.db.backgroundColor.a)
|
||||||
--self.frame:SetBackdropColor(self.db.frameColor.r, self.db.frameColor.g, self.db.frameColor.b, self.db.frameColor.a)
|
--self.frame:SetBackdropColor(self.db.frameColor.r, self.db.frameColor.g, self.db.frameColor.b, self.db.frameColor.a)
|
||||||
self.frame:ClearAllPoints()
|
self.frame:ClearAllPoints()
|
||||||
if (self.db.x == 0 and self.db.y == 0) then
|
if (self.db.x == 0 and self.db.y == 0) then
|
||||||
@ -271,7 +279,7 @@ end
|
|||||||
|
|
||||||
function Gladdy:HideFrame()
|
function Gladdy:HideFrame()
|
||||||
if (self.frame) then
|
if (self.frame) then
|
||||||
self.frame:Hide()
|
self.frame:SetAlpha(0)
|
||||||
self.frame.testing = nil
|
self.frame.testing = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -297,7 +305,7 @@ function Gladdy:ToggleFrame(i)
|
|||||||
self.curBracket = i
|
self.curBracket = i
|
||||||
self:UpdateFrame()
|
self:UpdateFrame()
|
||||||
self:Test()
|
self:Test()
|
||||||
self.frame:Show()
|
self.frame:SetAlpha(1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
45
Gladdy.lua
45
Gladdy.lua
@ -25,7 +25,7 @@ local MAJOR, MINOR = "Gladdy", 4
|
|||||||
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
|
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
|
||||||
local L
|
local L
|
||||||
Gladdy.version_major_num = 1
|
Gladdy.version_major_num = 1
|
||||||
Gladdy.version_minor_num = 0.16
|
Gladdy.version_minor_num = 0.17
|
||||||
Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num
|
Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num
|
||||||
Gladdy.version_releaseType = RELEASE_TYPES.beta
|
Gladdy.version_releaseType = RELEASE_TYPES.beta
|
||||||
Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType
|
Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType
|
||||||
@ -205,7 +205,7 @@ function Gladdy:OnInitialize()
|
|||||||
L = self.L
|
L = self.L
|
||||||
|
|
||||||
self.testData = {
|
self.testData = {
|
||||||
["arena1"] = { name = "Swift", raceLoc = L["Tauren"], classLoc = L["Warrior"], class = "WARRIOR", health = 9635, healthMax = 14207, power = 76, powerMax = 100, powerType = 1, testSpec = L["Arms"], race = "Tauren" },
|
["arena1"] = { name = "Swift", raceLoc = L["NightElf"], classLoc = L["Warrior"], class = "WARRIOR", health = 9635, healthMax = 14207, power = 76, powerMax = 100, powerType = 1, testSpec = L["Arms"], race = "NightElf" },
|
||||||
["arena2"] = { name = "Vilden", raceLoc = L["Undead"], classLoc = L["Mage"], class = "MAGE", health = 10969, healthMax = 11023, power = 7833, powerMax = 10460, powerType = 0, testSpec = L["Frost"], race = "Scourge" },
|
["arena2"] = { name = "Vilden", raceLoc = L["Undead"], classLoc = L["Mage"], class = "MAGE", health = 10969, healthMax = 11023, power = 7833, powerMax = 10460, powerType = 0, testSpec = L["Frost"], race = "Scourge" },
|
||||||
["arena3"] = { name = "Krymu", raceLoc = L["Human"], classLoc = L["Rogue"], class = "ROGUE", health = 1592, healthMax = 11740, power = 45, powerMax = 110, powerType = 3, testSpec = L["Subtlety"], race = "Human" },
|
["arena3"] = { name = "Krymu", raceLoc = L["Human"], classLoc = L["Rogue"], class = "ROGUE", health = 1592, healthMax = 11740, power = 45, powerMax = 110, powerType = 3, testSpec = L["Subtlety"], race = "Human" },
|
||||||
["arena4"] = { name = "Talmon", raceLoc = L["Human"], classLoc = L["Warlock"], class = "WARLOCK", health = 10221, healthMax = 14960, power = 9855, powerMax = 9855, powerType = 0, testSpec = L["Demonology"], race = "Human" },
|
["arena4"] = { name = "Talmon", raceLoc = L["Human"], classLoc = L["Warlock"], class = "WARLOCK", health = 10221, healthMax = 14960, power = 9855, powerMax = 9855, powerType = 0, testSpec = L["Demonology"], race = "Human" },
|
||||||
@ -229,7 +229,13 @@ function Gladdy:OnInitialize()
|
|||||||
end
|
end
|
||||||
self:DeleteUnknownOptions(self.db, self.defaults.profile)
|
self:DeleteUnknownOptions(self.db, self.defaults.profile)
|
||||||
if Gladdy.db.hideBlizzard == "always" then
|
if Gladdy.db.hideBlizzard == "always" then
|
||||||
SetCVar("showArenaEnemyFrames", 0)
|
if IsAddOnLoaded("Blizzard_ArenaUI") then
|
||||||
|
ArenaEnemyFrame1:SetAlpha(0)
|
||||||
|
ArenaEnemyFrame2:SetAlpha(0)
|
||||||
|
ArenaEnemyFrame3:SetAlpha(0)
|
||||||
|
ArenaEnemyFrame4:SetAlpha(0)
|
||||||
|
ArenaEnemyFrame5:SetAlpha(0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -245,11 +251,15 @@ function Gladdy:OnEnable()
|
|||||||
self:RegisterEvent("UPDATE_BATTLEFIELD_STATUS")
|
self:RegisterEvent("UPDATE_BATTLEFIELD_STATUS")
|
||||||
self:RegisterEvent("PLAYER_ENTERING_WORLD")
|
self:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||||
|
|
||||||
if (IsAddOnLoaded("Clique")) then
|
self:CreateFrame()
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
self:CreateButton(i)
|
self:CreateButton(i)
|
||||||
end
|
end
|
||||||
|
self.curBracket = 5
|
||||||
|
self:UpdateFrame()
|
||||||
|
self:Reset()
|
||||||
|
|
||||||
|
if (IsAddOnLoaded("Clique")) then
|
||||||
ClickCastFrames = ClickCastFrames or {}
|
ClickCastFrames = ClickCastFrames or {}
|
||||||
ClickCastFrames[self.buttons.arena1.secure] = true
|
ClickCastFrames[self.buttons.arena1.secure] = true
|
||||||
ClickCastFrames[self.buttons.arena2.secure] = true
|
ClickCastFrames[self.buttons.arena2.secure] = true
|
||||||
@ -365,7 +375,13 @@ function Gladdy:Reset()
|
|||||||
self:ResetUnit(unit)
|
self:ResetUnit(unit)
|
||||||
end
|
end
|
||||||
if Gladdy.db.hideBlizzard == "never" or Gladdy.db.hideBlizzard == "arena" then
|
if Gladdy.db.hideBlizzard == "never" or Gladdy.db.hideBlizzard == "arena" then
|
||||||
SetCVar("showArenaEnemyFrames", 1)
|
if IsAddOnLoaded("Blizzard_ArenaUI") then
|
||||||
|
ArenaEnemyFrame1:SetAlpha(1)
|
||||||
|
ArenaEnemyFrame2:SetAlpha(1)
|
||||||
|
ArenaEnemyFrame3:SetAlpha(1)
|
||||||
|
ArenaEnemyFrame4:SetAlpha(1)
|
||||||
|
ArenaEnemyFrame5:SetAlpha(1)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -412,19 +428,18 @@ function Gladdy:JoinedArena()
|
|||||||
self.curBracket = 2
|
self.curBracket = 2
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, self.curBracket do
|
Gladdy:SendMessage("JOINED_ARENA")
|
||||||
if (not self.buttons["arena" .. i]) then
|
self.frame:SetAlpha(1)
|
||||||
self:CreateButton(i)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
self:SendMessage("JOINED_ARENA")
|
|
||||||
self:UpdateFrame()
|
|
||||||
self.frame:Show()
|
|
||||||
for i=1, self.curBracket do
|
for i=1, self.curBracket do
|
||||||
self.buttons["arena" .. i]:SetAlpha(1)
|
self.buttons["arena" .. i]:SetAlpha(1)
|
||||||
end
|
end
|
||||||
if Gladdy.db.hideBlizzard == "arena" or Gladdy.db.hideBlizzard == "always" then
|
if Gladdy.db.hideBlizzard == "arena" or Gladdy.db.hideBlizzard == "always" then
|
||||||
SetCVar("showArenaEnemyFrames", 0)
|
if IsAddOnLoaded("Blizzard_ArenaUI") then
|
||||||
|
ArenaEnemyFrame1:SetAlpha(0)
|
||||||
|
ArenaEnemyFrame2:SetAlpha(0)
|
||||||
|
ArenaEnemyFrame3:SetAlpha(0)
|
||||||
|
ArenaEnemyFrame4:SetAlpha(0)
|
||||||
|
ArenaEnemyFrame5:SetAlpha(0)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
## Interface: 20501
|
## Interface: 20501
|
||||||
## Title: Gladdy - TBC
|
## Title: Gladdy - TBC
|
||||||
## Version: 1.16-Beta
|
## Version: 1.17-Beta
|
||||||
## Notes: The most powerful arena AddOn for WoW 2.5.1
|
## Notes: The most powerful arena AddOn for WoW 2.5.1
|
||||||
## Author: XiconQoo, DnB_Junkee, Knall
|
## Author: XiconQoo, DnB_Junkee, Knall
|
||||||
## X-Email: contact me on discord Knall#1751
|
## X-Email: contact me on discord Knall#1751
|
||||||
|
Binary file not shown.
BIN
Images/BasicProfiles/Rukk1.blp
Normal file
BIN
Images/BasicProfiles/Rukk1.blp
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
2
Lang.lua
2
Lang.lua
@ -427,7 +427,7 @@ elseif GetLocale() == "deDE" then
|
|||||||
L["Show name text"] = "Namen zeigen"
|
L["Show name text"] = "Namen zeigen"
|
||||||
L["Show the units name"] = "Zeige den Namen des Gegners"
|
L["Show the units name"] = "Zeige den Namen des Gegners"
|
||||||
L["Show ArenaX"] = "ArenaX zeigen"
|
L["Show ArenaX"] = "ArenaX zeigen"
|
||||||
L["Show Arena1-5 as name instead"] = "Zeigt Arena1-5 anstatt des Namens"
|
L["Show 1-5 as name instead"] = "Zeigt 1-5 anstatt des Namens"
|
||||||
L["Show the actual health"] = "Zeige die momentane Gesundheit"
|
L["Show the actual health"] = "Zeige die momentane Gesundheit"
|
||||||
L["Show the actual health on the health bar"] = "Zeigt die momentane Gesundheit"
|
L["Show the actual health on the health bar"] = "Zeigt die momentane Gesundheit"
|
||||||
L["Show max health"] = "Zeige maximale Gesundheit"
|
L["Show max health"] = "Zeige maximale Gesundheit"
|
||||||
|
@ -177,9 +177,9 @@ function Announcements:Send(msg, throttle, color)
|
|||||||
RaidNotice_AddMessage(RaidBossEmoteFrame, msg, color)
|
RaidNotice_AddMessage(RaidBossEmoteFrame, msg, color)
|
||||||
elseif (dest == "fct" and IsAddOnLoaded("Blizzard_CombatText")) then
|
elseif (dest == "fct" and IsAddOnLoaded("Blizzard_CombatText")) then
|
||||||
CombatText_AddMessage(msg, nil, color.r, color.g, color.b, "crit", 1)
|
CombatText_AddMessage(msg, nil, color.r, color.g, color.b, "crit", 1)
|
||||||
--[[elseif (dest == "msbt" and IsAddOnLoaded("MikScrollingBattleText")) then
|
elseif (dest == "msbt" and IsAddOnLoaded("MikScrollingBattleText")) then
|
||||||
MikSBT.DisplayMessage(msg, MikSBT.DISPLAYTYPE_NOTIFICATION, true, color.r * 255, color.g * 255, color.b * 255)
|
MikSBT.Animations.DisplayMessage(msg, MikSBT.DISPLAYTYPE_NOTIFICATION, true, color.r * 255, color.g * 255, color.b * 255)
|
||||||
elseif (dest == "sct" and IsAddOnLoaded("sct")) then
|
--[[elseif (dest == "sct" and IsAddOnLoaded("sct")) then
|
||||||
SCT:DisplayText(msg, color, true, "event", 1)
|
SCT:DisplayText(msg, color, true, "event", 1)
|
||||||
elseif (dest == "parrot" and IsAddOnLoaded("parrot")) then
|
elseif (dest == "parrot" and IsAddOnLoaded("parrot")) then
|
||||||
Parrot:ShowMessage(msg, "Notification", true, color.r, color.g, color.b)--]]
|
Parrot:ShowMessage(msg, "Notification", true, color.r, color.g, color.b)--]]
|
||||||
@ -211,6 +211,7 @@ function Announcements:GetOptions()
|
|||||||
["party"] = L["Party"],
|
["party"] = L["Party"],
|
||||||
["rw"] = L["Raid Warning"],
|
["rw"] = L["Raid Warning"],
|
||||||
["fct"] = L["Blizzard's Floating Combat Text"],
|
["fct"] = L["Blizzard's Floating Combat Text"],
|
||||||
|
["msbt"] = L["MikScrollingBattleText"],
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -106,7 +106,7 @@ function Auras:CreateFrame(unit)
|
|||||||
Auras:AURA_FADE(self.unit, self.track)
|
Auras:AURA_FADE(self.unit, self.track)
|
||||||
else
|
else
|
||||||
self.timeLeft = self.timeLeft - elapsed
|
self.timeLeft = self.timeLeft - elapsed
|
||||||
self.text:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
Gladdy:FormatTimer(self.text, self.timeLeft, self.timeLeft < 10)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self:SetAlpha(0.01)
|
self:SetAlpha(0.01)
|
||||||
@ -170,11 +170,11 @@ function Auras:CreateInterrupt(unit)
|
|||||||
self.active = false
|
self.active = false
|
||||||
self.priority = nil
|
self.priority = nil
|
||||||
self.spellSchool = nil
|
self.spellSchool = nil
|
||||||
self.cooldown:SetCooldown(GetTime(), 0)
|
self.cooldown:Clear()
|
||||||
self:SetAlpha(0.01)
|
self:SetAlpha(0.01)
|
||||||
else
|
else
|
||||||
self.timeLeft = self.timeLeft - elapsed
|
self.timeLeft = self.timeLeft - elapsed
|
||||||
self.text:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
Gladdy:FormatTimer(self.text, self.timeLeft, self.timeLeft < 10)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
self:SetAlpha(0.01)
|
self:SetAlpha(0.01)
|
||||||
@ -282,12 +282,12 @@ function Auras:Test(unit)
|
|||||||
self:AURA_GAIN(unit,AURA_TYPE_DEBUFF, 27010, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
self:AURA_GAIN(unit,AURA_TYPE_DEBUFF, 27010, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
||||||
self:SPELL_INTERRUPT(unit,19244, select(1, GetSpellInfo(19244)), "physical", 25396, select(1, GetSpellInfo(25396)), 64)
|
self:SPELL_INTERRUPT(unit,19244, select(1, GetSpellInfo(19244)), "physical", 25396, select(1, GetSpellInfo(25396)), 64)
|
||||||
elseif (unit == "arena3") then
|
elseif (unit == "arena3") then
|
||||||
spellName, _, icon = GetSpellInfo(31224)
|
spellName, _, icon = GetSpellInfo(34709)
|
||||||
self:AURA_FADE(unit, AURA_TYPE_BUFF)
|
self:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
self:AURA_GAIN(unit,AURA_TYPE_BUFF, 31224, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
self:AURA_GAIN(unit,AURA_TYPE_BUFF, 34709, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
||||||
spellName, _, icon = GetSpellInfo(18425)
|
spellName, _, icon = GetSpellInfo(18425)
|
||||||
self:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
--self:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
self:AURA_GAIN(unit,AURA_TYPE_DEBUFF, 18425, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
--self:AURA_GAIN(unit,AURA_TYPE_DEBUFF, 18425, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -348,7 +348,7 @@ function Auras:AURA_FADE(unit, auraType)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
if auraFrame.active then
|
if auraFrame.active then
|
||||||
auraFrame.cooldown:SetCooldown(GetTime(), 0)
|
auraFrame.cooldown:Clear()
|
||||||
end
|
end
|
||||||
--auraFrame.cooldown:Hide()
|
--auraFrame.cooldown:Hide()
|
||||||
auraFrame.active = false
|
auraFrame.active = false
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
local GetTime = GetTime
|
local GetTime = GetTime
|
||||||
local select, lower, ceil, tremove, tinsert, pairs, ipairs, tostring = select, string.lower, ceil, tremove, tinsert, pairs, ipairs, tostring
|
local select, lower, ceil, tremove, tinsert, pairs, ipairs, tostring, random = select, string.lower, ceil, tremove, tinsert, pairs, ipairs, tostring, math.random
|
||||||
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||||
local auraTypes = {AURA_TYPE_BUFF, AURA_TYPE_DEBUFF}
|
local auraTypes = {AURA_TYPE_BUFF, AURA_TYPE_DEBUFF}
|
||||||
|
|
||||||
@ -134,27 +134,30 @@ end
|
|||||||
|
|
||||||
function BuffsDebuffs:Test(unit)
|
function BuffsDebuffs:Test(unit)
|
||||||
if Gladdy.db.buffsEnabled then
|
if Gladdy.db.buffsEnabled then
|
||||||
if unit == "arena1" or unit == "arena3" then
|
local spellSchools = { "physical", "magic", "curse", "poison", "disease", "immune" }
|
||||||
|
|
||||||
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF)
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
|
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 1943, AURA_TYPE_DEBUFF, 12, 12, 1, "physical", select(3, GetSpellInfo(1943)), 1)
|
local i = 1
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 18647, AURA_TYPE_DEBUFF, 10, 10, 1, "immune", select(3, GetSpellInfo(18647)), 2)
|
for spellID, enabled in pairs(Gladdy.db.trackedDebuffs) do
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 27218, AURA_TYPE_DEBUFF, 9, 9, 1, "curse", select(3, GetSpellInfo(27218)), 3)
|
if i > 4 then
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 27216, AURA_TYPE_DEBUFF, 9, 9, 1, "magic", select(3, GetSpellInfo(27216)), 4)
|
break
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 27189, AURA_TYPE_DEBUFF, 9, 9, 5, "poison", select(3, GetSpellInfo(27189)), 5)
|
end
|
||||||
|
if enabled then
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 33076, AURA_TYPE_BUFF, 15, 15, 1, "magic", select(3, GetSpellInfo(33076)), 1)
|
BuffsDebuffs:AddOrRefreshAura(unit, spellID, AURA_TYPE_DEBUFF, 15, 15, random(1,5), spellSchools[random(1,6)], select(3, GetSpellInfo(spellID)), i)
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 26980, AURA_TYPE_BUFF, 12, 12, 5, "magic", select(3, GetSpellInfo(26980)), 2)
|
i = i + 1
|
||||||
else
|
end
|
||||||
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
end
|
||||||
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF)
|
i = 1
|
||||||
|
for spellID, enabled in pairs(Gladdy.db.trackedBuffs) do
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 12, 12, 1, "poison", select(3, GetSpellInfo(1943)), 1)
|
if i > 4 then
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 10, 10, 2, "magic", select(3, GetSpellInfo(1)), 2)
|
break
|
||||||
|
end
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 5, AURA_TYPE_DEBUFF, 12, 12, 3, "physical", select(3, GetSpellInfo(27009)), 1)
|
if enabled then
|
||||||
BuffsDebuffs:AddOrRefreshAura(unit, 5, AURA_TYPE_DEBUFF, 11, 11, 4, "disease", select(3, GetSpellInfo(11426)), 2)
|
BuffsDebuffs:AddOrRefreshAura(unit, spellID, AURA_TYPE_BUFF, 15, 15, random(1,5), spellSchools[random(1,6)], select(3, GetSpellInfo(spellID)), i)
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -469,28 +472,23 @@ local function iconTimer(auraFrame, elapsed)
|
|||||||
local timeLeftMilliSec = auraFrame.endtime - GetTime()
|
local timeLeftMilliSec = auraFrame.endtime - GetTime()
|
||||||
local timeLeftSec = ceil(timeLeftMilliSec)
|
local timeLeftSec = ceil(timeLeftMilliSec)
|
||||||
auraFrame.timeLeft = timeLeftMilliSec
|
auraFrame.timeLeft = timeLeftMilliSec
|
||||||
--auraFrame.cooldowncircle:SetCooldown(auraFrame.startTime, auraFrame.endtime)
|
if Gladdy.db.buffsDynamicColor then
|
||||||
if timeLeftSec >= 60 then
|
if timeLeftSec >= 60 then
|
||||||
if Gladdy.db.buffsDynamicColor then auraFrame.cooldown:SetTextColor(0.7, 1, 0) end
|
auraFrame.cooldown:SetTextColor(0.7, 1, 0)
|
||||||
auraFrame.cooldown:SetFormattedText("%dm", ceil(timeLeftSec / 60))
|
|
||||||
elseif timeLeftSec < 60 and timeLeftSec >= 11 then
|
elseif timeLeftSec < 60 and timeLeftSec >= 11 then
|
||||||
--if it's less than 60s
|
auraFrame.cooldown:SetTextColor(0.7, 1, 0)
|
||||||
if Gladdy.db.buffsDynamicColor then auraFrame.cooldown:SetTextColor(0.7, 1, 0) end
|
|
||||||
auraFrame.cooldown:SetFormattedText("%d", timeLeftSec)
|
|
||||||
elseif timeLeftSec <= 10 and timeLeftSec >= 5 then
|
elseif timeLeftSec <= 10 and timeLeftSec >= 5 then
|
||||||
if Gladdy.db.buffsDynamicColor then auraFrame.cooldown:SetTextColor(1, 0.7, 0) end
|
auraFrame.cooldown:SetTextColor(1, 0.7, 0)
|
||||||
auraFrame.cooldown:SetFormattedText("%d", timeLeftSec)
|
|
||||||
elseif timeLeftSec <= 4 and timeLeftSec >= 3 then
|
elseif timeLeftSec <= 4 and timeLeftSec >= 3 then
|
||||||
if Gladdy.db.buffsDynamicColor then auraFrame.cooldown:SetTextColor(1, 0, 0) end
|
auraFrame.cooldown:SetTextColor(1, 0, 0)
|
||||||
auraFrame.cooldown:SetFormattedText("%d", timeLeftSec)
|
|
||||||
elseif timeLeftMilliSec <= 3 and timeLeftMilliSec > 0 then
|
elseif timeLeftMilliSec <= 3 and timeLeftMilliSec > 0 then
|
||||||
if Gladdy.db.buffsDynamicColor then auraFrame.cooldown:SetTextColor(1, 0, 0) end
|
auraFrame.cooldown:SetTextColor(1, 0, 0)
|
||||||
auraFrame.cooldown:SetFormattedText("%.1f", timeLeftMilliSec >= 0.0 and timeLeftMilliSec or 0.0)
|
end
|
||||||
elseif timeLeftMilliSec <= 0 and timeLeftMilliSec > -0.05 then -- 50ms ping max wait for SPELL_AURA_REMOVED event
|
end
|
||||||
auraFrame.cooldown:SetText("")
|
if timeLeftMilliSec < 0 then
|
||||||
else -- fallback in case SPELL_AURA_REMOVED is not fired
|
|
||||||
auraFrame:Hide()
|
auraFrame:Hide()
|
||||||
end
|
end
|
||||||
|
Gladdy:FormatTimer(auraFrame.cooldown, timeLeftMilliSec, timeLeftMilliSec <= 3)
|
||||||
else
|
else
|
||||||
auraFrame.cooldown:SetText("")
|
auraFrame.cooldown:SetText("")
|
||||||
end
|
end
|
||||||
|
@ -53,8 +53,8 @@ BINDING_NAME_GLADDYBUTTON3_BUTTON5 = L["Button5 Click Enemy 3"]
|
|||||||
BINDING_NAME_GLADDYBUTTON4_BUTTON5 = L["Button5 Click Enemy 4"]
|
BINDING_NAME_GLADDYBUTTON4_BUTTON5 = L["Button5 Click Enemy 4"]
|
||||||
BINDING_NAME_GLADDYBUTTON5_BUTTON5 = L["Button5 Click Enemy 5"]
|
BINDING_NAME_GLADDYBUTTON5_BUTTON5 = L["Button5 Click Enemy 5"]
|
||||||
|
|
||||||
function Clicks:Initialise()
|
function Clicks:Initialize()
|
||||||
self:RegisterMessage("JOINED_ARENA")
|
--
|
||||||
end
|
end
|
||||||
|
|
||||||
function Clicks:Reset()
|
function Clicks:Reset()
|
||||||
@ -62,21 +62,14 @@ function Clicks:Reset()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Clicks:ResetUnit(unit)
|
function Clicks:ResetUnit(unit)
|
||||||
local button = Gladdy.buttons[unit]
|
--
|
||||||
if (not button) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
for k, v in pairs(Gladdy.db.attributes) do
|
|
||||||
button.secure:SetAttribute(v.modifier .. "macrotext" .. v.button, "")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Clicks:Test()
|
function Clicks:UpdateFrame(unit)
|
||||||
Clicks:JOINED_ARENA()
|
self:SetupAttributes(unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Clicks:JOINED_ARENA()
|
function Clicks:UpdateFrameOnce()
|
||||||
for k, v in pairs(Gladdy.buttons) do
|
for k, v in pairs(Gladdy.buttons) do
|
||||||
local left = GetBindingKey(("GLADDYBUTTON%d_LEFT"):format(v.id))
|
local left = GetBindingKey(("GLADDYBUTTON%d_LEFT"):format(v.id))
|
||||||
local right = GetBindingKey(("GLADDYBUTTON%d_RIGHT"):format(v.id))
|
local right = GetBindingKey(("GLADDYBUTTON%d_RIGHT"):format(v.id))
|
||||||
@ -145,7 +138,7 @@ function Clicks:SetupAttribute(button, key, mod, action, spell)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local buttons = { ["1"] = L["Left button"], ["2"] = L["Right button"], ["3"] = L["Middle button"], ["4"] = L["Button 4"], ["5"] = L["Button 5"] }
|
local buttons = { ["1"] = L["Left button"], ["2"] = L["Right button"], ["3"] = L["Middle button"], ["4"] = L["Button 4"], ["5"] = L["Button 5"] }
|
||||||
local modifiers = { [""] = L["None"], ["ctrl-"] = L["CTRL"], ["shift-"] = L["SHIFT"], ["alt-"] = L["ALT"] }
|
local modifiers = { [""] = L["None"], ["*"] = L["All"], ["ctrl-"] = L["CTRL"], ["shift-"] = L["SHIFT"], ["alt-"] = L["ALT"] }
|
||||||
local clickValues = { ["macro"] = MACRO, ["target"] = TARGET, ["focus"] = FOCUS, ["spell"] = L["Cast Spell"], ["disabled"] = ADDON_DISABLED }
|
local clickValues = { ["macro"] = MACRO, ["target"] = TARGET, ["focus"] = FOCUS, ["spell"] = L["Cast Spell"], ["disabled"] = ADDON_DISABLED }
|
||||||
|
|
||||||
local function SetupAttributeOption(i)
|
local function SetupAttributeOption(i)
|
||||||
@ -222,8 +215,3 @@ function Clicks:GetOptions()
|
|||||||
end
|
end
|
||||||
return options
|
return options
|
||||||
end
|
end
|
||||||
|
|
||||||
function Clicks:UpdateFrame(unit)
|
|
||||||
self:SetupAttributes(unit)
|
|
||||||
self:JOINED_ARENA()
|
|
||||||
end
|
|
@ -295,19 +295,13 @@ function Cooldowns:CooldownStart(button, spellId, duration)
|
|||||||
self.timeLeft = self.timeLeft - elapsed
|
self.timeLeft = self.timeLeft - elapsed
|
||||||
local timeLeft = ceil(self.timeLeft)
|
local timeLeft = ceil(self.timeLeft)
|
||||||
if timeLeft >= 540 then
|
if timeLeft >= 540 then
|
||||||
self.cooldownFont:SetText(ceil(timeLeft / 60) .. "m")
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.cooldownFont), Gladdy.db.cooldownSize / 3.1 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.cooldownFont), Gladdy.db.cooldownSize / 3.1 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 540 and timeLeft >= 60 then
|
elseif timeLeft < 540 and timeLeft >= 60 then
|
||||||
-- more than 1 minute
|
|
||||||
self.cooldownFont:SetText(ceil(timeLeft / 60) .. "m")
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.cooldownFont), Gladdy.db.cooldownSize / 2.15 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.cooldownFont), Gladdy.db.cooldownSize / 2.15 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 60 and timeLeft > 0 then
|
elseif timeLeft < 60 and timeLeft > 0 then
|
||||||
-- between 60s and 21s (green)
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.cooldownFont), Gladdy.db.cooldownSize / 2.15 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.cooldownFont), Gladdy.db.cooldownSize / 2.15 * Gladdy.db.cooldownFontScale, "OUTLINE")
|
||||||
self.cooldownFont:SetText(timeLeft)
|
|
||||||
else
|
|
||||||
self.cooldownFont:SetText("")
|
|
||||||
end
|
end
|
||||||
|
Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 0)
|
||||||
if (self.timeLeft <= 0) then
|
if (self.timeLeft <= 0) then
|
||||||
Cooldowns:CooldownReady(button, spellId, frame)
|
Cooldowns:CooldownReady(button, spellId, frame)
|
||||||
end
|
end
|
||||||
|
@ -93,11 +93,7 @@ function Diminishings:CreateFrame(unit)
|
|||||||
Diminishings:Positionate(unit)
|
Diminishings:Positionate(unit)
|
||||||
else
|
else
|
||||||
self.timeLeft = self.timeLeft - elapsed
|
self.timeLeft = self.timeLeft - elapsed
|
||||||
if self.timeLeft >=5 then
|
Gladdy:FormatTimer(self.text, self.timeLeft, self.timeLeft < 5)
|
||||||
self.timeText:SetFormattedText("%d", self.timeLeft)
|
|
||||||
else
|
|
||||||
self.timeText:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
@ -100,7 +100,7 @@ function ExportImport:CheckDeserializedOptions(tbl, refTbl, str)
|
|||||||
end
|
end
|
||||||
for k,v in pairs(tbl) do
|
for k,v in pairs(tbl) do
|
||||||
if refTbl[k] == nil then
|
if refTbl[k] == nil then
|
||||||
return false, str .. "." .. k .. " does not exist"
|
--return false, str .. "." .. k .. " does not exist"
|
||||||
else
|
else
|
||||||
if type(v) ~= type(refTbl[k]) then
|
if type(v) ~= type(refTbl[k]) then
|
||||||
return false, str .. "." .. k .. " type error. Expected " .. type(refTbl[k]) .. " found " .. type(v)
|
return false, str .. "." .. k .. " type error. Expected " .. type(refTbl[k]) .. " found " .. type(v)
|
||||||
|
@ -132,7 +132,7 @@ function Healthbar:SetHealthText(healthBar, health, healthMax)
|
|||||||
local healthText
|
local healthText
|
||||||
local healthPercentage = floor(health * 100 / healthMax)
|
local healthPercentage = floor(health * 100 / healthMax)
|
||||||
|
|
||||||
if health == 0 then
|
if health == 0 and UnitExists(healthBar.unit) and UnitIsDeadOrGhost(healthBar.unit) then
|
||||||
self:UNIT_DEATH(healthBar.unit)
|
self:UNIT_DEATH(healthBar.unit)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -234,7 +234,7 @@ function Healthbar:JOINED_ARENA()
|
|||||||
if Gladdy.db.healthNameToArenaId and Gladdy.db.healthName then
|
if Gladdy.db.healthNameToArenaId and Gladdy.db.healthName then
|
||||||
for i=1,Gladdy.curBracket do
|
for i=1,Gladdy.curBracket do
|
||||||
local healthBar = self.frames["arena" .. i]
|
local healthBar = self.frames["arena" .. i]
|
||||||
healthBar.nameText:SetText("Arena" .. i)
|
healthBar.nameText:SetText(i)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -499,7 +499,7 @@ function Healthbar:GetOptions()
|
|||||||
healthNameToArenaId = option({
|
healthNameToArenaId = option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Show ArenaX"],
|
name = L["Show ArenaX"],
|
||||||
desc = L["Show Arena1-5 as name instead"],
|
desc = L["Show 1-5 as name instead"],
|
||||||
order = 3,
|
order = 3,
|
||||||
width = "full",
|
width = "full",
|
||||||
disabled = function() return not Gladdy.db.healthName end
|
disabled = function() return not Gladdy.db.healthName end
|
||||||
|
@ -45,33 +45,22 @@ local function iconTimer(self,elapsed)
|
|||||||
local timeLeft = ceil(self.timeLeft)
|
local timeLeft = ceil(self.timeLeft)
|
||||||
|
|
||||||
if timeLeft >= 60 then
|
if timeLeft >= 60 then
|
||||||
-- more than 1 minute
|
|
||||||
self.cooldownFont:SetTextColor(1, 1, 0)
|
self.cooldownFont:SetTextColor(1, 1, 0)
|
||||||
self.cooldownFont:SetText(floor(timeLeft / 60) .. ":" .. string_format("%02.f", floor(timeLeft - floor(timeLeft / 60) * 60)))
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 0.15* self:GetWidth()) * Gladdy.db.racialFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 0.15* self:GetWidth()) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 60 and timeLeft >= 21 then
|
elseif timeLeft < 60 and timeLeft >= 30 then
|
||||||
-- between 60s and 21s (green)
|
self.cooldownFont:SetTextColor(1, 1, 0)
|
||||||
self.cooldownFont:SetTextColor(0.7, 1, 0)
|
|
||||||
self.cooldownFont:SetText(timeLeft)
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 20.9 and timeLeft >= 11 then
|
elseif timeLeft < 30 and timeLeft >= 11 then
|
||||||
-- between 20s and 11s (green)
|
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
||||||
self.cooldownFont:SetTextColor(0, 1, 0)
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
self.cooldownFont:SetText(timeLeft)
|
elseif timeLeft < 10 and timeLeft >= 5 then
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
|
||||||
elseif timeLeft <= 10 and timeLeft >= 5 then
|
|
||||||
-- between 10s and 5s (orange)
|
|
||||||
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
||||||
self.cooldownFont:SetFormattedText("%.1f", self.timeLeft)
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 5 and timeLeft > 0 then
|
elseif timeLeft < 5 and timeLeft > 0 then
|
||||||
-- between 5s and 1s (red)
|
|
||||||
self.cooldownFont:SetTextColor(1, 0, 0)
|
self.cooldownFont:SetTextColor(1, 0, 0)
|
||||||
self.cooldownFont:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||||
else
|
|
||||||
self.cooldownFont:SetText("")
|
|
||||||
end
|
end
|
||||||
|
Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ local Gladdy = LibStub("Gladdy")
|
|||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local ShadowsightTimer = Gladdy:NewModule("Shadowsight Timer", nil, {
|
local ShadowsightTimer = Gladdy:NewModule("Shadowsight Timer", nil, {
|
||||||
shadowsightTimerEnabled = true,
|
shadowsightTimerEnabled = true,
|
||||||
|
shadowsightTimerLocked = false,
|
||||||
shadowsightTimerScale = 1,
|
shadowsightTimerScale = 1,
|
||||||
shadowsightTimerRelPoint1 = "CENTER",
|
shadowsightTimerRelPoint1 = "CENTER",
|
||||||
shadowsightTimerRelPoint2 = "CENTER",
|
shadowsightTimerRelPoint2 = "CENTER",
|
||||||
@ -94,7 +95,8 @@ function ShadowsightTimer:CreateTimerFrame()
|
|||||||
self.timerFrame:Hide()
|
self.timerFrame:Hide()
|
||||||
end
|
end
|
||||||
|
|
||||||
function ShadowsightTimer:UpdateFrame()
|
function ShadowsightTimer:UpdateFrameOnce()
|
||||||
|
self.timerFrame:EnableMouse(not Gladdy.db.shadowsightTimerLocked)
|
||||||
if Gladdy.db.shadowsightTimerEnabled then
|
if Gladdy.db.shadowsightTimerEnabled then
|
||||||
self.timerFrame:SetScale(Gladdy.db.shadowsightTimerScale)
|
self.timerFrame:SetScale(Gladdy.db.shadowsightTimerScale)
|
||||||
self.timerFrame:ClearAllPoints()
|
self.timerFrame:ClearAllPoints()
|
||||||
@ -109,7 +111,7 @@ function ShadowsightTimer:UpdateFrame()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function ShadowsightTimer:Start()
|
function ShadowsightTimer:Start()
|
||||||
self.timerFrame.endTime = 92
|
self.timerFrame.endTime = 91
|
||||||
self.timerFrame.timeSinceLastUpdate = 0
|
self.timerFrame.timeSinceLastUpdate = 0
|
||||||
self.timerFrame:SetScript("OnUpdate", ShadowsightTimer.OnUpdate)
|
self.timerFrame:SetScript("OnUpdate", ShadowsightTimer.OnUpdate)
|
||||||
end
|
end
|
||||||
@ -149,17 +151,24 @@ function ShadowsightTimer:GetOptions()
|
|||||||
order = 3,
|
order = 3,
|
||||||
width = "full",
|
width = "full",
|
||||||
}),
|
}),
|
||||||
|
shadowsightTimerLocked = Gladdy:option({
|
||||||
|
type = "toggle",
|
||||||
|
name = L["Locked"],
|
||||||
|
--desc = L["Turns countdown before the start of an arena match on/off."],
|
||||||
|
order = 4,
|
||||||
|
width = "full",
|
||||||
|
}),
|
||||||
shadowsightAnnounce = Gladdy:option({
|
shadowsightAnnounce = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Announce"],
|
name = L["Announce"],
|
||||||
--desc = L["Turns countdown before the start of an arena match on/off."],
|
--desc = L["Turns countdown before the start of an arena match on/off."],
|
||||||
order = 4,
|
order = 5,
|
||||||
width = "full",
|
width = "full",
|
||||||
}),
|
}),
|
||||||
shadowsightTimerScale = Gladdy:option({
|
shadowsightTimerScale = Gladdy:option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Scale"],
|
name = L["Scale"],
|
||||||
order = 5,
|
order = 6,
|
||||||
min = 0.1,
|
min = 0.1,
|
||||||
max = 5,
|
max = 5,
|
||||||
step = 0.1,
|
step = 0.1,
|
||||||
|
@ -227,6 +227,7 @@ function TotemPlates:Initialize()
|
|||||||
self:RegisterEvent("NAME_PLATE_UNIT_ADDED")
|
self:RegisterEvent("NAME_PLATE_UNIT_ADDED")
|
||||||
self:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
|
self:RegisterEvent("NAME_PLATE_UNIT_REMOVED")
|
||||||
self:RegisterEvent("PLAYER_TARGET_CHANGED")
|
self:RegisterEvent("PLAYER_TARGET_CHANGED")
|
||||||
|
self:RegisterEvent("UNIT_NAME_UPDATE")
|
||||||
self:SetScript("OnEvent", TotemPlates.OnEvent)
|
self:SetScript("OnEvent", TotemPlates.OnEvent)
|
||||||
if Gladdy.db.npTotems and Gladdy.db.npTotemsShowEnemy then
|
if Gladdy.db.npTotems and Gladdy.db.npTotemsShowEnemy then
|
||||||
--GetCVar("nameplateShowEnemyTotems")
|
--GetCVar("nameplateShowEnemyTotems")
|
||||||
@ -282,9 +283,31 @@ function TotemPlates:UpdateFrameOnce()
|
|||||||
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.npTremorFont), Gladdy.db.npTremorFontSize, "OUTLINE")
|
nameplate.gladdyTotemFrame.totemName:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.npTremorFont), Gladdy.db.npTremorFontSize, "OUTLINE")
|
||||||
nameplate.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "")
|
nameplate.gladdyTotemFrame.totemName:SetText(Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].customText or "")
|
||||||
self:SetTotemAlpha(nameplate.gladdyTotemFrame, k)
|
self:SetTotemAlpha(nameplate.gladdyTotemFrame, k)
|
||||||
|
|
||||||
|
if not Gladdy.db.npTotems then
|
||||||
|
nameplate.gladdyTotemFrame:Hide()
|
||||||
|
self:ToggleAddon(nameplate, true)
|
||||||
|
else
|
||||||
|
nameplate.gladdyTotemFrame:Show()
|
||||||
self:ToggleAddon(nameplate)
|
self:ToggleAddon(nameplate)
|
||||||
end
|
end
|
||||||
for i,gladdyTotemFrame in ipairs(self.totemPlateCache) do
|
local isEnemy = UnitIsEnemy("player", nameplate.gladdyTotemFrame.unitID)
|
||||||
|
if Gladdy.db.npTotems and Gladdy.db.npTotemsShowEnemy and isEnemy then
|
||||||
|
nameplate.gladdyTotemFrame:Show()
|
||||||
|
self:ToggleAddon(nameplate)
|
||||||
|
elseif Gladdy.db.npTotems and not Gladdy.db.npTotemsShowEnemy and isEnemy then
|
||||||
|
nameplate.gladdyTotemFrame:Hide()
|
||||||
|
self:ToggleAddon(nameplate, true)
|
||||||
|
end
|
||||||
|
if Gladdy.db.npTotems and Gladdy.db.npTotemsShowFriendly and not isEnemy then
|
||||||
|
nameplate.gladdyTotemFrame:Show()
|
||||||
|
self:ToggleAddon(nameplate)
|
||||||
|
elseif not Gladdy.db.npTotemsShowFriendly and not isEnemy then
|
||||||
|
nameplate.gladdyTotemFrame:Hide()
|
||||||
|
self:ToggleAddon(nameplate, true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for _,gladdyTotemFrame in ipairs(self.totemPlateCache) do
|
||||||
gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor)
|
gladdyTotemFrame:SetWidth(Gladdy.db.npTotemPlatesSize * Gladdy.db.npTotemPlatesWidthFactor)
|
||||||
gladdyTotemFrame:SetHeight(Gladdy.db.npTotemPlatesSize)
|
gladdyTotemFrame:SetHeight(Gladdy.db.npTotemPlatesSize)
|
||||||
gladdyTotemFrame.totemBorder:SetTexture(Gladdy.db.npTotemPlatesBorderStyle)
|
gladdyTotemFrame.totemBorder:SetTexture(Gladdy.db.npTotemPlatesBorderStyle)
|
||||||
@ -337,27 +360,47 @@ end
|
|||||||
|
|
||||||
---------------------------------------------------
|
---------------------------------------------------
|
||||||
|
|
||||||
|
function TotemPlates:GetAddonFrame(nameplate)
|
||||||
|
if self.addon == "Blizzard" then
|
||||||
|
if nameplate.UnitFrame then
|
||||||
|
return nameplate.UnitFrame
|
||||||
|
end
|
||||||
|
elseif self.addon == "Plater" or self.addon == "Tukui" or self.addon == "ElvUI" then
|
||||||
|
if nameplate.unitFrame then
|
||||||
|
return nameplate.unitFrame
|
||||||
|
end
|
||||||
|
elseif self.addon == "Kui_Nameplates" then
|
||||||
|
if nameplate.kui then
|
||||||
|
return nameplate.kui
|
||||||
|
end
|
||||||
|
elseif self.addon == "NeatPlates" then
|
||||||
|
if nameplate.extended or nameplate.carrier then
|
||||||
|
return nameplate.extended , nameplate.carrier
|
||||||
|
end
|
||||||
|
elseif self.addon == "TidyPlates_ThreatPlates" then
|
||||||
|
if nameplate.TPFrame then
|
||||||
|
return nameplate.TPFrame
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function TotemPlates:PLAYER_TARGET_CHANGED()
|
function TotemPlates:PLAYER_TARGET_CHANGED()
|
||||||
for k,nameplate in pairs(self.activeTotemNameplates) do
|
for k,nameplate in pairs(self.activeTotemNameplates) do
|
||||||
TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, k)
|
TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, k)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TotemPlates:ToggleAddon(nameplate)
|
function TotemPlates:ToggleAddon(nameplate, show)
|
||||||
if self.addon == "Blizzard" then
|
local addonFrames = { self:GetAddonFrame(nameplate) }
|
||||||
nameplate.UnitFrame:Hide()
|
if addonFrames and #addonFrames > 0 then
|
||||||
elseif self.addon == "Plater" then
|
if show then
|
||||||
nameplate.unitFrame:Hide()
|
for i,v in ipairs(addonFrames) do
|
||||||
elseif self.addon == "Kui_Nameplates" then
|
v:Show()
|
||||||
nameplate.kui:Hide()
|
end
|
||||||
elseif self.addon == "NeatPlates" then
|
else
|
||||||
nameplate.extended:Hide()
|
for i,v in ipairs(addonFrames) do
|
||||||
nameplate.carrier:Hide()
|
v:Hide()
|
||||||
elseif self.addon == "TidyPlates_ThreatPlates" then
|
end
|
||||||
nameplate.TPFrame:Hide()
|
|
||||||
elseif self.addon == "Tukui" or self.addon == "ElvUI" then
|
|
||||||
if nameplate.unitFrame then
|
|
||||||
nameplate.unitFrame:Hide()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -368,18 +411,27 @@ function TotemPlates.OnUpdate(self)
|
|||||||
else
|
else
|
||||||
self.selectionHighlight:SetAlpha(0)
|
self.selectionHighlight:SetAlpha(0)
|
||||||
end
|
end
|
||||||
if (TotemPlates.addon == "Tukui" or TotemPlates.addon == "ElvUI") and self.parent and self.parent.unitFrame then
|
if (TotemPlates.addon == "Plater" or TotemPlates.addon == "Tukui" or TotemPlates.addon == "ElvUI") and self.parent and self.parent.unitFrame then
|
||||||
self.parent.unitFrame:Hide()
|
self.parent.unitFrame:Hide()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
function TotemPlates:OnUnitEvent(unitID)
|
||||||
local unitID = ...
|
|
||||||
local isEnemy = UnitIsEnemy("player", unitID)
|
local isEnemy = UnitIsEnemy("player", unitID)
|
||||||
|
local nameplate = C_NamePlate.GetNamePlateForUnit(unitID)
|
||||||
|
if not nameplate then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if not Gladdy.db.npTotems then
|
||||||
|
self:ToggleAddon(nameplate, true)
|
||||||
|
return
|
||||||
|
end
|
||||||
if not Gladdy.db.npTotemsShowEnemy and isEnemy then
|
if not Gladdy.db.npTotemsShowEnemy and isEnemy then
|
||||||
|
self:ToggleAddon(nameplate, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not Gladdy.db.npTotemsShowFriendly and not isEnemy then
|
if not Gladdy.db.npTotemsShowFriendly and not isEnemy then
|
||||||
|
self:ToggleAddon(nameplate, true)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local nameplateName = UnitName(unitID)
|
local nameplateName = UnitName(unitID)
|
||||||
@ -387,7 +439,6 @@ function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
|||||||
totemName = string_gsub(totemName, "%s+$", "") --trim
|
totemName = string_gsub(totemName, "%s+$", "") --trim
|
||||||
totemName = string_gsub(totemName, "%s+[I,V,X]+$", "") --trim rank
|
totemName = string_gsub(totemName, "%s+[I,V,X]+$", "") --trim rank
|
||||||
totemName = string_lower(totemName)
|
totemName = string_lower(totemName)
|
||||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unitID)
|
|
||||||
local totemDataEntry = localizedTotemData["default"][totemName] or localizedTotemData["frFR"][totemName] or localizedTotemData["ruRU"][totemName]
|
local totemDataEntry = localizedTotemData["default"][totemName] or localizedTotemData["frFR"][totemName] or localizedTotemData["ruRU"][totemName]
|
||||||
if totemDataEntry and Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then-- modify this nameplates
|
if totemDataEntry and Gladdy.db.npTotemColors["totem" .. totemDataEntry.id].enabled then-- modify this nameplates
|
||||||
if #self.totemPlateCache > 0 then
|
if #self.totemPlateCache > 0 then
|
||||||
@ -412,13 +463,24 @@ function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
|||||||
TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, unitID)
|
TotemPlates:SetTotemAlpha(nameplate.gladdyTotemFrame, unitID)
|
||||||
self:ToggleAddon(nameplate)
|
self:ToggleAddon(nameplate)
|
||||||
self.activeTotemNameplates[unitID] = nameplate
|
self.activeTotemNameplates[unitID] = nameplate
|
||||||
|
else
|
||||||
|
self:ToggleAddon(nameplate, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
||||||
|
self:OnUnitEvent(...)
|
||||||
|
end
|
||||||
|
|
||||||
|
function TotemPlates:UNIT_NAME_UPDATE(...)
|
||||||
|
self:OnUnitEvent(...)
|
||||||
|
end
|
||||||
|
|
||||||
function TotemPlates:NAME_PLATE_UNIT_REMOVED(...)
|
function TotemPlates:NAME_PLATE_UNIT_REMOVED(...)
|
||||||
local unitID = ...
|
local unitID = ...
|
||||||
local nameplate = C_NamePlate.GetNamePlateForUnit(unitID)
|
local nameplate = C_NamePlate.GetNamePlateForUnit(unitID)
|
||||||
self.activeTotemNameplates[unitID] = nil
|
self.activeTotemNameplates[unitID] = nil
|
||||||
|
--self:ToggleAddon(nameplate, true)
|
||||||
if nameplate.gladdyTotemFrame then
|
if nameplate.gladdyTotemFrame then
|
||||||
nameplate.gladdyTotemFrame:Hide()
|
nameplate.gladdyTotemFrame:Hide()
|
||||||
nameplate.gladdyTotemFrame:SetParent(nil)
|
nameplate.gladdyTotemFrame:SetParent(nil)
|
||||||
|
@ -39,33 +39,22 @@ local function iconTimer(self, elapsed)
|
|||||||
local timeLeft = ceil(self.timeLeft)
|
local timeLeft = ceil(self.timeLeft)
|
||||||
|
|
||||||
if timeLeft >= 60 then
|
if timeLeft >= 60 then
|
||||||
-- more than 1 minute
|
|
||||||
self.cooldownFont:SetTextColor(1, 1, 0)
|
self.cooldownFont:SetTextColor(1, 1, 0)
|
||||||
self.cooldownFont:SetText(floor(timeLeft / 60) .. ":" .. string_format("%02.f", floor(timeLeft - floor(timeLeft / 60) * 60)))
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 0.15*self:GetWidth()) * Gladdy.db.trinketFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 0.15*self:GetWidth()) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 60 and timeLeft >= 21 then
|
elseif timeLeft < 60 and timeLeft >= 30 then
|
||||||
-- between 60s and 21s (green)
|
self.cooldownFont:SetTextColor(1, 1, 0)
|
||||||
self.cooldownFont:SetTextColor(0.7, 1, 0)
|
|
||||||
self.cooldownFont:SetText(timeLeft)
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 20.9 and timeLeft >= 11 then
|
elseif timeLeft < 30 and timeLeft >= 11 then
|
||||||
-- between 20s and 11s (green)
|
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
||||||
self.cooldownFont:SetTextColor(0, 1, 0)
|
|
||||||
self.cooldownFont:SetText(timeLeft)
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
elseif timeLeft <= 10 and timeLeft >= 5 then
|
elseif timeLeft <= 10 and timeLeft >= 5 then
|
||||||
-- between 10s and 5s (orange)
|
|
||||||
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
||||||
self.cooldownFont:SetFormattedText("%.1f", self.timeLeft)
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
elseif timeLeft < 5 and timeLeft > 0 then
|
elseif timeLeft < 5 and timeLeft > 0 then
|
||||||
-- between 5s and 1s (red)
|
|
||||||
self.cooldownFont:SetTextColor(1, 0, 0)
|
self.cooldownFont:SetTextColor(1, 0, 0)
|
||||||
self.cooldownFont:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
|
||||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||||
else
|
|
||||||
self.cooldownFont:SetText("")
|
|
||||||
end
|
end
|
||||||
|
Gladdy:FormatTimer(self.cooldownFont, self.timeLeft, self.timeLeft < 10, true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -54,6 +54,16 @@ function XiconProfiles:ApplyBlizz()
|
|||||||
Gladdy:ToggleFrame(3)
|
Gladdy:ToggleFrame(3)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function XiconProfiles:ApplyRukk()
|
||||||
|
local deserialized = Gladdy.modules["Export Import"]:Decode(Gladdy:GetRukkProfile())
|
||||||
|
if deserialized then
|
||||||
|
Gladdy.modules["Export Import"]:ApplyImport(deserialized, Gladdy.db)
|
||||||
|
end
|
||||||
|
Gladdy:Reset()
|
||||||
|
Gladdy:HideFrame()
|
||||||
|
Gladdy:ToggleFrame(3)
|
||||||
|
end
|
||||||
|
|
||||||
function XiconProfiles:GetOptions()
|
function XiconProfiles:GetOptions()
|
||||||
return {
|
return {
|
||||||
headerProfileBlizzard = {
|
headerProfileBlizzard = {
|
||||||
@ -151,6 +161,24 @@ function XiconProfiles:GetOptions()
|
|||||||
width = "full",
|
width = "full",
|
||||||
order = 11,
|
order = 11,
|
||||||
},
|
},
|
||||||
|
headerProfileRukk = {
|
||||||
|
type = "header",
|
||||||
|
name = "Rukk1's " .. L["Profile"],
|
||||||
|
order = 12,
|
||||||
|
},
|
||||||
|
rukkProfile = {
|
||||||
|
type = "execute",
|
||||||
|
func = function()
|
||||||
|
Gladdy.dbi:ResetProfile(Gladdy.dbi:GetCurrentProfile())
|
||||||
|
XiconProfiles:ApplyRukk()
|
||||||
|
end,
|
||||||
|
name = " ",
|
||||||
|
desc = "Rukk1's " .. L["Profile"],
|
||||||
|
image = "Interface\\AddOns\\Gladdy\\Images\\BasicProfiles\\Rukk1.blp",
|
||||||
|
imageWidth = 350,
|
||||||
|
imageHeight = 175,
|
||||||
|
width = "full",
|
||||||
|
order = 13,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
end
|
end
|
55
Options.lua
55
Options.lua
@ -1,4 +1,6 @@
|
|||||||
local type, pairs, tinsert, tsort, tostring, str_match, tonumber = type, pairs, table.insert, table.sort, tostring, string.match, tonumber
|
local type, pairs, tinsert, tsort = type, pairs, table.insert, table.sort
|
||||||
|
local tostring, str_match, tonumber, string_format = tostring, string.match, tonumber, string.format
|
||||||
|
local ceil, floor = ceil, floor
|
||||||
|
|
||||||
local InterfaceOptionsFrame_OpenToFrame = InterfaceOptionsFrame_OpenToFrame
|
local InterfaceOptionsFrame_OpenToFrame = InterfaceOptionsFrame_OpenToFrame
|
||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
@ -6,10 +8,38 @@ local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
|
|||||||
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
||||||
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||||
|
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local LibClassAuras = LibStub("LibClassAuras-1.0")
|
local LibClassAuras = LibStub("LibClassAuras-1.0")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
|
|
||||||
|
Gladdy.TIMER_FORMAT = { tenths = "tenths", seconds = "seconds",
|
||||||
|
values = {
|
||||||
|
["tenths"] = "xx:xx Miliseconds",
|
||||||
|
["seconds"] = "xx Seconds"
|
||||||
|
}}
|
||||||
|
|
||||||
|
function Gladdy:FormatTimer(fontString, timeLeft, milibreakpoint, showSeconds)
|
||||||
|
if timeLeft < 0 then
|
||||||
|
fontString:SetText("")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local time = timeLeft >= 0.0 and timeLeft or 0.0
|
||||||
|
if Gladdy.db.timerFormat == Gladdy.TIMER_FORMAT.tenths and milibreakpoint then
|
||||||
|
fontString:SetFormattedText("%.1f", time)
|
||||||
|
else
|
||||||
|
if time >= 60 then
|
||||||
|
if showSeconds then
|
||||||
|
fontString:SetText(floor(timeLeft / 60) .. ":" .. string_format("%02.f", floor(timeLeft - floor(timeLeft / 60) * 60)))
|
||||||
|
else
|
||||||
|
fontString:SetText(ceil(ceil(time / 60)) .. "m")
|
||||||
|
end
|
||||||
|
else
|
||||||
|
fontString:SetFormattedText("%d", ceil(time))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Gladdy.defaults = {
|
Gladdy.defaults = {
|
||||||
profile = {
|
profile = {
|
||||||
locked = false,
|
locked = false,
|
||||||
@ -23,6 +53,8 @@ Gladdy.defaults = {
|
|||||||
barWidth = 180,
|
barWidth = 180,
|
||||||
bottomMargin = 2,
|
bottomMargin = 2,
|
||||||
statusbarBorderOffset = 6,
|
statusbarBorderOffset = 6,
|
||||||
|
timerFormat = Gladdy.TIMER_FORMAT.tenths,
|
||||||
|
backgroundColor = {r = 0, g = 0, b = 0, a = 0},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,12 +226,6 @@ function Gladdy:SetupOptions()
|
|||||||
desc = L["Toggle if frame can be moved"],
|
desc = L["Toggle if frame can be moved"],
|
||||||
order = 1,
|
order = 1,
|
||||||
},
|
},
|
||||||
growUp = {
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Grow frame upwards"],
|
|
||||||
desc = L["If enabled the frame will grow upwards instead of downwards"],
|
|
||||||
order = 2,
|
|
||||||
},
|
|
||||||
growDirection = {
|
growDirection = {
|
||||||
type = "select",
|
type = "select",
|
||||||
name = L["Grow Direction"],
|
name = L["Grow Direction"],
|
||||||
@ -273,6 +299,15 @@ function Gladdy:SetupOptions()
|
|||||||
max = 200,
|
max = 200,
|
||||||
step = 1,
|
step = 1,
|
||||||
},
|
},
|
||||||
|
backgroundColor = {
|
||||||
|
type = "color",
|
||||||
|
name = L["Background color"],
|
||||||
|
desc = L["Background Color of the frame"],
|
||||||
|
order = 8,
|
||||||
|
hasAlpha = true,
|
||||||
|
get = getColorOpt,
|
||||||
|
set = setColorOpt,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
cooldownGeneral = {
|
cooldownGeneral = {
|
||||||
@ -343,6 +378,12 @@ function Gladdy:SetupOptions()
|
|||||||
Gladdy:UpdateFrame()
|
Gladdy:UpdateFrame()
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
timerFormat = Gladdy:option({
|
||||||
|
type = "select",
|
||||||
|
name = L["Timer Format"],
|
||||||
|
order = 11,
|
||||||
|
values = Gladdy.TIMER_FORMAT.values
|
||||||
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
fontGeneral = {
|
fontGeneral = {
|
||||||
|
18
README.md
18
README.md
@ -1,7 +1,7 @@
|
|||||||
# Gladdy - TBC
|
# Gladdy - TBC
|
||||||
|
|
||||||
### The most powerful arena addon for WoW TBC 2.5.1
|
### The most powerful arena addon for WoW TBC 2.5.1
|
||||||
## [v1.16-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.16-Beta/Gladdy_TBC-Classic_v1.16-Beta.zip)
|
## [v1.17-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.17-Beta/Gladdy_TBC-Classic_v1.17-Beta.zip)
|
||||||
|
|
||||||
###### <a target="_blank" rel="noopener noreferrer" href="https://www.paypal.me/xiconqoo/10"><img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/Paypal-Donate.png" height="30" style="margin-top:-30px;position:relative;top:20px;"></a> Please consider donating if you like my work
|
###### <a target="_blank" rel="noopener noreferrer" href="https://www.paypal.me/xiconqoo/10"><img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/Paypal-Donate.png" height="30" style="margin-top:-30px;position:relative;top:20px;"></a> Please consider donating if you like my work
|
||||||
|
|
||||||
@ -62,6 +62,22 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca
|
|||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|
||||||
|
### v1.17-Beta
|
||||||
|
- option TimerFormat added (seconds or seconds + milliseconds) (General > Cooldown General > Timer Format)
|
||||||
|
- hide blizzard arena frames without cvars
|
||||||
|
- fix Gladdy bugging out on arena join when in combat
|
||||||
|
- fix some TotemPlates issues
|
||||||
|
- fix Feign Death causing to reset DR and Aura tracking
|
||||||
|
- ArenaX option in Healthbar module now only shows the number
|
||||||
|
- add background for all frames (General > Frame General > Background Color)
|
||||||
|
- add evasion and banish to Aura
|
||||||
|
- add MSBT to Announcement module
|
||||||
|
- Shadowsight timer can be locked now
|
||||||
|
- add "All" modifier to Clicks module
|
||||||
|
- updated testmode for BuffsDebuffs (show only from enabled set)
|
||||||
|
- updated Klimp's profile
|
||||||
|
- added a new Profile in XiconProfiles -> Rukk1
|
||||||
|
|
||||||
### v1.16-Beta
|
### v1.16-Beta
|
||||||
- unit gray in stealth when rangecheck module disabled
|
- unit gray in stealth when rangecheck module disabled
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user