Merge branch 'release/v1.05-Beta' into main
This commit is contained in:
commit
57036a77c1
291
Constants.lua
291
Constants.lua
@ -1,3 +1,5 @@
|
||||
local tbl_sort, select = table.sort, select
|
||||
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
@ -155,7 +157,7 @@ function Gladdy:GetImportantAuras()
|
||||
priority = 40,
|
||||
spellID = 33786,
|
||||
},
|
||||
-- Hibername
|
||||
-- Hibernate
|
||||
[GetSpellInfo(18658)] = {
|
||||
track = AURA_TYPE_DEBUFF,
|
||||
duration = 10,
|
||||
@ -581,6 +583,14 @@ function Gladdy:GetImportantAuras()
|
||||
spellSchool = "magic",
|
||||
spellID = 18498,
|
||||
},
|
||||
-- Death Wish
|
||||
[GetSpellInfo(12292)] = {
|
||||
track = AURA_TYPE_BUFF,
|
||||
duration = 3,
|
||||
priority = 15,
|
||||
spellSchool = "magic",
|
||||
spellID = 12292,
|
||||
},
|
||||
|
||||
-- Grounding Totem Effect
|
||||
[GetSpellInfo(8178)] = {
|
||||
@ -608,3 +618,282 @@ function Gladdy:GetImportantAuras()
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
Gladdy.CLASSES = {"MAGE", "PRIEST", "DRUID", "SHAMAN", "PALADIN", "WARLOCK", "WARRIOR", "HUNTER", "ROGUE"}
|
||||
tbl_sort(Gladdy.CLASSES)
|
||||
Gladdy.RACES = {"Scourge", "BloodElf", "Tauren", "Orc", "Troll", "NightElf", "Draenei", "Human", "Gnome", "Dwarf"}
|
||||
tbl_sort(Gladdy.RACES)
|
||||
|
||||
function Gladdy:GetCooldownList()
|
||||
return {
|
||||
-- Spell Name Cooldown[, Spec]
|
||||
-- Mage
|
||||
["MAGE"] = {
|
||||
[1953] = 15, -- Blink
|
||||
--[122] = 22, -- Frost Nova
|
||||
--[12051] = 480, --Evocation
|
||||
[2139] = 24, -- Counterspell
|
||||
[45438] = { cd = 300, [L["Frost"]] = 240, }, -- Ice Block
|
||||
[12472] = { cd = 180, spec = L["Frost"], }, -- Icy Veins
|
||||
[31687] = { cd = 180, spec = L["Frost"], }, -- Summon Water Elemental
|
||||
[12043] = { cd = 180, spec = L["Arcane"], }, -- Presence of Mind
|
||||
[11129] = { cd = 180, spec = L["Fire"] }, -- Combustion
|
||||
[120] = { cd = 10,
|
||||
sharedCD = {
|
||||
[31661] = true, -- Cone of Cold
|
||||
}, spec = L["Fire"] }, -- Dragon's Breath
|
||||
[31661] = { cd = 20,
|
||||
sharedCD = {
|
||||
[120] = true, -- Cone of Cold
|
||||
}, spec = L["Fire"] }, -- Dragon's Breath
|
||||
[12042] = { cd = 180, spec = L["Arcane"], }, -- Arcane Power
|
||||
[11958] = { cd = 384, spec = L["Frost"], -- Coldsnap
|
||||
resetCD = {
|
||||
[12472] = true,
|
||||
[45438] = true,
|
||||
[31687] = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Priest
|
||||
["PRIEST"] = {
|
||||
[10890] = { cd = 27, [L["Shadow"]] = 23, }, -- Psychic Scream
|
||||
[15487] = { cd = 45, spec = L["Shadow"], }, -- Silence
|
||||
[10060] = { cd = 180, spec = L["Discipline"], }, -- Power Infusion
|
||||
[33206] = { cd = 120, spec = L["Discipline"], }, -- Pain Suppression
|
||||
[34433] = 300, -- Shadowfiend
|
||||
},
|
||||
|
||||
-- Druid
|
||||
["DRUID"] = {
|
||||
[22812] = 60, -- Barkskin
|
||||
[29166] = 360, -- Innervate
|
||||
[8983] = 60, -- Bash
|
||||
[16689] = 60, -- Natures Grasp
|
||||
[17116] = { cd = 180, spec = L["Restoration"], }, -- Natures Swiftness
|
||||
[33831] = { cd = 180, spec = L["Balance"], }, -- Force of Nature
|
||||
},
|
||||
|
||||
-- Shaman
|
||||
["SHAMAN"] = {
|
||||
[8042] = { cd = 6, -- Earth Shock
|
||||
sharedCD = {
|
||||
[8056] = true, -- Frost Shock
|
||||
[8050] = true, -- Flame Shock
|
||||
},
|
||||
},
|
||||
[30823] = { cd = 120, spec = L["Enhancement"], }, -- Shamanistic Rage
|
||||
[16166] = { cd = 180, spec = L["Elemental"], }, -- Elemental Mastery
|
||||
[16188] = { cd = 180, spec = L["Restoration"], }, -- Natures Swiftness
|
||||
[16190] = { cd = 300, spec = L["Restoration"], }, -- Mana Tide Totem
|
||||
},
|
||||
|
||||
-- Paladin
|
||||
["PALADIN"] = {
|
||||
[10278] = 180, -- Blessing of Protection
|
||||
[1044] = 25, -- Blessing of Freedom
|
||||
[10308] = { cd = 60, [L["Retribution"]] = 40, }, -- Hammer of Justice
|
||||
[642] = { cd = 300, -- Divine Shield
|
||||
sharedCD = {
|
||||
cd = 60, -- no actual shared CD but debuff
|
||||
[31884] = true,
|
||||
},
|
||||
},
|
||||
[31884] = { cd = 180, spec = L["Retribution"], -- Avenging Wrath
|
||||
sharedCD = {
|
||||
cd = 60,
|
||||
[642] = true,
|
||||
},
|
||||
},
|
||||
[20066] = { cd = 60, spec = L["Retribution"], }, -- Repentance
|
||||
[31842] = { cd = 180, spec = L["Holy"], }, -- Divine Illumination
|
||||
[31935] = { cd = 30, spec = L["Protection"], }, -- Avengers Shield
|
||||
|
||||
},
|
||||
|
||||
-- Warlock
|
||||
["WARLOCK"] = {
|
||||
[17928] = 40, -- Howl of Terror
|
||||
[27223] = 120, -- Death Coil
|
||||
--[19647] = { cd = 24 }, -- Spell Lock; how will I handle pet spells?
|
||||
[30414] = { cd = 20, spec = L["Destruction"], }, -- Shadowfury
|
||||
[17877] = { cd = 15, spec = L["Destruction"], }, -- Shadowburn
|
||||
[18708] = { cd = 900, spec = L["Demonology"], }, -- Feldom
|
||||
},
|
||||
|
||||
-- Warrior
|
||||
["WARRIOR"] = {
|
||||
--[[6552] = { cd = 10, -- Pummel
|
||||
sharedCD = {
|
||||
[72] = true,
|
||||
},
|
||||
},
|
||||
[72] = { cd = 12, -- Shield Bash
|
||||
sharedCD = {
|
||||
[6552] = true,
|
||||
},
|
||||
}, ]]
|
||||
--[23920] = 10, -- Spell Reflection
|
||||
[3411] = 30, -- Intervene
|
||||
[676] = 60, -- Disarm
|
||||
[5246] = 180, -- Intimidating Shout
|
||||
--[2565] = 60, -- Shield Block
|
||||
[12292] = { cd = 180, spec = L["Arms"], }, -- Death Wish
|
||||
[12975] = { cd = 180, spec = L["Protection"], }, -- Last Stand
|
||||
[12809] = { cd = 30, spec = L["Protection"], }, -- Concussion Blow
|
||||
|
||||
},
|
||||
|
||||
-- Hunter
|
||||
["HUNTER"] = {
|
||||
[19503] = 30, -- Scatter Shot
|
||||
[19263] = 300, -- Deterrence; not on BM but can't do 2 specs
|
||||
[14311] = { cd = 30, -- Freezing Trap
|
||||
sharedCD = {
|
||||
[13809] = true, -- Frost Trap
|
||||
[34600] = true, -- Snake Trap
|
||||
},
|
||||
},
|
||||
[13809] = { cd = 30, -- Frost Trap
|
||||
sharedCD = {
|
||||
[14311] = true, -- Freezing Trap
|
||||
[34600] = true, -- Snake Trap
|
||||
},
|
||||
},
|
||||
[34600] = { cd = 30, -- Snake Trap
|
||||
sharedCD = {
|
||||
[14311] = true, -- Freezing Trap
|
||||
[13809] = true, -- Frost Trap
|
||||
},
|
||||
},
|
||||
[34490] = { cd = 20, spec = L["Marksmanship"], }, -- Silencing Shot
|
||||
[19386] = { cd = 60, spec = L["Survival"], }, -- Wyvern Sting
|
||||
[19577] = { cd = 60, spec = L["Beast Mastery"], }, -- Intimidation
|
||||
[38373] = { cd = 120, spec = L["Beast Mastery"], }, -- The Beast Within
|
||||
},
|
||||
|
||||
-- Rogue
|
||||
["ROGUE"] = {
|
||||
[1766] = 10, -- Kick
|
||||
[8643] = 20, -- Kidney Shot
|
||||
[31224] = 60, -- Cloak of Shadow
|
||||
[26889] = { cd = 300, [L["Subtlety"]] = 180, }, -- Vanish
|
||||
[2094] = { cd = 180, [L["Subtlety"]] = 90, }, -- Blind
|
||||
[11305] = { cd = 300, [L["Combat"]] = 180, }, -- Sprint
|
||||
[26669] = { cd = 300, [L["Combat"]] = 180, }, -- Evasion
|
||||
[14177] = { cd = 180, spec = L["Assassination"], }, -- Cold Blood
|
||||
[13750] = { cd = 300, spec = L["Combat"], }, -- Adrenaline Rush
|
||||
[13877] = { cd = 120, spec = L["Combat"], }, -- Blade Flurry
|
||||
[36554] = { cd = 30, spec = L["Subtlety"], }, -- Shadowstep
|
||||
[14185] = { cd = 600, spec = L["Subtlety"], -- Preparation
|
||||
resetCD = {
|
||||
[26669] = true,
|
||||
[11305] = true,
|
||||
[26889] = true,
|
||||
[14177] = true,
|
||||
[36554] = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
["Scourge"] = {
|
||||
|
||||
},
|
||||
["BloodElf"] = {
|
||||
|
||||
},
|
||||
["Tauren"] = {
|
||||
|
||||
},
|
||||
["Orc"] = {
|
||||
|
||||
},
|
||||
["Troll"] = {
|
||||
|
||||
},
|
||||
["NightElf"] = {
|
||||
[2651] = { cd = 180, spec = L["Discipline"], }, -- Elune's Grace
|
||||
[10797] = { cd = 30, spec = L["Discipline"], }, -- Star Shards
|
||||
},
|
||||
["Draenei"] = {
|
||||
[32548] = { cd = 300, spec = L["Discipline"], }, -- Hymn of Hope
|
||||
},
|
||||
["Human"] = {
|
||||
[13908] = { cd = 600, spec = L["Discipline"], }, -- Desperate Prayer
|
||||
},
|
||||
["Gnome"] = {
|
||||
},
|
||||
["Dwarf"] = {
|
||||
[13908] = { cd = 600, spec = L["Discipline"], }, -- Desperate Prayer
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
function Gladdy:Racials()
|
||||
return {
|
||||
["Scourge"] = {
|
||||
[7744] = true, -- Will of the Forsaken
|
||||
duration = 120,
|
||||
spellName = select(1, GetSpellInfo(7744)),
|
||||
texture = select(3, GetSpellInfo(7744))
|
||||
},
|
||||
["BloodElf"] = {
|
||||
[28730] = true, -- Arcane Torrent
|
||||
duration = 120,
|
||||
spellName = select(1, GetSpellInfo(28730)),
|
||||
texture = select(3, GetSpellInfo(28730))
|
||||
},
|
||||
["Tauren"] = {
|
||||
[20549] = true, -- War Stomp
|
||||
duration = 120,
|
||||
spellName = select(1, GetSpellInfo(20549)),
|
||||
texture = select(3, GetSpellInfo(20549))
|
||||
},
|
||||
["Orc"] = {
|
||||
[20572] = true,
|
||||
[33697] = true,
|
||||
[33702] = true,
|
||||
duration = 120,
|
||||
spellName = select(1, GetSpellInfo(20572)),
|
||||
texture = select(3, GetSpellInfo(20572))
|
||||
},
|
||||
["Troll"] = {
|
||||
[20554] = true,
|
||||
[26296] = true,
|
||||
[26297] = true,
|
||||
duration = 180,
|
||||
spellName = select(1, GetSpellInfo(20554)),
|
||||
texture = select(3, GetSpellInfo(20554))
|
||||
},
|
||||
["NightElf"] = {
|
||||
[20580] = true,
|
||||
duration = 10,
|
||||
spellName = select(1, GetSpellInfo(20580)),
|
||||
texture = select(3, GetSpellInfo(20580))
|
||||
},
|
||||
["Draenei"] = {
|
||||
[28880] = true,
|
||||
duration = 180,
|
||||
spellName = select(1, GetSpellInfo(28880)),
|
||||
texture = select(3, GetSpellInfo(28880))
|
||||
},
|
||||
["Human"] = {
|
||||
[20600] = true, -- Perception
|
||||
duration = 180,
|
||||
spellName = select(1, GetSpellInfo(20600)),
|
||||
texture = select(3, GetSpellInfo(20600))
|
||||
},
|
||||
["Gnome"] = {
|
||||
[20589] = true, -- Escape Artist
|
||||
duration = 105,
|
||||
spellName = select(1, GetSpellInfo(20589)),
|
||||
texture = select(3, GetSpellInfo(20589))
|
||||
},
|
||||
["Dwarf"] = {
|
||||
[20594] = true, -- Stoneform
|
||||
duration = 180,
|
||||
spellName = select(1, GetSpellInfo(20594)),
|
||||
texture = select(3, GetSpellInfo(20594))
|
||||
},
|
||||
}
|
||||
end
|
@ -1,4 +1,4 @@
|
||||
local select, string_gsub = select, string.gsub
|
||||
local select, string_gsub, tostring = select, string.gsub, tostring
|
||||
|
||||
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
|
||||
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||
@ -34,7 +34,7 @@ function EventListener:JOINED_ARENA()
|
||||
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
|
||||
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
|
||||
self:SetScript("OnEvent", EventListener.OnEvent)
|
||||
Gladdy:SendCommMessage("GladdyVCheck", Gladdy.version, "RAID", UnitName("player"))
|
||||
Gladdy:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "RAID", UnitName("player"))
|
||||
end
|
||||
|
||||
function EventListener:Reset()
|
||||
@ -106,11 +106,13 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
|
||||
end
|
||||
end
|
||||
if srcUnit then
|
||||
local unitRace = Gladdy.buttons[srcUnit].race
|
||||
-- cooldown tracker
|
||||
if Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName] then
|
||||
local unitClass
|
||||
local spellId = Cooldowns.cooldownSpellIds[spellName] -- don't use spellId from combatlog, in case of different spellrank
|
||||
if (Cooldowns.cooldownSpells[Gladdy.buttons[srcUnit].class][spellId]) then
|
||||
if Gladdy.db.cooldownCooldowns[tostring(spellId)] then
|
||||
if (Gladdy:GetCooldownList()[Gladdy.buttons[srcUnit].class][spellId]) then
|
||||
unitClass = Gladdy.buttons[srcUnit].class
|
||||
else
|
||||
unitClass = Gladdy.buttons[srcUnit].race
|
||||
@ -118,6 +120,11 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
|
||||
Cooldowns:CooldownUsed(srcUnit, unitClass, spellId, spellName)
|
||||
Gladdy:DetectSpec(srcUnit, Gladdy.specSpells[spellName])
|
||||
end
|
||||
end
|
||||
|
||||
if Gladdy.db.racialEnabled and Gladdy:Racials()[unitRace].spellName == spellName and Gladdy:Racials()[unitRace][spellID] then
|
||||
Gladdy:SendMessage("RACIAL_USED", srcUnit)
|
||||
end
|
||||
|
||||
if not Gladdy.buttons[srcUnit].class then
|
||||
Gladdy:SpotEnemy(srcUnit, true)
|
||||
|
14
Frame.lua
14
Frame.lua
@ -285,3 +285,17 @@ function Gladdy:CreateButton(i)
|
||||
self:Call(v, "CreateFrame", button.unit)
|
||||
end
|
||||
end
|
||||
|
||||
function Gladdy:GetAnchor(unit, position)
|
||||
local anchor = "healthBar"
|
||||
if Gladdy.db.classIconPos == position then
|
||||
anchor = "classIcon"
|
||||
end
|
||||
if Gladdy.db.trinketPos == position then
|
||||
anchor = "trinket"
|
||||
end
|
||||
if anchor == Gladdy.db.racialAnchor and Gladdy.db.racialPos == position then
|
||||
anchor = "racial"
|
||||
end
|
||||
return Gladdy.buttons[unit][anchor]
|
||||
end
|
33
Gladdy.lua
33
Gladdy.lua
@ -11,6 +11,9 @@ local IsAddOnLoaded = IsAddOnLoaded
|
||||
local IsInInstance = IsInInstance
|
||||
local GetBattlefieldStatus = GetBattlefieldStatus
|
||||
local IsActiveBattlefieldArena = IsActiveBattlefieldArena
|
||||
local RELEASE_TYPES = { alpha = "Alpha", beta = "Beta", release = "Release"}
|
||||
local PREFIX = "TBC-Classic_v"
|
||||
local VERSION_REGEX = PREFIX .. "(%d+%.%d+)%-(%a)"
|
||||
|
||||
---------------------------
|
||||
|
||||
@ -21,9 +24,12 @@ local IsActiveBattlefieldArena = IsActiveBattlefieldArena
|
||||
local MAJOR, MINOR = "Gladdy", 4
|
||||
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
|
||||
local L
|
||||
Gladdy.version_major = "TBC-Classic_v1"
|
||||
Gladdy.version_minor = "0.4-Beta"
|
||||
Gladdy.version = Gladdy.version_major .. "." .. Gladdy.version_minor
|
||||
Gladdy.version_major_num = 1
|
||||
Gladdy.version_minor_num = 0.05
|
||||
Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num
|
||||
Gladdy.version_releaseType = RELEASE_TYPES.beta
|
||||
Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType
|
||||
Gladdy.VERSION_REGEX = VERSION_REGEX
|
||||
|
||||
LibStub("AceTimer-3.0"):Embed(Gladdy)
|
||||
LibStub("AceComm-3.0"):Embed(Gladdy)
|
||||
@ -160,6 +166,25 @@ end
|
||||
|
||||
---------------------------
|
||||
|
||||
function Gladdy:DeleteUnknownOptions(tbl, refTbl, str)
|
||||
if str == nil then
|
||||
str = "Gladdy.db"
|
||||
end
|
||||
for k,v in pairs(tbl) do
|
||||
if refTbl[k] == nil then
|
||||
--Gladdy:Print("SavedVariable deleted:", str .. "." .. k, "not found!")
|
||||
tbl[k] = nil
|
||||
else
|
||||
if type(v) ~= type(refTbl[k]) then
|
||||
--Gladdy:Print("SavedVariable deleted:", str .. "." .. k, "type error!", "Expected", type(refTbl[k]), "but found", type(v))
|
||||
tbl[k] = nil
|
||||
elseif type(v) == "table" then
|
||||
Gladdy:DeleteUnknownOptions(v, refTbl[k], str .. "." .. k)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Gladdy:OnInitialize()
|
||||
self.dbi = LibStub("AceDB-3.0"):New("GladdyXZ", self.defaults)
|
||||
self.dbi.RegisterCallback(self, "OnProfileChanged", "OnProfileChanged")
|
||||
@ -201,10 +226,12 @@ function Gladdy:OnInitialize()
|
||||
for k, v in self:IterModules() do
|
||||
self:Call(v, "Initialize") -- B.E > A.E :D
|
||||
end
|
||||
self:DeleteUnknownOptions(self.db, self.defaults.profile)
|
||||
end
|
||||
|
||||
function Gladdy:OnProfileChanged()
|
||||
self.db = self.dbi.profile
|
||||
self:DeleteUnknownOptions(self.db, self.defaults.profile)
|
||||
|
||||
self:HideFrame()
|
||||
self:ToggleFrame(3)
|
||||
|
@ -1,6 +1,6 @@
|
||||
## Interface: 20501
|
||||
## Title: Gladdy - TBC
|
||||
## Version: 1.0.4-Beta
|
||||
## Version: 1.0.5-Beta
|
||||
## Notes: The most powerful arena AddOn for WoW 2.5.1
|
||||
## Author: XiconQoo, DnB_Junkee, Knall
|
||||
## X-Email: contact me on discord Knall#1751
|
||||
@ -14,6 +14,7 @@ Lang.lua
|
||||
Frame.lua
|
||||
Options.lua
|
||||
Constants.lua
|
||||
ImportStrings.lua
|
||||
|
||||
Modules\Announcements.lua
|
||||
Modules\Healthbar.lua
|
||||
@ -25,6 +26,7 @@ Modules\Diminishings.lua
|
||||
Modules\Highlight.lua
|
||||
Modules\TotemPlates.lua
|
||||
Modules\Trinket.lua
|
||||
Modules\Racial.lua
|
||||
Modules\Cooldowns.lua
|
||||
Modules\ArenaCountDown.lua
|
||||
Modules\BuffsDebuffs.lua
|
||||
|
13
ImportStrings.lua
Normal file
13
ImportStrings.lua
Normal file
@ -0,0 +1,13 @@
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
|
||||
function Gladdy:GetKlimpProfile()
|
||||
return "4XzRBL1CBBKe(xKvn3hpAzhz7QIL1gQu7Uv5IoqKqICnjGwaW1r5H8BF7z6EWbVaKLEiMqaZ0tp910FDpzoF(TZND3U7VV(YW)8PfLf3KTC56IhMFnN(s4LZw)x5ZVwO6p43U5XvzZVsRykj3R1cNsP9M53)gTC(Sfz1nxMvDzz1Y8Q3vUPSkSuzizNFnB(ShI)Bv4FBMpBjmOYnll)rbs32LFVxZUWnFwXJ3wLVTS6QYIM)9xGbL3ej2YQ3VUo7Un5VBD1In5ZVRJpEOppWUqDCUGg9hZx)WkGKIWNYwSoBZVuei7Y5xoF2J5nFmpBtZQEd0WImvzt(2B2K1KJcN3U5hzpvFBw1d5nWCVJ2rZwv(J3URk795X)m8ECrUPSE(SF7tF4J3g2k)Z1lBwDv2IgGTVMFbitxLw2BZ)ZMDv5ZN951fR3MTzDDucgehWwa24bP3ss4pR5j4nZ(urtE19zlY)6BxU8lf1F9dBan9tF9tBZEiV(R4y)2h2uwdmXkyBTjU12BdFknjVtgUQt4eEiYurZhURV5tsV(HQYF8(1v5lAwxw0U9rI85S)miD6RUNp79LvRRV5gGfcYW913aZ2Ar8gPDFRBYqwMEFN55N2UDxr(WT2fEpAHCbte3G8Egji3Cv16)6V)J)XUSLvznz)9FCBYH6F1ZU8XYFKxDtE1I8IgqAheQDSv7atw8dv8b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fzKpKphQ1(SvE7vDrXFx0wNplxyTtQ8JA7(7H3mRfMo3XhwTRQCwMadpiBjX4)JKOZPh79i3lIzeRJsPHOm9K26)xaiu4IHSA6qs5jvoCuHAjgX1aMVZcNCC7ym6ISi6BTCUStYS41c6miy4D46NNroP(SWiJk78WiotFM4KwIxUXFAg5eIZJ)KGUlLpM)Ko6oHm7c90Stkng5zrWC8rfSNhJ0(Zy(CWiHoJDEch44QXmsxWjJE2r0htWmFIXZHuPPBr(pnJCAUym1dcdMWRlYmtZoi5u25rU42ZKcYDNhtUeqpnMP65XjSs8X8Pm9CQ8RcUPzj4yDE244ORF)pnJain)Sse8PBoEuQo2GQzp9sqMC8GME35Rzu2WGgrg4Io5MFf7qFuCySJyCO50ZTqXrVSC1gy(IL2TC4TR8hVy7H1hnckQz14RH9GRN9HNG6Ihwlw())l6WhMj"
|
||||
end
|
@ -1,4 +1,4 @@
|
||||
local pairs, ipairs, select, tinsert, tbl_sort = pairs, ipairs, select, tinsert, table.sort
|
||||
local pairs, ipairs, select, tinsert, tbl_sort, tostring = pairs, ipairs, select, tinsert, table.sort, tostring
|
||||
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
local CreateFrame, GetTime = CreateFrame, GetTime
|
||||
@ -10,9 +10,9 @@ local function defaultSpells(auraType)
|
||||
local spells = {}
|
||||
for k,v in pairs(Gladdy:GetImportantAuras()) do
|
||||
if not auraType or auraType == v.track then
|
||||
spells[k] = {}
|
||||
spells[k].enabled = true
|
||||
spells[k].priority = v.priority
|
||||
spells[tostring(v.spellID)] = {}
|
||||
spells[tostring(v.spellID)].enabled = true
|
||||
spells[tostring(v.spellID)].priority = v.priority
|
||||
end
|
||||
end
|
||||
return spells
|
||||
@ -74,7 +74,7 @@ function Auras:CreateFrame(unit)
|
||||
Auras:AURA_FADE(unit)
|
||||
else
|
||||
self.timeLeft = self.timeLeft - elapsed
|
||||
self.text:SetFormattedText("%.1f", self.timeLeft)
|
||||
self.text:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
||||
end
|
||||
end
|
||||
end)
|
||||
@ -136,16 +136,13 @@ function Auras:Test(unit)
|
||||
|
||||
if (unit == "arena1") then
|
||||
aura, _, icon = GetSpellInfo(12826)
|
||||
elseif (unit == "arena4") then
|
||||
self:AURA_GAIN(unit,nil, 12826, aura, icon, self.auras[aura].duration, GetTime() + self.auras[aura].duration)
|
||||
elseif (unit == "arena2") then
|
||||
aura, _, icon = GetSpellInfo(6770)
|
||||
self:AURA_GAIN(unit,nil, 6770, aura, icon, self.auras[aura].duration, GetTime() + self.auras[aura].duration)
|
||||
elseif (unit == "arena3") then
|
||||
aura, _, icon = GetSpellInfo(31224)
|
||||
end
|
||||
|
||||
if (aura) then
|
||||
--(unit, auraType, spellID, aura, icon, duration, expirationTime, count, debuffType)
|
||||
self:AURA_GAIN(unit,nil, nil, aura, icon, self.auras[aura].duration, GetTime() + self.auras[aura].duration)
|
||||
--self:AURA_FADE(unit)
|
||||
self:AURA_GAIN(unit,nil, 31224, aura, icon, self.auras[aura].duration, GetTime() + self.auras[aura].duration)
|
||||
end
|
||||
end
|
||||
|
||||
@ -157,22 +154,26 @@ function Auras:JOINED_ARENA()
|
||||
end
|
||||
|
||||
function Auras:AURA_GAIN(unit, auraType, spellID, aura, icon, duration, expirationTime, count, debuffType)
|
||||
if not Gladdy.db.auraListDefault[aura] or not Gladdy.db.auraListDefault[aura].enabled then
|
||||
return
|
||||
end
|
||||
local auraFrame = self.frames[unit]
|
||||
if (not auraFrame) then
|
||||
return
|
||||
end
|
||||
if not self.auras[aura] then
|
||||
return
|
||||
end
|
||||
-- don't use spellId from combatlog, in case of different spellrank
|
||||
if not Gladdy.db.auraListDefault[tostring(self.auras[aura].spellID)] or not Gladdy.db.auraListDefault[tostring(self.auras[aura].spellID)].enabled then
|
||||
return
|
||||
end
|
||||
|
||||
if (auraFrame.priority and auraFrame.priority > Gladdy.db.auraListDefault[aura].priority) then
|
||||
if (auraFrame.priority and auraFrame.priority > Gladdy.db.auraListDefault[tostring(self.auras[aura].spellID)].priority) then
|
||||
return
|
||||
end
|
||||
auraFrame.startTime = expirationTime - duration
|
||||
auraFrame.endTime = expirationTime
|
||||
auraFrame.name = aura
|
||||
auraFrame.timeLeft = expirationTime - GetTime()
|
||||
auraFrame.priority = Gladdy.db.auraListDefault[aura].priority
|
||||
auraFrame.priority = Gladdy.db.auraListDefault[tostring(self.auras[aura].spellID)].priority
|
||||
auraFrame.icon:SetTexture(icon)
|
||||
auraFrame.track = self.auras[aura].track
|
||||
auraFrame.active = true
|
||||
@ -356,28 +357,28 @@ function Auras:GetAuraOptions(auraType)
|
||||
local auras = {}
|
||||
for k,v in pairs(Gladdy:GetImportantAuras()) do
|
||||
if v.track == auraType then
|
||||
tinsert(auras, k)
|
||||
tinsert(auras, v.spellID)
|
||||
end
|
||||
end
|
||||
tbl_sort(auras)
|
||||
for i,k in ipairs(auras) do
|
||||
options[k] = {
|
||||
options[tostring(k)] = {
|
||||
type = "group",
|
||||
name = k,
|
||||
name = GetSpellInfo(k),
|
||||
order = i+2,
|
||||
icon = select(3, GetSpellInfo(Gladdy:GetImportantAuras()[k].spellID)),
|
||||
icon = select(3, GetSpellInfo(k)),
|
||||
args = {
|
||||
enabled = {
|
||||
order = 1,
|
||||
name = L["Enabled"],
|
||||
type = "toggle",
|
||||
image = select(3, GetSpellInfo(Gladdy:GetImportantAuras()[k].spellID)),
|
||||
image = select(3, GetSpellInfo(k)),
|
||||
width = "2",
|
||||
set = function(info, value)
|
||||
Gladdy.db.auraListDefault[k].enabled = value
|
||||
Gladdy.db.auraListDefault[tostring(k)].enabled = value
|
||||
end,
|
||||
get = function(info)
|
||||
return Gladdy.db.auraListDefault[k].enabled
|
||||
return Gladdy.db.auraListDefault[tostring(k)].enabled
|
||||
end
|
||||
},
|
||||
priority = {
|
||||
@ -389,10 +390,10 @@ function Auras:GetAuraOptions(auraType)
|
||||
width = "2",
|
||||
step = 1,
|
||||
get = function(info)
|
||||
return Gladdy.db.auraListDefault[k].priority
|
||||
return Gladdy.db.auraListDefault[tostring(k)].priority
|
||||
end,
|
||||
set = function(info, value)
|
||||
Gladdy.db.auraListDefault[k].priority = value
|
||||
Gladdy.db.auraListDefault[tostring(k)].priority = value
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
@ -87,6 +87,8 @@ function BuffsDebuffs:Initialize()
|
||||
self.trackedCC = {}
|
||||
self.framePool = {}
|
||||
self:RegisterMessage("JOINED_ARENA")
|
||||
self:RegisterMessage("UNIT_DESTROYED")
|
||||
self:RegisterMessage("UNIT_DEATH")
|
||||
self:RegisterMessage("AURA_FADE")
|
||||
self:RegisterMessage("AURA_GAIN")
|
||||
self:RegisterMessage("AURA_GAIN_LIMIT")
|
||||
@ -126,6 +128,14 @@ function BuffsDebuffs:ResetUnit(unit)
|
||||
end
|
||||
end
|
||||
|
||||
function BuffsDebuffs:UNIT_DESTROYED(unit)
|
||||
BuffsDebuffs:ResetUnit(unit)
|
||||
end
|
||||
|
||||
function BuffsDebuffs:UNIT_DEATH(unit)
|
||||
BuffsDebuffs:ResetUnit(unit)
|
||||
end
|
||||
|
||||
function BuffsDebuffs:Reset()
|
||||
for i=1,#self.framePool do
|
||||
self.framePool[i]:Hide()
|
||||
@ -282,55 +292,22 @@ function BuffsDebuffs:UpdateFrame(unit)
|
||||
self.frames[unit].debuffFrame:SetPoint("TOPRIGHT", Gladdy.buttons[unit].powerBar, "BOTTOMLEFT", Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset -verticalMargin)
|
||||
end
|
||||
elseif Gladdy.db.buffsCooldownPos == "LEFT" then
|
||||
horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.classIconPos == "LEFT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
horizontalMargin = Gladdy.db.highlightBorderSize - 1 + Gladdy.db.padding
|
||||
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
||||
if anchor == Gladdy.buttons[unit].healthBar then
|
||||
self.frames[unit].debuffFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset)
|
||||
else
|
||||
self.frames[unit].debuffFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset)
|
||||
end
|
||||
elseif (Gladdy.db.classIconPos == "LEFT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
end
|
||||
end
|
||||
if (Gladdy.db.drCooldownPos == "LEFT" and Gladdy.db.drEnabled) then
|
||||
verticalMargin = verticalMargin + Gladdy.db.drIconSize/2 + Gladdy.db.padding/2
|
||||
end
|
||||
if (Gladdy.db.castBarPos == "LEFT") then
|
||||
verticalMargin = verticalMargin -
|
||||
(((Gladdy.db.castBarHeight < Gladdy.db.castBarIconSize) and Gladdy.db.castBarIconSize
|
||||
or Gladdy.db.castBarHeight)/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
if (Gladdy.db.cooldownYPos == "LEFT" and Gladdy.db.cooldown) then
|
||||
verticalMargin = verticalMargin + (Gladdy.db.buffsIconSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
self.frames[unit].debuffFrame:SetPoint("RIGHT", Gladdy.buttons[unit].healthBar, "LEFT", -horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset + verticalMargin)
|
||||
|
||||
elseif Gladdy.db.buffsCooldownPos == "RIGHT" then
|
||||
horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.classIconPos == "RIGHT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
local anchor = Gladdy:GetAnchor(unit, "RIGHT")
|
||||
if anchor == Gladdy.buttons[unit].healthBar then
|
||||
self.frames[unit].debuffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset)
|
||||
else
|
||||
self.frames[unit].debuffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset)
|
||||
end
|
||||
elseif (Gladdy.db.classIconPos == "RIGHT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
end
|
||||
end
|
||||
if (Gladdy.db.drCooldownPos == "RIGHT" and Gladdy.db.drEnabled) then
|
||||
verticalMargin = verticalMargin + Gladdy.db.drIconSize/2 + Gladdy.db.padding/2
|
||||
end
|
||||
if (Gladdy.db.castBarPos == "RIGHT") then
|
||||
verticalMargin = verticalMargin -
|
||||
(((Gladdy.db.castBarHeight < Gladdy.db.castBarIconSize) and Gladdy.db.castBarIconSize
|
||||
or Gladdy.db.castBarHeight)/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
if (Gladdy.db.cooldownYPos == "RIGHT" and Gladdy.db.cooldown) then
|
||||
verticalMargin = verticalMargin + (Gladdy.db.buffsIconSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
self.frames[unit].debuffFrame:SetPoint("LEFT", Gladdy.buttons[unit].healthBar, "RIGHT", horizontalMargin + Gladdy.db.buffsXOffset, Gladdy.db.buffsYOffset + verticalMargin)
|
||||
end
|
||||
|
||||
self.frames[unit].buffFrame:SetHeight(Gladdy.db.buffsBuffsIconSize)
|
||||
@ -381,7 +358,16 @@ function BuffsDebuffs:UpdateFrame(unit)
|
||||
if (Gladdy.db.cooldownYPos == "LEFT" and Gladdy.db.cooldown) then
|
||||
verticalMargin = verticalMargin + (Gladdy.db.buffsBuffsIconSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
self.frames[unit].buffFrame:SetPoint("RIGHT", Gladdy.buttons[unit].healthBar, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin)
|
||||
--self.frames[unit].buffFrame:SetPoint("RIGHT", Gladdy.buttons[unit].healthBar, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin)
|
||||
|
||||
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
||||
horizontalMargin = Gladdy.db.highlightBorderSize - 1 + Gladdy.db.padding
|
||||
if anchor == Gladdy.buttons[unit].healthBar then
|
||||
self.frames[unit].buffFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset)
|
||||
else
|
||||
self.frames[unit].buffFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset)
|
||||
end
|
||||
|
||||
elseif Gladdy.db.buffsBuffsCooldownPos == "RIGHT" then
|
||||
horizontalMargin = horizontalMargin - 1 + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then
|
||||
@ -406,7 +392,15 @@ function BuffsDebuffs:UpdateFrame(unit)
|
||||
if (Gladdy.db.cooldownYPos == "RIGHT" and Gladdy.db.cooldown) then
|
||||
verticalMargin = verticalMargin + (Gladdy.db.buffsBuffsIconSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
self.frames[unit].buffFrame:SetPoint("LEFT", Gladdy.buttons[unit].healthBar, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin)
|
||||
--self.frames[unit].buffFrame:SetPoint("LEFT", Gladdy.buttons[unit].healthBar, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset + verticalMargin)
|
||||
|
||||
local anchor = Gladdy:GetAnchor(unit, "RIGHT")
|
||||
horizontalMargin = Gladdy.db.highlightBorderSize - 1 + Gladdy.db.padding
|
||||
if anchor == Gladdy.buttons[unit].healthBar then
|
||||
self.frames[unit].buffFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset)
|
||||
else
|
||||
self.frames[unit].buffFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.buffsBuffsXOffset, Gladdy.db.buffsBuffsYOffset)
|
||||
end
|
||||
end
|
||||
for i=1, #self.frames[unit].auras[AURA_TYPE_BUFF] do
|
||||
styleIcon(self.frames[unit].auras[AURA_TYPE_BUFF][i], AURA_TYPE_BUFF)
|
||||
@ -490,7 +484,7 @@ local function iconTimer(auraFrame, elapsed)
|
||||
auraFrame.cooldown:SetFormattedText("%d", timeLeftSec)
|
||||
elseif timeLeftMilliSec <= 3 and timeLeftMilliSec > 0 then
|
||||
if Gladdy.db.buffsDynamicColor then auraFrame.cooldown:SetTextColor(1, 0, 0) end
|
||||
auraFrame.cooldown:SetFormattedText("%.1f", timeLeftMilliSec)
|
||||
auraFrame.cooldown:SetFormattedText("%.1f", timeLeftMilliSec >= 0.0 and timeLeftMilliSec or 0.0)
|
||||
elseif timeLeftMilliSec <= 0 and timeLeftMilliSec > -0.05 then -- 50ms ping max wait for SPELL_AURA_REMOVED event
|
||||
auraFrame.cooldown:SetText("")
|
||||
else -- fallback in case SPELL_AURA_REMOVED is not fired
|
||||
|
@ -164,52 +164,21 @@ function Castbar:UpdateFrame(unit)
|
||||
|
||||
castBar:ClearAllPoints()
|
||||
local horizontalMargin = Gladdy.db.highlightBorderSize + Gladdy.db.padding
|
||||
local verticalMargin = -(Gladdy.db.powerBarHeight)/2
|
||||
if (Gladdy.db.castBarPos == "LEFT") then
|
||||
if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.classIconPos == "LEFT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
||||
if anchor == Gladdy.buttons[unit].healthBar then
|
||||
castBar:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin - leftMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset)
|
||||
else
|
||||
castBar:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding - leftMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset)
|
||||
end
|
||||
elseif (Gladdy.db.classIconPos == "LEFT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
end
|
||||
end
|
||||
if (Gladdy.db.cooldownYPos == "LEFT" and Gladdy.db.cooldown) then
|
||||
verticalMargin = verticalMargin + (Gladdy.db.cooldownSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
if (Gladdy.db.drCooldownPos == "LEFT" and Gladdy.db.drEnabled) then
|
||||
verticalMargin = verticalMargin + (Gladdy.db.drIconSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
if (Gladdy.db.buffsCooldownPos == "LEFT" and Gladdy.db.buffsEnabled) then
|
||||
verticalMargin = verticalMargin + Gladdy.db.buffsIconSize/2 + Gladdy.db.padding/2
|
||||
end
|
||||
castBar:SetPoint("RIGHT", button.healthBar, "LEFT", -horizontalMargin - leftMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset + verticalMargin)
|
||||
end
|
||||
if (Gladdy.db.castBarPos == "RIGHT") then
|
||||
if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.classIconPos == "RIGHT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
local anchor = Gladdy:GetAnchor(unit, "RIGHT")
|
||||
if anchor == Gladdy.buttons[unit].healthBar then
|
||||
castBar:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + rightMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset)
|
||||
else
|
||||
castBar:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + rightMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset)
|
||||
end
|
||||
elseif (Gladdy.db.classIconPos == "RIGHT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
end
|
||||
end
|
||||
if (Gladdy.db.cooldownYPos == "RIGHT" and Gladdy.db.cooldown) then
|
||||
verticalMargin = verticalMargin + (Gladdy.db.cooldownSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
if (Gladdy.db.drCooldownPos == "RIGHT" and Gladdy.db.drEnabled) then
|
||||
verticalMargin = verticalMargin + (Gladdy.db.drIconSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
if (Gladdy.db.buffsCooldownPos == "RIGHT" and Gladdy.db.buffsEnabled) then
|
||||
verticalMargin = verticalMargin + Gladdy.db.buffsIconSize/2 + Gladdy.db.padding/2
|
||||
end
|
||||
castBar:SetPoint("LEFT", button.healthBar, "RIGHT", horizontalMargin + rightMargin + Gladdy.db.castBarXOffset, Gladdy.db.castBarYOffset + verticalMargin)
|
||||
end
|
||||
|
||||
castBar.spellText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.auraFont), Gladdy.db.castBarFontSize)
|
||||
@ -515,7 +484,7 @@ function Castbar:Test(unit)
|
||||
|
||||
if (unit == "arena2") then
|
||||
spell, _, icon = GetSpellInfo(27072)
|
||||
value, maxValue, event = 0, 2, "cast"
|
||||
value, maxValue, event = 0, 40, "cast"
|
||||
elseif (unit == "arena1") then
|
||||
spell, _, icon = GetSpellInfo(27220)
|
||||
endTime = GetTime() * 1000 + 60*1000
|
||||
|
@ -1,12 +1,54 @@
|
||||
local type, pairs, ceil, tonumber, mod = type, pairs, ceil, tonumber, mod
|
||||
local type, pairs, ceil, tonumber, mod, tostring, upper, select = type, pairs, ceil, tonumber, mod, tostring, string.upper, select
|
||||
local GetTime = GetTime
|
||||
local CreateFrame = CreateFrame
|
||||
local RACE_ICON_TCOORDS = {
|
||||
["HUMAN_MALE"] = {0, 0.125, 0, 0.25},
|
||||
["DWARF_MALE"] = {0.125, 0.25, 0, 0.25},
|
||||
["GNOME_MALE"] = {0.25, 0.375, 0, 0.25},
|
||||
["NIGHTELF_MALE"] = {0.375, 0.5, 0, 0.25},
|
||||
|
||||
["TAUREN_MALE"] = {0, 0.125, 0.25, 0.5},
|
||||
["SCOURGE_MALE"] = {0.125, 0.25, 0.25, 0.5},
|
||||
["TROLL_MALE"] = {0.25, 0.375, 0.25, 0.5},
|
||||
["ORC_MALE"] = {0.375, 0.5, 0.25, 0.5},
|
||||
|
||||
["HUMAN_FEMALE"] = {0, 0.125, 0.5, 0.75},
|
||||
["DWARF_FEMALE"] = {0.125, 0.25, 0.5, 0.75},
|
||||
["GNOME_FEMALE"] = {0.25, 0.375, 0.5, 0.75},
|
||||
["NIGHTELF_FEMALE"] = {0.375, 0.5, 0.5, 0.75},
|
||||
|
||||
["TAUREN_FEMALE"] = {0, 0.125, 0.75, 1.0},
|
||||
["SCOURGE_FEMALE"] = {0.125, 0.25, 0.75, 1.0},
|
||||
["TROLL_FEMALE"] = {0.25, 0.375, 0.75, 1.0},
|
||||
["ORC_FEMALE"] = {0.375, 0.5, 0.75, 1.0},
|
||||
|
||||
["BLOODELF_MALE"] = {0.5, 0.625, 0.25, 0.5},
|
||||
["BLOODELF_FEMALE"] = {0.5, 0.625, 0.75, 1.0},
|
||||
|
||||
["DRAENEI_MALE"] = {0.5, 0.625, 0, 0.25},
|
||||
["DRAENEI_FEMALE"] = {0.5, 0.625, 0.5, 0.75},
|
||||
}
|
||||
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
local L = Gladdy.L
|
||||
|
||||
local function getDefaultCooldown()
|
||||
local cooldowns = {}
|
||||
for class, t in pairs(Gladdy:GetCooldownList()) do
|
||||
for spellId, v in pairs(t) do
|
||||
local spellName, _, texture = GetSpellInfo(spellId)
|
||||
if spellName then
|
||||
cooldowns[tostring(spellId)] = true
|
||||
else
|
||||
Gladdy:Print("spellid does not exist " .. spellId)
|
||||
end
|
||||
end
|
||||
end
|
||||
return cooldowns
|
||||
end
|
||||
|
||||
local Cooldowns = Gladdy:NewModule("Cooldowns", nil, {
|
||||
cooldownFont = "DorisPP",
|
||||
cooldownFontScale = 1,
|
||||
@ -23,13 +65,14 @@ local Cooldowns = Gladdy:NewModule("Cooldowns", nil, {
|
||||
cooldownBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_Gloss",
|
||||
cooldownBorderColor = { r = 1, g = 1, b = 1, a = 1 },
|
||||
cooldownDisableCircle = false,
|
||||
cooldownCooldownAlpha = 1
|
||||
cooldownCooldownAlpha = 1,
|
||||
cooldownCooldowns = getDefaultCooldown()
|
||||
})
|
||||
|
||||
function Cooldowns:Initialize()
|
||||
self.cooldownSpellIds = {}
|
||||
self.spellTextures = {}
|
||||
for class, t in pairs(self.cooldownSpells) do
|
||||
for class, t in pairs(Gladdy:GetCooldownList()) do
|
||||
for k, v in pairs(t) do
|
||||
local spellName, _, texture = GetSpellInfo(k)
|
||||
if spellName then
|
||||
@ -43,6 +86,7 @@ function Cooldowns:Initialize()
|
||||
self:RegisterMessage("ENEMY_SPOTTED")
|
||||
self:RegisterMessage("SPEC_DETECTED")
|
||||
self:RegisterMessage("UNIT_DEATH")
|
||||
self:RegisterMessage("UNIT_DESTROYED")
|
||||
end
|
||||
|
||||
function Cooldowns:CreateFrame(unit)
|
||||
@ -102,56 +146,19 @@ function Cooldowns:UpdateFrame(unit)
|
||||
button.spellCooldownFrame:SetPoint("TOPLEFT", button.powerBar, "BOTTOMLEFT", Gladdy.db.cooldownXOffset, -Gladdy.db.highlightBorderSize + Gladdy.db.cooldownYOffset)
|
||||
end
|
||||
elseif Gladdy.db.cooldownYPos == "LEFT" then
|
||||
local horizontalMargin = Gladdy.db.highlightBorderSize + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.classIconPos == "LEFT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
||||
if anchor == Gladdy.buttons[unit].healthBar then
|
||||
button.spellCooldownFrame:SetPoint("RIGHT", anchor, "LEFT", -(Gladdy.db.highlightBorderSize + Gladdy.db.padding) + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
||||
else
|
||||
button.spellCooldownFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
||||
end
|
||||
elseif (Gladdy.db.classIconPos == "LEFT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
end
|
||||
end
|
||||
if (Gladdy.db.drCooldownPos == "LEFT" and Gladdy.db.drEnabled) then
|
||||
verticalMargin = verticalMargin + Gladdy.db.drIconSize/2 + Gladdy.db.padding/2
|
||||
end
|
||||
if (Gladdy.db.castBarPos == "LEFT") then
|
||||
verticalMargin = verticalMargin -
|
||||
((Gladdy.db.castBarHeight < Gladdy.db.castBarIconSize) and Gladdy.db.castBarIconSize
|
||||
or Gladdy.db.castBarHeight)/2 + Gladdy.db.padding/2
|
||||
end
|
||||
if (Gladdy.db.buffsCooldownPos == "LEFT" and Gladdy.db.buffsEnabled) then
|
||||
verticalMargin = verticalMargin - (Gladdy.db.buffsIconSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
button.spellCooldownFrame:SetPoint("RIGHT", button.healthBar, "LEFT", -horizontalMargin + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset + verticalMargin)
|
||||
elseif Gladdy.db.cooldownYPos == "RIGHT" then
|
||||
verticalMargin = -(Gladdy.db.powerBarHeight)/2
|
||||
local horizontalMargin = Gladdy.db.highlightBorderSize + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.classIconPos == "RIGHT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
local anchor = Gladdy:GetAnchor(unit, "RIGHT")
|
||||
if anchor == Gladdy.buttons[unit].healthBar then
|
||||
button.spellCooldownFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.highlightBorderSize + Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
||||
else
|
||||
button.spellCooldownFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset)
|
||||
end
|
||||
elseif (Gladdy.db.classIconPos == "RIGHT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
end
|
||||
end
|
||||
if (Gladdy.db.drCooldownPos == "RIGHT" and Gladdy.db.drEnabled) then
|
||||
verticalMargin = verticalMargin + Gladdy.db.drIconSize/2 + Gladdy.db.padding/2
|
||||
end
|
||||
if (Gladdy.db.castBarPos == "RIGHT") then
|
||||
verticalMargin = verticalMargin -
|
||||
((Gladdy.db.castBarHeight < Gladdy.db.castBarIconSize) and Gladdy.db.castBarIconSize
|
||||
or Gladdy.db.castBarHeight)/2 + Gladdy.db.padding/2
|
||||
end
|
||||
if (Gladdy.db.buffsCooldownPos == "RIGHT" and Gladdy.db.buffsEnabled) then
|
||||
verticalMargin = verticalMargin - (Gladdy.db.buffsIconSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
button.spellCooldownFrame:SetPoint("LEFT", button.healthBar, "RIGHT", horizontalMargin + Gladdy.db.cooldownXOffset, Gladdy.db.cooldownYOffset + verticalMargin)
|
||||
end
|
||||
button.spellCooldownFrame:SetHeight(Gladdy.db.cooldownSize)
|
||||
button.spellCooldownFrame:SetWidth(1)
|
||||
@ -227,13 +234,11 @@ function Cooldowns:UpdateFrame(unit)
|
||||
end
|
||||
|
||||
function Cooldowns:Test(unit)
|
||||
if Gladdy.db.cooldown then
|
||||
local button = Gladdy.buttons[unit]
|
||||
button.spellCooldownFrame:Show()
|
||||
button.lastCooldownSpell = 1
|
||||
self:UpdateTestCooldowns(unit)
|
||||
end
|
||||
end
|
||||
|
||||
function Cooldowns:UpdateTestCooldowns(unit)
|
||||
local button = Gladdy.buttons[unit]
|
||||
@ -246,12 +251,12 @@ function Cooldowns:UpdateTestCooldowns(unit)
|
||||
button.test = true
|
||||
|
||||
-- use class spells
|
||||
for k, v in pairs(self.cooldownSpells[button.class]) do
|
||||
for k, v in pairs(Gladdy:GetCooldownList()[button.class]) do
|
||||
--k is spellId
|
||||
self:CooldownUsed(unit, button.class, k, nil)
|
||||
end
|
||||
-- use race spells
|
||||
for k, v in pairs(self.cooldownSpells[button.race]) do
|
||||
for k, v in pairs(Gladdy:GetCooldownList()[button.race]) do
|
||||
self:CooldownUsed(unit, button.race, k, nil)
|
||||
end
|
||||
end
|
||||
@ -345,7 +350,8 @@ function Cooldowns:DetectSpec(unit, spec)
|
||||
if (Gladdy.db.cooldown) then
|
||||
local class = Gladdy.buttons[unit].class
|
||||
local race = Gladdy.buttons[unit].race
|
||||
for k, v in pairs(self.cooldownSpells[class]) do
|
||||
for k, v in pairs(Gladdy:GetCooldownList()[class]) do
|
||||
if Gladdy.db.cooldownCooldowns[tostring(k)] then
|
||||
--if (self.db.cooldownList[k] ~= false and self.db.cooldownList[class] ~= false) then
|
||||
if (type(v) == "table" and ((v.spec ~= nil and v.spec == spec) or (v.notSpec ~= nil and v.notSpec ~= spec))) then
|
||||
local sharedCD = false
|
||||
@ -371,14 +377,16 @@ function Cooldowns:DetectSpec(unit, spec)
|
||||
button.lastCooldownSpell = button.lastCooldownSpell + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
--end
|
||||
end
|
||||
----------------------
|
||||
--- RACE FUNCTIONALITY
|
||||
----------------------
|
||||
local race = Gladdy.buttons[unit].race
|
||||
if self.cooldownSpells[race] then
|
||||
for k, v in pairs(self.cooldownSpells[race]) do
|
||||
if Gladdy:GetCooldownList()[race] then
|
||||
for k, v in pairs(Gladdy:GetCooldownList()[race]) do
|
||||
if Gladdy.db.cooldownCooldowns[tostring(k)] then
|
||||
--if (self.db.cooldownList[k] ~= false and self.db.cooldownList[class] ~= false) then
|
||||
if (type(v) == "table" and ((v.spec ~= nil and v.spec == spec) or (v.notSpec ~= nil and v.notSpec ~= spec))) then
|
||||
local sharedCD = false
|
||||
@ -406,12 +414,17 @@ function Cooldowns:DetectSpec(unit, spec)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Cooldowns:ResetUnit(unit)
|
||||
Gladdy.buttons[unit].lastCooldownSpell = nil
|
||||
Gladdy.buttons[unit].test = nil
|
||||
end
|
||||
|
||||
function Cooldowns:UNIT_DESTROYED(unit)
|
||||
|
||||
end
|
||||
|
||||
function Cooldowns:UpdateCooldowns(button)
|
||||
local class = button.class
|
||||
local race = button.race
|
||||
@ -420,7 +433,8 @@ function Cooldowns:UpdateCooldowns(button)
|
||||
end
|
||||
|
||||
if (Gladdy.db.cooldown) then
|
||||
for k, v in pairs(self.cooldownSpells[class]) do
|
||||
for k, v in pairs(Gladdy:GetCooldownList()[class]) do
|
||||
if Gladdy.db.cooldownCooldowns[tostring(k)] then
|
||||
if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil and v.notSpec == nil)) then
|
||||
-- see if we have shared cooldowns without a cooldown defined
|
||||
-- e.g. hunter traps have shared cooldowns, so only display one trap instead all of them
|
||||
@ -446,11 +460,13 @@ function Cooldowns:UpdateCooldowns(button)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
----
|
||||
-- RACE FUNCTIONALITY
|
||||
----
|
||||
|
||||
for k, v in pairs(self.cooldownSpells[race]) do
|
||||
for k, v in pairs(Gladdy:GetCooldownList()[race]) do
|
||||
if Gladdy.db.cooldownCooldowns[tostring(k)] then
|
||||
if (type(v) ~= "table" or (type(v) == "table" and v.spec == nil and v.notSpec == nil)) then
|
||||
local icon = button.spellCooldownFrame["icon" .. button.lastCooldownSpell]
|
||||
icon:Show()
|
||||
@ -462,6 +478,7 @@ function Cooldowns:UpdateCooldowns(button)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Cooldowns:CooldownUsed(unit, unitClass, spellId, spellName)
|
||||
local button = Gladdy.buttons[unit]
|
||||
@ -470,7 +487,7 @@ function Cooldowns:CooldownUsed(unit, unitClass, spellId, spellName)
|
||||
end
|
||||
-- if (self.db.cooldownList[spellId] == false) then return end
|
||||
|
||||
local cooldown = self.cooldownSpells[unitClass][spellId]
|
||||
local cooldown = Gladdy:GetCooldownList()[unitClass][spellId]
|
||||
local cd = cooldown
|
||||
if (type(cooldown) == "table") then
|
||||
-- return if the spec doesn't have a cooldown for this spell
|
||||
@ -755,9 +772,80 @@ function Cooldowns:GetOptions()
|
||||
},
|
||||
},
|
||||
},
|
||||
cooldowns = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Cooldowns",
|
||||
order = 4,
|
||||
args = Cooldowns:GetCooldownOptions(),
|
||||
},
|
||||
}
|
||||
end
|
||||
|
||||
function Cooldowns:GetCooldownOptions()
|
||||
local group = {}
|
||||
|
||||
local p = 1
|
||||
for i,class in ipairs(Gladdy.CLASSES) do
|
||||
group[class] = {
|
||||
type = "group",
|
||||
name = LOCALIZED_CLASS_NAMES_MALE[class],
|
||||
order = i,
|
||||
icon = "Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes",
|
||||
iconCoords = CLASS_ICON_TCOORDS[class],
|
||||
args = {}
|
||||
}
|
||||
local o = 1
|
||||
for spellId,cooldown in pairs(Gladdy:GetCooldownList()[class]) do
|
||||
group[class].args[tostring(spellId)] = {
|
||||
type = "toggle",
|
||||
name = select(1, GetSpellInfo(spellId)) .. (type(cooldown) == "table" and cooldown.spec and (" - " .. cooldown.spec) or ""),
|
||||
order = o,
|
||||
width = "full",
|
||||
image = select(3, GetSpellInfo(spellId)),
|
||||
get = function(info)
|
||||
return Gladdy.db.cooldownCooldowns[tostring(spellId)]
|
||||
end,
|
||||
set = function(info, value)
|
||||
Gladdy.db.cooldownCooldowns[tostring(spellId)] = value
|
||||
Gladdy:UpdateFrame()
|
||||
end
|
||||
}
|
||||
o = o + 1
|
||||
end
|
||||
p = p + i
|
||||
end
|
||||
for i,race in ipairs(Gladdy.RACES) do
|
||||
group[race] = {
|
||||
type = "group",
|
||||
name = L[race],
|
||||
order = i + p,
|
||||
icon = "Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Races",
|
||||
iconCoords = RACE_ICON_TCOORDS[upper(race) .. "_FEMALE"],
|
||||
args = {}
|
||||
}
|
||||
local o = 1
|
||||
for spellId,cooldown in pairs(Gladdy:GetCooldownList()[race]) do
|
||||
group[race].args[tostring(spellId)] = {
|
||||
type = "toggle",
|
||||
name = select(1, GetSpellInfo(spellId)) .. (type(cooldown) == "table" and cooldown.spec and (" - " .. cooldown.spec) or ""),
|
||||
order = o,
|
||||
width = "full",
|
||||
image = select(3, GetSpellInfo(spellId)),
|
||||
get = function(info)
|
||||
return Gladdy.db.cooldownCooldowns[tostring(spellId)]
|
||||
end,
|
||||
set = function(info, value)
|
||||
Gladdy.db.cooldownCooldowns[tostring(spellId)] = value
|
||||
Gladdy:UpdateFrame()
|
||||
end
|
||||
}
|
||||
o = o + 1
|
||||
end
|
||||
end
|
||||
return group
|
||||
end
|
||||
|
||||
function Gladdy:UpdateTestCooldowns(i)
|
||||
local unit = "arena" .. i
|
||||
local button = Gladdy.buttons[unit]
|
||||
@ -769,219 +857,13 @@ function Gladdy:UpdateTestCooldowns(i)
|
||||
Cooldowns:DetectSpec(unit, button.testSpec)
|
||||
|
||||
-- use class spells
|
||||
for k, v in pairs(Cooldowns.cooldownSpells[button.class]) do
|
||||
for k, v in pairs(Gladdy:GetCooldownList()[button.class]) do
|
||||
--k is spellId
|
||||
Cooldowns:CooldownUsed(unit, button.class, k, nil)
|
||||
end
|
||||
-- use race spells
|
||||
for k, v in pairs(Cooldowns.cooldownSpells[button.race]) do
|
||||
for k, v in pairs(Gladdy:GetCooldownList()[button.race]) do
|
||||
Cooldowns:CooldownUsed(unit, button.race, k, nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Cooldowns.cooldownSpells = {
|
||||
-- Spell Name Cooldown[, Spec]
|
||||
-- Mage
|
||||
["MAGE"] = {
|
||||
[1953] = 15, -- Blink
|
||||
--[122] = 22, -- Frost Nova
|
||||
--[12051] = 480, --Evocation
|
||||
[2139] = 24, -- Counterspell
|
||||
[45438] = { cd = 300, [L["Frost"]] = 240, }, -- Ice Block
|
||||
[12472] = { cd = 180, spec = L["Frost"], }, -- Icy Veins
|
||||
[31687] = { cd = 180, spec = L["Frost"], }, -- Summon Water Elemental
|
||||
[12043] = { cd = 180, spec = L["Arcane"], }, -- Presence of Mind
|
||||
[11129] = { cd = 180, spec = L["Fire"] }, -- Combustion
|
||||
[120] = { cd = 10,
|
||||
sharedCD = {
|
||||
[31661] = true, -- Cone of Cold
|
||||
}, spec = L["Fire"] }, -- Dragon's Breath
|
||||
[31661] = { cd = 20,
|
||||
sharedCD = {
|
||||
[120] = true, -- Cone of Cold
|
||||
}, spec = L["Fire"] }, -- Dragon's Breath
|
||||
[12042] = { cd = 180, spec = L["Arcane"], }, -- Arcane Power
|
||||
[11958] = { cd = 384, spec = L["Frost"], -- Coldsnap
|
||||
resetCD = {
|
||||
[12472] = true,
|
||||
[45438] = true,
|
||||
[31687] = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Priest
|
||||
["PRIEST"] = {
|
||||
[10890] = { cd = 27, [L["Shadow"]] = 23, }, -- Psychic Scream
|
||||
[15487] = { cd = 45, spec = L["Shadow"], }, -- Silence
|
||||
[10060] = { cd = 180, spec = L["Discipline"], }, -- Power Infusion
|
||||
[33206] = { cd = 120, spec = L["Discipline"], }, -- Pain Suppression
|
||||
[34433] = 300, -- Shadowfiend
|
||||
},
|
||||
|
||||
-- Druid
|
||||
["DRUID"] = {
|
||||
[22812] = 60, -- Barkskin
|
||||
[29166] = 360, -- Innervate
|
||||
[8983] = 60, -- Bash
|
||||
[16689] = 60, -- Natures Grasp
|
||||
[17116] = { cd = 180, spec = L["Restoration"], }, -- Natures Swiftness
|
||||
[33831] = { cd = 180, spec = L["Balance"], }, -- Force of Nature
|
||||
},
|
||||
|
||||
-- Shaman
|
||||
["SHAMAN"] = {
|
||||
[8042] = { cd = 6, -- Earth Shock
|
||||
sharedCD = {
|
||||
[8056] = true, -- Frost Shock
|
||||
[8050] = true, -- Flame Shock
|
||||
},
|
||||
},
|
||||
[30823] = { cd = 120, spec = L["Enhancement"], }, -- Shamanistic Rage
|
||||
[16166] = { cd = 180, spec = L["Elemental"], }, -- Elemental Mastery
|
||||
[16188] = { cd = 180, spec = L["Restoration"], }, -- Natures Swiftness
|
||||
[16190] = { cd = 300, spec = L["Restoration"], }, -- Mana Tide Totem
|
||||
},
|
||||
|
||||
-- Paladin
|
||||
["PALADIN"] = {
|
||||
[10278] = 180, -- Blessing of Protection
|
||||
[1044] = 25, -- Blessing of Freedom
|
||||
[10308] = { cd = 60, [L["Retribution"]] = 40, }, -- Hammer of Justice
|
||||
[642] = { cd = 300, -- Divine Shield
|
||||
sharedCD = {
|
||||
cd = 60, -- no actual shared CD but debuff
|
||||
[31884] = true,
|
||||
},
|
||||
},
|
||||
[31884] = { cd = 180, spec = L["Retribution"], -- Avenging Wrath
|
||||
sharedCD = {
|
||||
cd = 60,
|
||||
[642] = true,
|
||||
},
|
||||
},
|
||||
[20066] = { cd = 60, spec = L["Retribution"], }, -- Repentance
|
||||
[31842] = { cd = 180, spec = L["Holy"], }, -- Divine Illumination
|
||||
[31935] = { cd = 30, spec = L["Protection"], }, -- Avengers Shield
|
||||
|
||||
},
|
||||
|
||||
-- Warlock
|
||||
["WARLOCK"] = {
|
||||
[17928] = 40, -- Howl of Terror
|
||||
[27223] = 120, -- Death Coil
|
||||
--[19647] = { cd = 24 }, -- Spell Lock; how will I handle pet spells?
|
||||
[30414] = { cd = 20, spec = L["Destruction"], }, -- Shadowfury
|
||||
[17877] = { cd = 15, spec = L["Destruction"], }, -- Shadowburn
|
||||
[18708] = { cd = 900, spec = L["Demonology"], }, -- Feldom
|
||||
},
|
||||
|
||||
-- Warrior
|
||||
["WARRIOR"] = {
|
||||
--[[6552] = { cd = 10, -- Pummel
|
||||
sharedCD = {
|
||||
[72] = true,
|
||||
},
|
||||
},
|
||||
[72] = { cd = 12, -- Shield Bash
|
||||
sharedCD = {
|
||||
[6552] = true,
|
||||
},
|
||||
}, ]]
|
||||
--[23920] = 10, -- Spell Reflection
|
||||
[3411] = 30, -- Intervene
|
||||
[676] = 60, -- Disarm
|
||||
[5246] = 180, -- Intimidating Shout
|
||||
--[2565] = 60, -- Shield Block
|
||||
[12292] = { cd = 180, spec = L["Arms"], }, -- Death Wish
|
||||
[12975] = { cd = 180, spec = L["Protection"], }, -- Last Stand
|
||||
[12809] = { cd = 30, spec = L["Protection"], }, -- Concussion Blow
|
||||
|
||||
},
|
||||
|
||||
-- Hunter
|
||||
["HUNTER"] = {
|
||||
[19503] = 30, -- Scatter Shot
|
||||
[19263] = 300, -- Deterrence; not on BM but can't do 2 specs
|
||||
[14311] = { cd = 30, -- Freezing Trap
|
||||
sharedCD = {
|
||||
[13809] = true, -- Frost Trap
|
||||
[34600] = true, -- Snake Trap
|
||||
},
|
||||
},
|
||||
[13809] = { cd = 30, -- Frost Trap
|
||||
sharedCD = {
|
||||
[14311] = true, -- Freezing Trap
|
||||
[34600] = true, -- Snake Trap
|
||||
},
|
||||
},
|
||||
[34600] = { cd = 30, -- Snake Trap
|
||||
sharedCD = {
|
||||
[14311] = true, -- Freezing Trap
|
||||
[13809] = true, -- Frost Trap
|
||||
},
|
||||
},
|
||||
[34490] = { cd = 20, spec = L["Marksmanship"], }, -- Silencing Shot
|
||||
[19386] = { cd = 60, spec = L["Survival"], }, -- Wyvern Sting
|
||||
[19577] = { cd = 60, spec = L["Beast Mastery"], }, -- Intimidation
|
||||
[38373] = { cd = 120, spec = L["Beast Mastery"], }, -- The Beast Within
|
||||
},
|
||||
|
||||
-- Rogue
|
||||
["ROGUE"] = {
|
||||
[1766] = 10, -- Kick
|
||||
[8643] = 20, -- Kidney Shot
|
||||
[31224] = 60, -- Cloak of Shadow
|
||||
[26889] = { cd = 300, [L["Subtlety"]] = 180, }, -- Vanish
|
||||
[2094] = { cd = 180, [L["Subtlety"]] = 90, }, -- Blind
|
||||
[11305] = { cd = 300, [L["Combat"]] = 180, }, -- Sprint
|
||||
[26669] = { cd = 300, [L["Combat"]] = 180, }, -- Evasion
|
||||
[14177] = { cd = 180, spec = L["Assassination"], }, -- Cold Blood
|
||||
[13750] = { cd = 300, spec = L["Combat"], }, -- Adrenaline Rush
|
||||
[13877] = { cd = 120, spec = L["Combat"], }, -- Blade Flurry
|
||||
[36554] = { cd = 30, spec = L["Subtlety"], }, -- Shadowstep
|
||||
[14185] = { cd = 600, spec = L["Subtlety"], -- Preparation
|
||||
resetCD = {
|
||||
[26669] = true,
|
||||
[11305] = true,
|
||||
[26889] = true,
|
||||
[14177] = true,
|
||||
[36554] = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
["Scourge"] = {
|
||||
[7744] = 120, -- Will of the Forsaken
|
||||
},
|
||||
["BloodElf"] = {
|
||||
[28730] = 120, -- Arcane Torrent
|
||||
},
|
||||
["Tauren"] = {
|
||||
[20549] = 120, -- War Stomp
|
||||
},
|
||||
["Orc"] = {
|
||||
|
||||
},
|
||||
["Troll"] = {
|
||||
|
||||
},
|
||||
["NightElf"] = {
|
||||
[2651] = { cd = 180, spec = L["Discipline"], }, -- Elune's Grace
|
||||
[10797] = { cd = 30, spec = L["Discipline"], }, -- Star Shards
|
||||
},
|
||||
["Draenei"] = {
|
||||
[32548] = { cd = 300, spec = L["Discipline"], }, -- Hymn of Hope
|
||||
},
|
||||
["Human"] = {
|
||||
[13908] = { cd = 600, spec = L["Discipline"], }, -- Desperate Prayer
|
||||
[20600] = 180, -- Perception
|
||||
},
|
||||
["Gnome"] = {
|
||||
[20589] = 105, -- Escape Artist
|
||||
},
|
||||
["Dwarf"] = {
|
||||
[20594] = 180, -- Stoneform
|
||||
[13908] = { cd = 600, spec = L["Discipline"], }, -- Desperate Prayer
|
||||
},
|
||||
}
|
@ -62,7 +62,7 @@ end
|
||||
|
||||
function Diminishings:Initialize()
|
||||
self.frames = {}
|
||||
self:RegisterMessage("UNIT_DEATH", "ResetUnit", "AURA_FADE")
|
||||
self:RegisterMessage("UNIT_DEATH", "ResetUnit", "AURA_FADE", "UNIT_DESTROYED")
|
||||
end
|
||||
|
||||
function Diminishings:CreateFrame(unit)
|
||||
@ -94,7 +94,7 @@ function Diminishings:CreateFrame(unit)
|
||||
if self.timeLeft >=5 then
|
||||
self.timeText:SetFormattedText("%d", self.timeLeft)
|
||||
else
|
||||
self.timeText:SetFormattedText("%.1f", self.timeLeft)
|
||||
self.timeText:SetFormattedText("%.1f", self.timeLeft >= 0.0 and self.timeLeft or 0.0)
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -161,56 +161,21 @@ function Diminishings:UpdateFrame(unit)
|
||||
|
||||
drFrame:ClearAllPoints()
|
||||
local horizontalMargin = Gladdy.db.highlightBorderSize + Gladdy.db.padding
|
||||
local verticalMargin = -(Gladdy.db.powerBarHeight)/2
|
||||
if (Gladdy.db.drCooldownPos == "LEFT") then
|
||||
if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.classIconPos == "LEFT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
local anchor = Gladdy:GetAnchor(unit, "LEFT")
|
||||
if anchor == Gladdy.buttons[unit].healthBar then
|
||||
drFrame:SetPoint("RIGHT", anchor, "LEFT", -horizontalMargin + Gladdy.db.drXOffset, Gladdy.db.drYOffset)
|
||||
else
|
||||
drFrame:SetPoint("RIGHT", anchor, "LEFT", -Gladdy.db.padding + Gladdy.db.drXOffset, Gladdy.db.drYOffset)
|
||||
end
|
||||
elseif (Gladdy.db.classIconPos == "LEFT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "LEFT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
end
|
||||
end
|
||||
if (Gladdy.db.castBarPos == "LEFT") then
|
||||
verticalMargin = verticalMargin -
|
||||
(((Gladdy.db.castBarHeight < Gladdy.db.castBarIconSize) and Gladdy.db.castBarIconSize
|
||||
or Gladdy.db.castBarHeight)/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
if (Gladdy.db.cooldownYPos == "LEFT" and Gladdy.db.cooldown) then
|
||||
verticalMargin = verticalMargin - (Gladdy.db.cooldownSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
if (Gladdy.db.buffsCooldownPos == "LEFT" and Gladdy.db.buffsEnabled) then
|
||||
verticalMargin = verticalMargin - (Gladdy.db.buffsIconSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
drFrame:SetPoint("RIGHT", Gladdy.buttons[unit].healthBar, "LEFT", -horizontalMargin + Gladdy.db.drXOffset, Gladdy.db.drYOffset + verticalMargin)
|
||||
end
|
||||
if (Gladdy.db.drCooldownPos == "RIGHT") then
|
||||
if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.classIconPos == "RIGHT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
local anchor = Gladdy:GetAnchor(unit, "RIGHT")
|
||||
if anchor == Gladdy.buttons[unit].healthBar then
|
||||
drFrame:SetPoint("LEFT", anchor, "RIGHT", horizontalMargin + Gladdy.db.drXOffset, Gladdy.db.drYOffset)
|
||||
else
|
||||
drFrame:SetPoint("LEFT", anchor, "RIGHT", Gladdy.db.padding + Gladdy.db.drXOffset, Gladdy.db.drYOffset)
|
||||
end
|
||||
elseif (Gladdy.db.classIconPos == "RIGHT") then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.classIconSize * Gladdy.db.classIconWidthFactor) + Gladdy.db.padding
|
||||
if (Gladdy.db.trinketPos == "RIGHT" and Gladdy.db.trinketEnabled) then
|
||||
horizontalMargin = horizontalMargin + (Gladdy.db.trinketSize * Gladdy.db.trinketWidthFactor) + Gladdy.db.padding
|
||||
end
|
||||
end
|
||||
if (Gladdy.db.castBarPos == "RIGHT") then
|
||||
verticalMargin = verticalMargin -
|
||||
(((Gladdy.db.castBarHeight < Gladdy.db.castBarIconSize) and Gladdy.db.castBarIconSize
|
||||
or Gladdy.db.castBarHeight)/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
if (Gladdy.db.cooldownYPos == "RIGHT" and Gladdy.db.cooldown) then
|
||||
verticalMargin = verticalMargin - (Gladdy.db.cooldownSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
if (Gladdy.db.buffsCooldownPos == "RIGHT" and Gladdy.db.buffsEnabled) then
|
||||
verticalMargin = verticalMargin - (Gladdy.db.buffsIconSize/2 + Gladdy.db.padding/2)
|
||||
end
|
||||
drFrame:SetPoint("LEFT", Gladdy.buttons[unit].healthBar, "RIGHT", horizontalMargin + Gladdy.db.drXOffset, Gladdy.db.drYOffset + verticalMargin)
|
||||
end
|
||||
|
||||
drFrame:SetWidth(Gladdy.db.drIconSize * 16)
|
||||
@ -289,6 +254,10 @@ function Diminishings:ResetUnit(unit)
|
||||
end
|
||||
end
|
||||
|
||||
function Diminishings:UNIT_DESTROYED(unit)
|
||||
Diminishings:ResetUnit(unit)
|
||||
end
|
||||
|
||||
function Diminishings:Test(unit)
|
||||
if Gladdy.db.drEnabled then
|
||||
local spells = { 33786, 118, 8643, 8983 }
|
||||
|
@ -64,9 +64,11 @@ importButton:SetText("Import\n(this will overwrite your current profile!)")
|
||||
importButton:SetWidth(200)
|
||||
importButton:SetHeight(50)
|
||||
importButton:SetCallback("OnClick", function(widget)
|
||||
ExportImport:ApplyImport(import.deserializedTable)
|
||||
Gladdy:UpdateFrame()
|
||||
ExportImport:ApplyImport(import.deserializedTable, Gladdy.db)
|
||||
import:Hide()
|
||||
Gladdy:Reset()
|
||||
Gladdy:HideFrame()
|
||||
Gladdy:ToggleFrame(3)
|
||||
end)
|
||||
import:AddChild(importButton)
|
||||
import.button = importButton
|
||||
@ -84,25 +86,24 @@ import:AddChild(importClearButton)
|
||||
import.clearButton = importClearButton
|
||||
|
||||
function ExportImport:CheckDeserializedOptions(tbl, refTbl, str)
|
||||
if str == nil and not tbl.version_major then
|
||||
return false, "Version conflict: version_major not seen"
|
||||
if str == nil and not tbl.version_major_num then
|
||||
return false, "Version conflict: version_major_num not seen"
|
||||
end
|
||||
if str == nil and tbl.version_major ~= Gladdy.version_major then
|
||||
return false, "Version conflict: " .. tbl.version_major .. " ~= " .. Gladdy.version_major
|
||||
if str == nil and tbl.version_major_num ~= Gladdy.version_major_num then
|
||||
return false, "Version conflict: " .. tbl.version_major_num .. " ~= " .. Gladdy.version_major_num
|
||||
end
|
||||
if str == nil then
|
||||
str = "Gladdy.db"
|
||||
tbl.version_major = nil
|
||||
tbl.version_major_num = nil
|
||||
end
|
||||
if type(tbl) == "table" then
|
||||
for k,v in pairs(tbl) do
|
||||
if refTbl[k] ~= nil then
|
||||
if refTbl[k] == nil then
|
||||
return false, str .. "." .. k .. " does not exist"
|
||||
else
|
||||
if type(v) ~= type(refTbl[k]) then
|
||||
return false, str .. "." .. k .. " type error. Expected " .. type(refTbl[k]) .. " found " .. type(v)
|
||||
end
|
||||
elseif type(v) == "table" then
|
||||
ExportImport:CheckDeserializedOptions(v, refTbl[k], str .. "." .. k)
|
||||
else
|
||||
return false, str .. "." .. k .. " does not exist"
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -122,7 +123,7 @@ function ExportImport:GetOptions()
|
||||
type = "execute",
|
||||
func = function()
|
||||
local db = table_copy(Gladdy.db)
|
||||
db.version_major = Gladdy.version_major
|
||||
db.version_major_num = Gladdy.version_major_num
|
||||
dump = AceSerializer:Serialize(db)
|
||||
local compress_deflate = LibDeflate:CompressZlib(dump)
|
||||
printable_compressed = LibDeflate:EncodeForPrint(compress_deflate)
|
||||
@ -164,14 +165,11 @@ function ExportImport:GetOptions()
|
||||
end
|
||||
|
||||
function ExportImport:ApplyImport(t, table)
|
||||
if table == nil then
|
||||
table = Gladdy.dbi.profile
|
||||
end
|
||||
for k,v in pairs(t) do
|
||||
if type(v) == "table" then
|
||||
ExportImport:ApplyImport(v, table[k])
|
||||
else
|
||||
table[k] = v;
|
||||
table[k] = v
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -204,7 +202,7 @@ function ExportImport:Decode(str, showError)
|
||||
end
|
||||
return nil
|
||||
end
|
||||
local statusOption, error = ExportImport:CheckDeserializedOptions(deserialized, Gladdy.db)
|
||||
local statusOption, error = ExportImport:CheckDeserializedOptions(deserialized, Gladdy.defaults.profile)
|
||||
if not statusOption then
|
||||
if showError then
|
||||
import.statustext:SetTextColor(1,0,0)
|
||||
|
@ -17,7 +17,9 @@ local Healthbar = Gladdy:NewModule("Healthbar", 100, {
|
||||
healthBarBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
||||
healthBarBgColor = { r = 0, g = 0, b = 0, a = 0.4 },
|
||||
healthBarFontColor = { r = 1, g = 1, b = 1, a = 1 },
|
||||
healthBarFontSize = 12,
|
||||
healthBarNameFontSize = 12,
|
||||
healthBarHealthFontSize = 12,
|
||||
healthName = true,
|
||||
healthActual = false,
|
||||
healthMax = true,
|
||||
healthPercentage = true,
|
||||
@ -26,6 +28,7 @@ local Healthbar = Gladdy:NewModule("Healthbar", 100, {
|
||||
function Healthbar:Initialize()
|
||||
self.frames = {}
|
||||
self:RegisterMessage("ENEMY_SPOTTED")
|
||||
self:RegisterMessage("UNIT_DESTROYED")
|
||||
self:RegisterMessage("UNIT_DEATH")
|
||||
end
|
||||
|
||||
@ -51,11 +54,11 @@ function Healthbar:CreateFrame(unit)
|
||||
healthBar.bg:SetVertexColor(Gladdy.db.healthBarBgColor.r, Gladdy.db.healthBarBgColor.g, Gladdy.db.healthBarBgColor.b, Gladdy.db.healthBarBgColor.a)
|
||||
|
||||
healthBar.nameText = healthBar:CreateFontString(nil, "LOW", "GameFontNormalSmall")
|
||||
if (Gladdy.db.healthBarFontSize < 1) then
|
||||
healthBar.nameText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), 1)
|
||||
if (Gladdy.db.healthBarNameFontSize < 1) then
|
||||
healthBar.nameText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarNameFont), 1)
|
||||
healthBar.nameText:Hide()
|
||||
else
|
||||
healthBar.nameText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), Gladdy.db.healthBarFontSize)
|
||||
healthBar.nameText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), Gladdy.db.healthBarNameFontSize)
|
||||
healthBar.nameText:Show()
|
||||
end
|
||||
healthBar.nameText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a)
|
||||
@ -65,11 +68,11 @@ function Healthbar:CreateFrame(unit)
|
||||
healthBar.nameText:SetPoint("LEFT", 5, 0)
|
||||
|
||||
healthBar.healthText = healthBar:CreateFontString(nil, "LOW")
|
||||
if (Gladdy.db.healthBarFontSize < 1) then
|
||||
if (Gladdy.db.healthBarHealthFontSize < 1) then
|
||||
healthBar.healthText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), 1)
|
||||
healthBar.healthText:Hide()
|
||||
else
|
||||
healthBar.healthText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), Gladdy.db.healthBarFontSize)
|
||||
healthBar.healthText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), Gladdy.db.healthBarHealthFontSize)
|
||||
healthBar.healthText:Hide()
|
||||
end
|
||||
healthBar.healthText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a)
|
||||
@ -166,17 +169,24 @@ function Healthbar:UpdateFrame(unit)
|
||||
healthBar.hp:SetPoint("TOPLEFT", healthBar, "TOPLEFT", (Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset), -(Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
||||
healthBar.hp:SetPoint("BOTTOMRIGHT", healthBar, "BOTTOMRIGHT", -(Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset), (Gladdy.db.healthBarBorderSize/Gladdy.db.statusbarBorderOffset))
|
||||
|
||||
if (Gladdy.db.healthBarFontSize < 1) then
|
||||
healthBar.nameText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), 1)
|
||||
if (Gladdy.db.healthBarHealthFontSize < 1) then
|
||||
healthBar.healthText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), 1)
|
||||
healthBar.nameText:Hide()
|
||||
healthBar.healthText:Hide()
|
||||
else
|
||||
healthBar.nameText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), Gladdy.db.healthBarFontSize)
|
||||
healthBar.nameText:Show()
|
||||
healthBar.healthText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), Gladdy.db.healthBarFontSize)
|
||||
healthBar.healthText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), Gladdy.db.healthBarHealthFontSize)
|
||||
healthBar.healthText:Show()
|
||||
end
|
||||
if (Gladdy.db.healthBarNameFontSize < 1) then
|
||||
healthBar.nameText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarNameFont), 1)
|
||||
healthBar.nameText:Hide()
|
||||
else
|
||||
healthBar.nameText:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.healthBarFont), Gladdy.db.healthBarNameFontSize)
|
||||
if Gladdy.db.healthName then
|
||||
healthBar.nameText:Show()
|
||||
else
|
||||
healthBar.nameText:Hide()
|
||||
end
|
||||
end
|
||||
healthBar.nameText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a)
|
||||
healthBar.healthText:SetTextColor(Gladdy.db.healthBarFontColor.r, Gladdy.db.healthBarFontColor.g, Gladdy.db.healthBarFontColor.b, Gladdy.db.healthBarFontColor.a)
|
||||
end
|
||||
@ -270,6 +280,17 @@ function Healthbar:UNIT_DEATH(unit)
|
||||
healthBar.healthText:SetText(L["DEAD"])
|
||||
end
|
||||
|
||||
function Healthbar:UNIT_DESTROYED(unit)
|
||||
local healthBar = self.frames[unit]
|
||||
if (not healthBar) then
|
||||
return
|
||||
end
|
||||
|
||||
healthBar.hp:SetValue(0)
|
||||
healthBar.healthText:SetText(L["LEAVE"])
|
||||
healthBar.nameText:SetText("")
|
||||
end
|
||||
|
||||
local function option(params)
|
||||
local defaults = {
|
||||
get = function(info)
|
||||
@ -283,6 +304,9 @@ local function option(params)
|
||||
if Gladdy.db.healthBarBorderSize > Gladdy.db.healthBarHeight/2 then
|
||||
Gladdy.db.healthBarBorderSize = Gladdy.db.healthBarHeight/2
|
||||
end
|
||||
for i=1,Gladdy.curBracket do
|
||||
Healthbar:Test("arena" .. i)
|
||||
end
|
||||
Gladdy:UpdateFrame()
|
||||
end,
|
||||
}
|
||||
@ -368,11 +392,21 @@ function Healthbar:GetOptions()
|
||||
order = 12,
|
||||
hasAlpha = true,
|
||||
}),
|
||||
healthBarFontSize = option({
|
||||
healthBarNameFontSize = option({
|
||||
type = "range",
|
||||
name = L["Font size"],
|
||||
desc = L["Size of the text"],
|
||||
name = L["Name font size"],
|
||||
desc = L["Size of the name text"],
|
||||
order = 13,
|
||||
step = 0.1,
|
||||
min = 0,
|
||||
max = 20,
|
||||
}),
|
||||
healthBarHealthFontSize = option({
|
||||
type = "range",
|
||||
name = L["Health font size"],
|
||||
desc = L["Size of the health text"],
|
||||
order = 14,
|
||||
step = 0.1,
|
||||
min = 0,
|
||||
max = 20,
|
||||
}),
|
||||
@ -415,14 +449,20 @@ function Healthbar:GetOptions()
|
||||
},
|
||||
healthValues = {
|
||||
type = "group",
|
||||
name = L["Health Values"],
|
||||
name = L["Health Bar Text"],
|
||||
order = 4,
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Health Values"],
|
||||
name = L["Health Bar Text"],
|
||||
order = 1,
|
||||
},
|
||||
healthName = option({
|
||||
type = "toggle",
|
||||
name = L["Show the name"],
|
||||
desc = L["Show the units name"],
|
||||
order = 30,
|
||||
}),
|
||||
healthActual = option({
|
||||
type = "toggle",
|
||||
name = L["Show the actual health"],
|
||||
|
@ -500,20 +500,25 @@ function Pets:GetOptions()
|
||||
name = L["Position"],
|
||||
order = 5,
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Position"],
|
||||
order = 1,
|
||||
},
|
||||
petXOffset = Gladdy:option({
|
||||
type = "range",
|
||||
name = L["Horizontal offset"],
|
||||
order = 22,
|
||||
min = -400,
|
||||
max = 400,
|
||||
min = -600,
|
||||
max = 600,
|
||||
step = 0.1,
|
||||
}),
|
||||
petYOffset = Gladdy:option({
|
||||
type = "range",
|
||||
name = L["Vertical offset"],
|
||||
order = 23,
|
||||
min = -400,
|
||||
max = 400,
|
||||
min = -600,
|
||||
max = 600,
|
||||
step = 0.1,
|
||||
}),
|
||||
}
|
||||
|
@ -16,6 +16,8 @@ local Powerbar = Gladdy:NewModule("Powerbar", 90, {
|
||||
powerBarFontColor = { r = 1, g = 1, b = 1, a = 1 },
|
||||
powerBarBgColor = { r = 0.3, g = 0.3, b = 0.3, a = 0.7 },
|
||||
powerBarFontSize = 10,
|
||||
powerShowSpec = true,
|
||||
powerShowRace = true,
|
||||
powerActual = true,
|
||||
powerMax = true,
|
||||
powerPercentage = false,
|
||||
@ -27,6 +29,7 @@ function Powerbar:Initialize()
|
||||
self:RegisterMessage("ENEMY_SPOTTED")
|
||||
self:RegisterMessage("UNIT_SPEC")
|
||||
self:RegisterMessage("UNIT_DEATH")
|
||||
self:RegisterMessage("UNIT_DESTROYED")
|
||||
end
|
||||
|
||||
function Powerbar:CreateFrame(unit)
|
||||
@ -185,9 +188,9 @@ function Powerbar:ENEMY_SPOTTED(unit)
|
||||
return
|
||||
end
|
||||
|
||||
local raceText = button.raceLoc
|
||||
local raceText = Gladdy.db.powerShowRace and button.raceLoc or ""
|
||||
|
||||
if (button.spec) then
|
||||
if (button.spec and Gladdy.db.powerShowSpec) then
|
||||
raceText = button.spec .. " " .. raceText
|
||||
end
|
||||
|
||||
@ -263,6 +266,15 @@ function Powerbar:UNIT_DEATH(unit)
|
||||
powerBar.powerText:SetText("0%")
|
||||
end
|
||||
|
||||
function Powerbar:UNIT_DESTROYED(unit)
|
||||
local powerBar = self.frames[unit]
|
||||
if (not powerBar) then
|
||||
return
|
||||
end
|
||||
powerBar.energy:SetValue(0)
|
||||
powerBar.powerText:SetText("0%")
|
||||
end
|
||||
|
||||
local function option(params)
|
||||
local defaults = {
|
||||
get = function(info)
|
||||
@ -272,10 +284,13 @@ local function option(params)
|
||||
set = function(info, value)
|
||||
local key = info.arg or info[#info]
|
||||
Gladdy.dbi.profile[key] = value
|
||||
Gladdy.options.args.Powerbar.args.group.args.border.arg.powerBarBorderSize.max = Gladdy.db.powerBarHeight/2
|
||||
Gladdy.options.args.Powerbar.args.group.args.border.args.powerBarBorderSize.max = Gladdy.db.powerBarHeight/2
|
||||
if Gladdy.db.powerBarBorderSize > Gladdy.db.powerBarHeight/2 then
|
||||
Gladdy.db.powerBarBorderSize = Gladdy.db.powerBarHeight/2
|
||||
end
|
||||
for i=1,Gladdy.curBracket do
|
||||
Powerbar:Test("arena" .. i)
|
||||
end
|
||||
Gladdy:UpdateFrame()
|
||||
end,
|
||||
}
|
||||
@ -366,6 +381,7 @@ function Powerbar:GetOptions()
|
||||
name = L["Font size"],
|
||||
desc = L["Size of the text"],
|
||||
order = 13,
|
||||
step = 0.1,
|
||||
min = 1,
|
||||
max = 20,
|
||||
}),
|
||||
@ -408,14 +424,26 @@ function Powerbar:GetOptions()
|
||||
},
|
||||
powerValues = {
|
||||
type = "group",
|
||||
name = L["Power Values"],
|
||||
name = L["Power Bar Text"],
|
||||
order = 4,
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Power Values"],
|
||||
name = L["Power Texts"],
|
||||
order = 1,
|
||||
},
|
||||
powerShowRace = option({
|
||||
type = "toggle",
|
||||
name = L["Show race"],
|
||||
desc = L["Show race"],
|
||||
order = 2,
|
||||
}),
|
||||
powerShowSpec= option({
|
||||
type = "toggle",
|
||||
name = L["Show spec"],
|
||||
desc = L["Show spec"],
|
||||
order = 3,
|
||||
}),
|
||||
powerActual = option({
|
||||
type = "toggle",
|
||||
name = L["Show the actual power"],
|
||||
|
392
Modules/Racial.lua
Normal file
392
Modules/Racial.lua
Normal file
@ -0,0 +1,392 @@
|
||||
local ceil, floor, string_format, tonumber = ceil, floor, string.format, tonumber
|
||||
|
||||
local CreateFrame = CreateFrame
|
||||
local GetTime = GetTime
|
||||
|
||||
|
||||
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
local L = Gladdy.L
|
||||
local Racial = Gladdy:NewModule("Racial", nil, {
|
||||
racialFont = "DorisPP",
|
||||
racialFontScale = 1,
|
||||
racialEnabled = true,
|
||||
racialSize = 60 + 20 + 1,
|
||||
racialWidthFactor = 0.9,
|
||||
racialAnchor = "trinket",
|
||||
racialPos = "RIGHT",
|
||||
racialXOffset = 0,
|
||||
racialYOffset = 0,
|
||||
racialBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
||||
racialBorderColor = { r = 0, g = 0, b = 0, a = 1 },
|
||||
racialDisableCircle = false,
|
||||
racialCooldownAlpha = 1,
|
||||
})
|
||||
|
||||
local ANCHORS = { ["LEFT"] = "RIGHT", ["RIGHT"] = "LEFT", ["BOTTOM"] = "TOP", ["TOP"] = "BOTTOM"}
|
||||
|
||||
function Racial:Initialize()
|
||||
self.frames = {}
|
||||
|
||||
self:RegisterMessage("JOINED_ARENA")
|
||||
self:RegisterMessage("ENEMY_SPOTTED")
|
||||
self:RegisterMessage("RACIAL_USED")
|
||||
end
|
||||
|
||||
local function iconTimer(self,elapsed)
|
||||
if (self.active) then
|
||||
if (self.timeLeft <= 0) then
|
||||
self.active = false
|
||||
self.cooldown:Clear()
|
||||
else
|
||||
self.timeLeft = self.timeLeft - elapsed
|
||||
end
|
||||
|
||||
local timeLeft = ceil(self.timeLeft)
|
||||
|
||||
if timeLeft >= 60 then
|
||||
-- more than 1 minute
|
||||
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")
|
||||
elseif timeLeft < 60 and timeLeft >= 21 then
|
||||
-- between 60s and 21s (green)
|
||||
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")
|
||||
elseif timeLeft < 20.9 and timeLeft >= 11 then
|
||||
-- between 20s and 11s (green)
|
||||
self.cooldownFont:SetTextColor(0, 1, 0)
|
||||
self.cooldownFont:SetText(timeLeft)
|
||||
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:SetFormattedText("%.1f", timeLeft)
|
||||
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
|
||||
-- between 5s and 1s (red)
|
||||
self.cooldownFont:SetTextColor(1, 0, 0)
|
||||
self.cooldownFont:SetFormattedText("%.1f", timeLeft >= 0.0 and timeLeft or 0.0)
|
||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), (self:GetWidth()/2 - 1) * Gladdy.db.racialFontScale, "OUTLINE")
|
||||
else
|
||||
self.cooldownFont:SetText("")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Racial:CreateFrame(unit)
|
||||
local racial = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit])
|
||||
racial.texture = racial:CreateTexture(nil, "BACKGROUND")
|
||||
racial.texture:SetAllPoints(racial)
|
||||
--racial.texture:SetTexture("Interface\\Icons\\INV_Jewelry_TrinketPVP_02")
|
||||
|
||||
racial.cooldown = CreateFrame("Cooldown", nil, racial, "CooldownFrameTemplate")
|
||||
racial.cooldown.noCooldownCount = true --Gladdy.db.racialDisableOmniCC
|
||||
racial.cooldown:SetHideCountdownNumbers(true)
|
||||
|
||||
racial.cooldownFrame = CreateFrame("Frame", nil, racial)
|
||||
racial.cooldownFrame:ClearAllPoints()
|
||||
racial.cooldownFrame:SetPoint("TOPLEFT", racial, "TOPLEFT")
|
||||
racial.cooldownFrame:SetPoint("BOTTOMRIGHT", racial, "BOTTOMRIGHT")
|
||||
|
||||
racial.cooldownFont = racial.cooldownFrame:CreateFontString(nil, "OVERLAY")
|
||||
racial.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.racialFont), 20, "OUTLINE")
|
||||
--trinket.cooldownFont:SetAllPoints(trinket.cooldown)
|
||||
racial.cooldownFont:SetJustifyH("CENTER")
|
||||
racial.cooldownFont:SetPoint("CENTER")
|
||||
|
||||
racial.borderFrame = CreateFrame("Frame", nil, racial)
|
||||
racial.borderFrame:SetAllPoints(racial)
|
||||
racial.texture.overlay = racial.borderFrame:CreateTexture(nil, "OVERLAY")
|
||||
racial.texture.overlay:SetAllPoints(racial)
|
||||
racial.texture.overlay:SetTexture(Gladdy.db.racialBorderStyle)
|
||||
|
||||
racial:SetScript("OnUpdate", iconTimer)
|
||||
|
||||
Gladdy.buttons[unit].racial = racial
|
||||
self.frames[unit] = racial
|
||||
end
|
||||
|
||||
function Racial:UpdateFrame(unit)
|
||||
local racial = self.frames[unit]
|
||||
if (not racial) then
|
||||
return
|
||||
end
|
||||
|
||||
local width, height = Gladdy.db.racialSize * Gladdy.db.racialWidthFactor, Gladdy.db.racialSize
|
||||
|
||||
racial:SetWidth(width)
|
||||
racial:SetHeight(height)
|
||||
racial.cooldown:SetWidth(width - width/16)
|
||||
racial.cooldown:SetHeight(height - height/16)
|
||||
racial.cooldown:ClearAllPoints()
|
||||
racial.cooldown:SetPoint("CENTER", racial, "CENTER")
|
||||
racial.cooldown.noCooldownCount = true -- Gladdy.db.racialDisableOmniCC
|
||||
racial.cooldown:SetAlpha(Gladdy.db.racialCooldownAlpha)
|
||||
|
||||
racial.texture:ClearAllPoints()
|
||||
racial.texture:SetAllPoints(racial)
|
||||
|
||||
racial.texture.overlay:SetTexture(Gladdy.db.racialBorderStyle)
|
||||
racial.texture.overlay:SetVertexColor(Gladdy.db.racialBorderColor.r, Gladdy.db.racialBorderColor.g, Gladdy.db.racialBorderColor.b, Gladdy.db.racialBorderColor.a)
|
||||
|
||||
racial:ClearAllPoints()
|
||||
local margin = Gladdy.db.highlightBorderSize + Gladdy.db.padding
|
||||
local parent = Gladdy.buttons[unit][Gladdy.db.racialAnchor]
|
||||
if (Gladdy.db.racialPos == "RIGHT") then
|
||||
racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.padding + Gladdy.db.racialXOffset, Gladdy.db.racialYOffset)
|
||||
elseif (Gladdy.db.racialPos == "LEFT") then
|
||||
racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, -Gladdy.db.padding + Gladdy.db.racialXOffset, Gladdy.db.racialYOffset)
|
||||
elseif (Gladdy.db.racialPos == "TOP") then
|
||||
racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.racialXOffset, Gladdy.db.padding + Gladdy.db.racialYOffset)
|
||||
elseif (Gladdy.db.racialPos == "BOTTOM") then
|
||||
racial:SetPoint(ANCHORS[Gladdy.db.racialPos], parent, Gladdy.db.racialPos, Gladdy.db.racialXOffset, -Gladdy.db.padding + Gladdy.db.racialYOffset)
|
||||
end
|
||||
|
||||
if (Gladdy.db.racialEnabled == false) then
|
||||
racial:Hide()
|
||||
else
|
||||
racial:Show()
|
||||
end
|
||||
end
|
||||
|
||||
function Racial:JOINED_ARENA()
|
||||
self:RegisterEvent("ARENA_COOLDOWNS_UPDATE")
|
||||
self:SetScript("OnEvent", function(self, event, ...)
|
||||
if self[event] then
|
||||
self[event](self, ...)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function Racial:RACIAL_USED(unit)
|
||||
local racial = self.frames[unit]
|
||||
local button = Gladdy.buttons[unit]
|
||||
if (not racial or not button or not button.race) then
|
||||
return
|
||||
end
|
||||
Racial:Used(unit, GetTime(), Gladdy:Racials()[button.race].duration)
|
||||
end
|
||||
|
||||
function Racial:Used(unit, startTime, duration)
|
||||
local racial = self.frames[unit]
|
||||
if (not racial) then
|
||||
return
|
||||
end
|
||||
if not racial.active then
|
||||
racial.timeLeft = duration
|
||||
if not Gladdy.db.trinketDisableCircle then racial.cooldown:SetCooldown(startTime, duration) end
|
||||
racial.active = true
|
||||
end
|
||||
end
|
||||
|
||||
function Racial:ENEMY_SPOTTED(unit)
|
||||
local racial = self.frames[unit]
|
||||
if (not racial) then
|
||||
return
|
||||
end
|
||||
racial.texture:SetTexture(Gladdy:Racials()[Gladdy.buttons[unit].race].texture)
|
||||
end
|
||||
|
||||
function Racial:ResetUnit(unit)
|
||||
local racial = self.frames[unit]
|
||||
if (not racial) then
|
||||
return
|
||||
end
|
||||
|
||||
racial.timeLeft = nil
|
||||
racial.active = false
|
||||
racial.cooldown:Clear()
|
||||
racial.cooldownFont:SetText("")
|
||||
end
|
||||
|
||||
function Racial:Test(unit)
|
||||
Racial:ENEMY_SPOTTED(unit)
|
||||
if (unit == "arena1" or unit == "arena3") then
|
||||
Racial:Used(unit, GetTime(), Gladdy:Racials()[Gladdy.buttons[unit].race].duration)
|
||||
end
|
||||
end
|
||||
|
||||
function Racial:GetOptions()
|
||||
return {
|
||||
headerTrinket = {
|
||||
type = "header",
|
||||
name = L["Racial"],
|
||||
order = 2,
|
||||
},
|
||||
racialEnabled = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Enabled"],
|
||||
desc = L["Enable racial icon"],
|
||||
order = 3,
|
||||
}),
|
||||
group = {
|
||||
type = "group",
|
||||
childGroups = "tree",
|
||||
name = "Frame",
|
||||
order = 4,
|
||||
args = {
|
||||
general = {
|
||||
type = "group",
|
||||
name = L["Size"],
|
||||
order = 1,
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Size"],
|
||||
order = 4,
|
||||
},
|
||||
racialSize = Gladdy:option({
|
||||
type = "range",
|
||||
name = L["Icon size"],
|
||||
min = 5,
|
||||
max = 100,
|
||||
step = 1,
|
||||
order = 4,
|
||||
}),
|
||||
racialWidthFactor = Gladdy:option({
|
||||
type = "range",
|
||||
name = L["Icon width factor"],
|
||||
min = 0.5,
|
||||
max = 2,
|
||||
step = 0.05,
|
||||
order = 6,
|
||||
}),
|
||||
},
|
||||
},
|
||||
cooldown = {
|
||||
type = "group",
|
||||
name = L["Cooldown"],
|
||||
order = 2,
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Cooldown"],
|
||||
order = 4,
|
||||
},
|
||||
racialDisableCircle = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["No Cooldown Circle"],
|
||||
order = 7,
|
||||
}),
|
||||
racialCooldownAlpha = Gladdy:option({
|
||||
type = "range",
|
||||
name = L["Cooldown circle alpha"],
|
||||
min = 0,
|
||||
max = 1,
|
||||
step = 0.1,
|
||||
order = 8,
|
||||
}),
|
||||
},
|
||||
},
|
||||
font = {
|
||||
type = "group",
|
||||
name = L["Font"],
|
||||
order = 3,
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Font"],
|
||||
order = 4,
|
||||
},
|
||||
racialFont = Gladdy:option({
|
||||
type = "select",
|
||||
name = L["Font"],
|
||||
desc = L["Font of the cooldown"],
|
||||
order = 11,
|
||||
dialogControl = "LSM30_Font",
|
||||
values = AceGUIWidgetLSMlists.font,
|
||||
}),
|
||||
racialFontScale = Gladdy:option({
|
||||
type = "range",
|
||||
name = L["Font scale"],
|
||||
desc = L["Scale of the font"],
|
||||
order = 12,
|
||||
min = 0.1,
|
||||
max = 2,
|
||||
step = 0.1,
|
||||
}),
|
||||
},
|
||||
},
|
||||
position = {
|
||||
type = "group",
|
||||
name = L["Position"],
|
||||
order = 4,
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Position"],
|
||||
order = 4,
|
||||
},
|
||||
racialAnchor = Gladdy:option({
|
||||
type = "select",
|
||||
name = L["Anchor"],
|
||||
desc = L["This changes the anchor of the racial icon"],
|
||||
order = 20,
|
||||
values = {
|
||||
["trinket"] = L["Trinket"],
|
||||
["classIcon"] = L["Class Icon"],
|
||||
["healthBar"] = L["Health Bar"],
|
||||
["powerBar"] = L["Power Bar"],
|
||||
},
|
||||
}),
|
||||
racialPos = Gladdy:option({
|
||||
type = "select",
|
||||
name = L["Position"],
|
||||
desc = L["This changes position relative to its anchor of the racial icon"],
|
||||
order = 21,
|
||||
values = {
|
||||
["LEFT"] = L["Left"],
|
||||
["RIGHT"] = L["Right"],
|
||||
["TOP"] = L["Top"],
|
||||
["BOTTOM"] = L["Bottom"],
|
||||
},
|
||||
}),
|
||||
racialXOffset = Gladdy:option({
|
||||
type = "range",
|
||||
name = L["Horizontal offset"],
|
||||
order = 23,
|
||||
min = -400,
|
||||
max = 400,
|
||||
step = 0.1,
|
||||
}),
|
||||
racialYOffset = Gladdy:option({
|
||||
type = "range",
|
||||
name = L["Vertical offset"],
|
||||
order = 24,
|
||||
min = -400,
|
||||
max = 400,
|
||||
step = 0.1,
|
||||
}),
|
||||
},
|
||||
},
|
||||
border = {
|
||||
type = "group",
|
||||
name = L["Border"],
|
||||
order = 4,
|
||||
args = {
|
||||
header = {
|
||||
type = "header",
|
||||
name = L["Border"],
|
||||
order = 4,
|
||||
},
|
||||
racialBorderStyle = Gladdy:option({
|
||||
type = "select",
|
||||
name = L["Border style"],
|
||||
order = 31,
|
||||
values = Gladdy:GetIconStyles()
|
||||
}),
|
||||
racialBorderColor = Gladdy:colorOption({
|
||||
type = "color",
|
||||
name = L["Border color"],
|
||||
desc = L["Color of the border"],
|
||||
order = 32,
|
||||
hasAlpha = true,
|
||||
}),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
end
|
@ -1,5 +1,5 @@
|
||||
local select, pairs, string_lower, tremove, tinsert, format, string_gsub, ipairs = select, pairs, string.lower, tremove, tinsert, format, string.gsub, ipairs
|
||||
local UnitExists, UnitIsUnit, UnitName = UnitExists, UnitIsUnit, UnitName
|
||||
local UnitExists, UnitIsUnit, UnitName, UnitIsEnemy = UnitExists, UnitIsUnit, UnitName, UnitIsEnemy
|
||||
local C_NamePlate = C_NamePlate
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
local L = Gladdy.L
|
||||
@ -222,6 +222,8 @@ end
|
||||
|
||||
local TotemPlates = Gladdy:NewModule("TotemPlates", nil, {
|
||||
npTotems = true,
|
||||
npTotemsShowFriendly = true,
|
||||
npTotemsShowEnemy = true,
|
||||
npTotemPlatesBorderStyle = "Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp",
|
||||
npTotemPlatesSize = 40,
|
||||
npTotemPlatesWidthFactor = 1,
|
||||
@ -303,6 +305,13 @@ end
|
||||
|
||||
function TotemPlates:NAME_PLATE_UNIT_ADDED(...)
|
||||
local unitID = ...
|
||||
local isEnemy = UnitIsEnemy("player", unitID)
|
||||
if not Gladdy.db.npTotemsShowEnemy and isEnemy then
|
||||
return
|
||||
end
|
||||
if not Gladdy.db.npTotemsShowFriendly and not isEnemy then
|
||||
return
|
||||
end
|
||||
local nameplateName = UnitName(unitID)
|
||||
local totemName = string_gsub(nameplateName, "^%s+", "") --trim
|
||||
totemName = string_gsub(totemName, "%s+$", "") --trim
|
||||
@ -414,6 +423,21 @@ function TotemPlates:GetOptions()
|
||||
name = L["Totem icons on/off"],
|
||||
desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"],
|
||||
order = 3,
|
||||
width = 0.9,
|
||||
}),
|
||||
npTotemsShowFriendly = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Show friendly"],
|
||||
desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"],
|
||||
order = 4,
|
||||
width = 0.65,
|
||||
}),
|
||||
npTotemsShowEnemy = Gladdy:option({
|
||||
type = "toggle",
|
||||
name = L["Show enemy"],
|
||||
desc = L["Turns totem icons instead of nameplates on or off. (Requires reload)"],
|
||||
order = 5,
|
||||
width = 0.6,
|
||||
}),
|
||||
group = {
|
||||
type = "group",
|
||||
|
@ -1,4 +1,5 @@
|
||||
local ceil, floor, string_format, tonumber = ceil, floor, string.format, tonumber
|
||||
local C_PvP = C_PvP
|
||||
|
||||
local CreateFrame = CreateFrame
|
||||
local GetTime = GetTime
|
||||
@ -25,6 +26,49 @@ function Trinket:Initialize()
|
||||
self:RegisterMessage("JOINED_ARENA")
|
||||
end
|
||||
|
||||
local function iconTimer(self, elapsed)
|
||||
if (self.active) then
|
||||
if (self.timeLeft <= 0) then
|
||||
self.active = false
|
||||
self.cooldown:Clear()
|
||||
Gladdy:SendMessage("TRINKET_READY", self.unit)
|
||||
else
|
||||
self.timeLeft = self.timeLeft - elapsed
|
||||
end
|
||||
|
||||
local timeLeft = ceil(self.timeLeft)
|
||||
|
||||
if timeLeft >= 60 then
|
||||
-- more than 1 minute
|
||||
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")
|
||||
elseif timeLeft < 60 and timeLeft >= 21 then
|
||||
-- between 60s and 21s (green)
|
||||
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")
|
||||
elseif timeLeft < 20.9 and timeLeft >= 11 then
|
||||
-- between 20s and 11s (green)
|
||||
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")
|
||||
elseif timeLeft <= 10 and timeLeft >= 5 then
|
||||
-- between 10s and 5s (orange)
|
||||
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
||||
self.cooldownFont:SetFormattedText("%.1f", timeLeft)
|
||||
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
|
||||
-- between 5s and 1s (red)
|
||||
self.cooldownFont:SetTextColor(1, 0, 0)
|
||||
self.cooldownFont:SetFormattedText("%.1f", timeLeft >= 0.0 and timeLeft or 0.0)
|
||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (self:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||
else
|
||||
self.cooldownFont:SetText("")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function Trinket:CreateFrame(unit)
|
||||
local trinket = CreateFrame("Button", "GladdyTrinketButton" .. unit, Gladdy.buttons[unit])
|
||||
trinket.texture = trinket:CreateTexture(nil, "BACKGROUND")
|
||||
@ -52,55 +96,12 @@ function Trinket:CreateFrame(unit)
|
||||
trinket.texture.overlay:SetAllPoints(trinket)
|
||||
trinket.texture.overlay:SetTexture(Gladdy.db.trinketBorderStyle)
|
||||
|
||||
local function formatTimer(num, numDecimalPlaces)
|
||||
return tonumber(string_format("%." .. (numDecimalPlaces or 0) .. "f", num))
|
||||
end
|
||||
trinket.unit = unit
|
||||
|
||||
trinket:SetScript("OnUpdate", function(self, elapsed)
|
||||
if (self.active) then
|
||||
if (self.timeLeft <= 0) then
|
||||
self.active = false
|
||||
self.cooldown:Clear()
|
||||
Gladdy:SendMessage("TRINKET_READY", unit)
|
||||
else
|
||||
self.timeLeft = self.timeLeft - elapsed
|
||||
end
|
||||
|
||||
local timeLeft = ceil(self.timeLeft)
|
||||
local timeLeftMilliSec = formatTimer(self.timeLeft, 1)
|
||||
|
||||
if timeLeft >= 60 then
|
||||
-- more than 1 minute
|
||||
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), (trinket:GetWidth()/2 - 0.15*trinket:GetWidth()) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||
elseif timeLeft < 60 and timeLeft >= 21 then
|
||||
-- between 60s and 21s (green)
|
||||
self.cooldownFont:SetTextColor(0.7, 1, 0)
|
||||
self.cooldownFont:SetText(timeLeft)
|
||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (trinket:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||
elseif timeLeft < 20.9 and timeLeft >= 11 then
|
||||
-- between 20s and 11s (green)
|
||||
self.cooldownFont:SetTextColor(0, 1, 0)
|
||||
self.cooldownFont:SetText(timeLeft)
|
||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (trinket:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||
elseif timeLeftMilliSec <= 10 and timeLeftMilliSec >= 5 then
|
||||
-- between 10s and 5s (orange)
|
||||
self.cooldownFont:SetTextColor(1, 0.7, 0)
|
||||
self.cooldownFont:SetFormattedText("%.1f", timeLeftMilliSec)
|
||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (trinket:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||
elseif timeLeftMilliSec < 5 and timeLeftMilliSec > 0 then
|
||||
-- between 5s and 1s (red)
|
||||
self.cooldownFont:SetTextColor(1, 0, 0)
|
||||
self.cooldownFont:SetFormattedText("%.1f", timeLeftMilliSec)
|
||||
self.cooldownFont:SetFont(Gladdy.LSM:Fetch("font", Gladdy.db.trinketFont), (trinket:GetWidth()/2 - 1) * Gladdy.db.trinketFontScale, "OUTLINE")
|
||||
else
|
||||
self.cooldownFont:SetText("")
|
||||
end
|
||||
end
|
||||
end)
|
||||
trinket:SetScript("OnUpdate", iconTimer)
|
||||
|
||||
self.frames[unit] = trinket
|
||||
Gladdy.buttons[unit].trinket = trinket
|
||||
end
|
||||
|
||||
function Trinket:UpdateFrame(unit)
|
||||
|
@ -1,3 +1,5 @@
|
||||
local str_match, tonumber, tostring = string.match, tonumber, tostring
|
||||
|
||||
local UnitName = UnitName
|
||||
|
||||
local Gladdy = LibStub("Gladdy")
|
||||
@ -24,19 +26,20 @@ end
|
||||
function VersionCheck:Test(unit)
|
||||
if unit == "arena1" then
|
||||
self:RegisterComm("GladdyVCheck", VersionCheck.OnCommReceived)
|
||||
self:SendCommMessage("GladdyVCheck", Gladdy.version, "RAID", self.playerName)
|
||||
self:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "RAID", self.playerName)
|
||||
end
|
||||
end
|
||||
|
||||
function VersionCheck.OnCommReceived(prefix, message, distribution, sender)
|
||||
if sender ~= VersionCheck.playerName then
|
||||
local addonVersion = Gladdy.version
|
||||
if (message == addonVersion) then
|
||||
local addonVersion = Gladdy.version_num
|
||||
message = tonumber(message)
|
||||
if message and message <= Gladdy.version_num then
|
||||
--Gladdy:Print("Version", "\"".. addonVersion.."\"", "is up to date")
|
||||
else
|
||||
Gladdy:Warn("Current version", "\"".. addonVersion.."\"", "is outdated. Most recent version is", "\"".. message.."\"")
|
||||
Gladdy:Warn("Please download the latest Gladdy version at:")
|
||||
Gladdy:Warn("https://github.com/XiconQoo/Gladdy")
|
||||
Gladdy:Warn("https://github.com/XiconQoo/Gladdy-TBC")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
local type, pairs, tinsert, tsort = type, pairs, table.insert, table.sort
|
||||
local type, pairs, tinsert, tsort, tostring = type, pairs, table.insert, table.sort, tostring
|
||||
|
||||
local InterfaceOptionsFrame_OpenToFrame = InterfaceOptionsFrame_OpenToFrame
|
||||
local GetSpellInfo = GetSpellInfo
|
||||
@ -699,7 +699,7 @@ function Gladdy:GetAuras(auraType)
|
||||
if classSpells[i].texture then
|
||||
texture = classSpells[i].texture
|
||||
end
|
||||
args[classSpells[i].name] = {
|
||||
args[tostring(classSpells[i].id[1])] = {
|
||||
order = i,
|
||||
name = classSpells[i].name,
|
||||
type = "toggle",
|
||||
@ -707,7 +707,7 @@ function Gladdy:GetAuras(auraType)
|
||||
width = "2",
|
||||
arg = classSpells[i].name
|
||||
}
|
||||
defaultDebuffs[classSpells[i].name] = true
|
||||
defaultDebuffs[tostring(classSpells[i].id[1])] = true
|
||||
end
|
||||
return args
|
||||
end
|
||||
|
16
README.md
16
README.md
@ -1,7 +1,7 @@
|
||||
# Gladdy - TBC
|
||||
|
||||
### The most powerful arena addon for WoW TBC 2.5.1
|
||||
## [v1.0.4-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.0.4-Beta/Gladdy_TBC-Classic_v1.0.4-Beta.zip)
|
||||
## [v1.0.5-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.0.5-Beta/Gladdy_TBC-Classic_v1.0.5-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
|
||||
|
||||
@ -35,6 +35,20 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca
|
||||
|
||||
### Changes
|
||||
|
||||
#### v1.0.5-Beta
|
||||
- fixed Aura-Module
|
||||
- Racial module added to EventListener and Version check updated
|
||||
- constants for auras/cooldowns/racials updated
|
||||
- anchoring for modules rewritten
|
||||
- fix Aura module options (localization independent for profile export)
|
||||
- Power-/HealthBar customize texts added and UNIT_DESTROYED added
|
||||
- Racial module added and trinket modified
|
||||
- XiconProfiles import strings
|
||||
- Pets position extended
|
||||
- delete unused saved variables
|
||||
- ExportImport, VersionCheck & XiconProfiles fix
|
||||
- TotemPlates add option to show friendly/enemy icons
|
||||
|
||||
#### v1.0.4-Beta
|
||||
- XiconProfiles fixed
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user