Compare commits
No commits in common. "main" and "v1.06-Beta" have entirely different histories.
main
...
v1.06-Beta
3
.gitignore
vendored
3
.gitignore
vendored
@ -6,6 +6,3 @@ BuffLib
|
|||||||
Ace-Libs
|
Ace-Libs
|
||||||
Images_Raw
|
Images_Raw
|
||||||
Gladdy_old
|
Gladdy_old
|
||||||
DoNotCommit
|
|
||||||
untracked
|
|
||||||
Gladdy_TW
|
|
57
Bindings.xml
57
Bindings.xml
@ -1,31 +1,38 @@
|
|||||||
<Bindings>
|
<Bindings>
|
||||||
<Binding name="GLADDYBUTTON1_LEFT" header="GLADDY" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON1_LEFT" header="GLADDY" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON2_LEFT" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON2_LEFT" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON3_LEFT" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON3_LEFT" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON4_LEFT" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON4_LEFT" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON5_LEFT" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON5_LEFT" category="ADDONS"/>
|
||||||
|
|
||||||
<Binding name="GLADDYBUTTON1_RIGHT" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON1_RIGHT" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON2_RIGHT" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON2_RIGHT" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON3_RIGHT" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON3_RIGHT" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON4_RIGHT" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON4_RIGHT" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON5_RIGHT" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON5_RIGHT" category="ADDONS"/>
|
||||||
|
|
||||||
<Binding name="GLADDYBUTTON1_MIDDLE" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON1_MIDDLE" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON2_MIDDLE" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON2_MIDDLE" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON3_MIDDLE" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON3_MIDDLE" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON4_MIDDLE" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON4_MIDDLE" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON5_MIDDLE" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON5_MIDDLE" category="ADDONS"/>
|
||||||
|
|
||||||
<Binding name="GLADDYBUTTON1_BUTTON4" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON1_BUTTON4" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON2_BUTTON4" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON2_BUTTON4" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON3_BUTTON4" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON3_BUTTON4" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON4_BUTTON4" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON4_BUTTON4" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON5_BUTTON4" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON5_BUTTON4" category="ADDONS"/>
|
||||||
|
|
||||||
<Binding name="GLADDYBUTTON1_BUTTON5" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON1_BUTTON5" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON2_BUTTON5" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON2_BUTTON5" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON3_BUTTON5" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON3_BUTTON5" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON4_BUTTON5" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON4_BUTTON5" category="ADDONS"/>
|
||||||
<Binding name="GLADDYBUTTON5_BUTTON5" Category="Gladdy"/>
|
<Binding name="GLADDYBUTTON5_BUTTON5" category="ADDONS"/>
|
||||||
|
|
||||||
|
|
||||||
|
<Binding header="GLADDYTRINKET" name="GLADDYTRINKET1" category="ADDONS"/>
|
||||||
|
<Binding name="GLADDYTRINKET2" category="ADDONS"/>
|
||||||
|
<Binding name="GLADDYTRINKET3" category="ADDONS"/>
|
||||||
|
<Binding name="GLADDYTRINKET4" category="ADDONS"/>
|
||||||
|
<Binding name="GLADDYTRINKET5" category="ADDONS"/>
|
||||||
</Bindings>
|
</Bindings>
|
899
Constants.lua
Normal file
899
Constants.lua
Normal file
@ -0,0 +1,899 @@
|
|||||||
|
local tbl_sort, select = table.sort, select
|
||||||
|
|
||||||
|
local GetSpellInfo = GetSpellInfo
|
||||||
|
|
||||||
|
local Gladdy = LibStub("Gladdy")
|
||||||
|
local L = Gladdy.L
|
||||||
|
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||||
|
|
||||||
|
function Gladdy:GetSpecBuffs()
|
||||||
|
return {
|
||||||
|
-- DRUID
|
||||||
|
[GetSpellInfo(45283)] = L["Restoration"], -- Natural Perfection
|
||||||
|
[GetSpellInfo(16880)] = L["Restoration"], -- Nature's Grace; Dreamstate spec in TBC equals Restoration
|
||||||
|
[GetSpellInfo(24858)] = L["Restoration"], -- Moonkin Form; Dreamstate spec in TBC equals Restoration
|
||||||
|
[GetSpellInfo(17007)] = L["Feral"], -- Leader of the Pack
|
||||||
|
[GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness
|
||||||
|
|
||||||
|
-- HUNTER
|
||||||
|
[GetSpellInfo(34692)] = L["Beast Mastery"], -- The Beast Within
|
||||||
|
[GetSpellInfo(20895)] = L["Beast Mastery"], -- Spirit Bond
|
||||||
|
[GetSpellInfo(34455)] = L["Beast Mastery"], -- Ferocious Inspiration
|
||||||
|
[GetSpellInfo(27066)] = L["Marksmanship"], -- Trueshot Aura
|
||||||
|
|
||||||
|
-- MAGE
|
||||||
|
[GetSpellInfo(33405)] = L["Frost"], -- Ice Barrier
|
||||||
|
[GetSpellInfo(11129)] = L["Fire"], -- Combustion
|
||||||
|
[GetSpellInfo(12042)] = L["Arcane"], -- Arcane Power
|
||||||
|
[GetSpellInfo(12043)] = L["Arcane"], -- Presence of Mind
|
||||||
|
[GetSpellInfo(12472)] = L["Frost"], -- Icy Veins
|
||||||
|
|
||||||
|
-- PALADIN
|
||||||
|
[GetSpellInfo(31836)] = L["Holy"], -- Light's Grace
|
||||||
|
[GetSpellInfo(31842)] = L["Holy"], -- Divine Illumination
|
||||||
|
[GetSpellInfo(20216)] = L["Holy"], -- Divine Favor
|
||||||
|
[GetSpellInfo(20375)] = L["Retribution"], -- Seal of Command
|
||||||
|
[GetSpellInfo(20049)] = L["Retribution"], -- Vengeance
|
||||||
|
[GetSpellInfo(20218)] = L["Retribution"], -- Sanctity Aura
|
||||||
|
|
||||||
|
-- PRIEST
|
||||||
|
[GetSpellInfo(15473)] = L["Shadow"], -- Shadowform
|
||||||
|
[GetSpellInfo(45234)] = L["Discipline"], -- Focused Will
|
||||||
|
[GetSpellInfo(27811)] = L["Discipline"], -- Blessed Recovery
|
||||||
|
[GetSpellInfo(33142)] = L["Holy"], -- Blessed Resilience
|
||||||
|
[GetSpellInfo(14752)] = L["Discipline"], -- Divine Spirit
|
||||||
|
[GetSpellInfo(27681)] = L["Discipline"], -- Prayer of Spirit
|
||||||
|
[GetSpellInfo(10060)] = L["Discipline"], -- Power Infusion
|
||||||
|
[GetSpellInfo(33206)] = L["Discipline"], -- Pain Suppression
|
||||||
|
[GetSpellInfo(14893)] = L["Discipline"], -- Inspiration
|
||||||
|
|
||||||
|
-- ROGUE
|
||||||
|
[GetSpellInfo(36554)] = L["Subtlety"], -- Shadowstep
|
||||||
|
[GetSpellInfo(44373)] = L["Subtlety"], -- Shadowstep Speed
|
||||||
|
[GetSpellInfo(36563)] = L["Subtlety"], -- Shadowstep DMG
|
||||||
|
[GetSpellInfo(14278)] = L["Subtlety"], -- Ghostly Strike
|
||||||
|
[GetSpellInfo(31233)] = L["Assassination"], -- Find Weakness
|
||||||
|
|
||||||
|
--Shaman
|
||||||
|
[GetSpellInfo(16190)] = L["Restoration"], -- Mana Tide Totem
|
||||||
|
[GetSpellInfo(32594)] = L["Restoration"], -- Earth Shield
|
||||||
|
[GetSpellInfo(30823)] = L["Enhancement"], -- Shamanistic Rage
|
||||||
|
|
||||||
|
-- WARLOCK
|
||||||
|
[GetSpellInfo(19028)] = L["Demonology"], -- Soul Link
|
||||||
|
[GetSpellInfo(23759)] = L["Demonology"], -- Master Demonologist
|
||||||
|
[GetSpellInfo(30302)] = L["Destruction"], -- Nether Protection
|
||||||
|
[GetSpellInfo(34935)] = L["Destruction"], -- Backlash
|
||||||
|
|
||||||
|
-- WARRIOR
|
||||||
|
[GetSpellInfo(29838)] = L["Arms"], -- Second Wind
|
||||||
|
[GetSpellInfo(12292)] = L["Arms"], -- Death Wish
|
||||||
|
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function Gladdy:GetSpecSpells()
|
||||||
|
return {
|
||||||
|
-- DRUID
|
||||||
|
[GetSpellInfo(33831)] = L["Balance"], -- Force of Nature
|
||||||
|
[GetSpellInfo(33983)] = L["Feral"], -- Mangle (Cat)
|
||||||
|
[GetSpellInfo(33987)] = L["Feral"], -- Mangle (Bear)
|
||||||
|
[GetSpellInfo(18562)] = L["Restoration"], -- Swiftmend
|
||||||
|
[GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness
|
||||||
|
|
||||||
|
-- HUNTER
|
||||||
|
[GetSpellInfo(19577)] = L["Beast Mastery"], -- Intimidation
|
||||||
|
[GetSpellInfo(34490)] = L["Marksmanship"], -- Silencing Shot
|
||||||
|
[GetSpellInfo(27068)] = L["Survival"], -- Wyvern Sting
|
||||||
|
[GetSpellInfo(19306)] = L["Survival"], -- Counterattack
|
||||||
|
[GetSpellInfo(27066)] = L["Marksmanship"], -- Trueshot Aura
|
||||||
|
|
||||||
|
-- MAGE
|
||||||
|
[GetSpellInfo(12042)] = L["Arcane"], -- Arcane Power
|
||||||
|
[GetSpellInfo(33043)] = L["Fire"], -- Dragon's Breath
|
||||||
|
[GetSpellInfo(33933)] = L["Fire"], -- Blast Wave
|
||||||
|
[GetSpellInfo(33405)] = L["Frost"], -- Ice Barrier
|
||||||
|
[GetSpellInfo(31687)] = L["Frost"], -- Summon Water Elemental
|
||||||
|
[GetSpellInfo(12472)] = L["Frost"], -- Icy Veins
|
||||||
|
[GetSpellInfo(11958)] = L["Frost"], -- Cold Snap
|
||||||
|
|
||||||
|
-- PALADIN
|
||||||
|
[GetSpellInfo(33072)] = L["Holy"], -- Holy Shock
|
||||||
|
[GetSpellInfo(20216)] = L["Holy"], -- Divine Favor
|
||||||
|
[GetSpellInfo(31842)] = L["Holy"], -- Divine Illumination
|
||||||
|
[GetSpellInfo(32700)] = L["Protection"], -- Avenger's Shield
|
||||||
|
[GetSpellInfo(27170)] = L["Retribution"], -- Seal of Command
|
||||||
|
[GetSpellInfo(35395)] = L["Retribution"], -- Crusader Strike
|
||||||
|
[GetSpellInfo(20066)] = L["Retribution"], -- Repentance
|
||||||
|
[GetSpellInfo(20218)] = L["Retribution"], -- Sanctity Aura
|
||||||
|
|
||||||
|
-- PRIEST
|
||||||
|
[GetSpellInfo(10060)] = L["Discipline"], -- Power Infusion
|
||||||
|
[GetSpellInfo(33206)] = L["Discipline"], -- Pain Suppression
|
||||||
|
[GetSpellInfo(14752)] = L["Discipline"], -- Divine Spirit
|
||||||
|
[GetSpellInfo(33143)] = L["Holy"], -- Blessed Resilience
|
||||||
|
[GetSpellInfo(34861)] = L["Holy"], -- Circle of Healing
|
||||||
|
[GetSpellInfo(15473)] = L["Shadow"], -- Shadowform
|
||||||
|
[GetSpellInfo(34917)] = L["Shadow"], -- Vampiric Touch
|
||||||
|
|
||||||
|
-- ROGUE
|
||||||
|
[GetSpellInfo(34413)] = L["Assassination"], -- Mutilate
|
||||||
|
[GetSpellInfo(14177)] = L["Assassination"], -- Cold Blood
|
||||||
|
[GetSpellInfo(13750)] = L["Combat"], -- Adrenaline Rush
|
||||||
|
[GetSpellInfo(14185)] = L["Subtlety"], -- Preparation
|
||||||
|
[GetSpellInfo(16511)] = L["Subtlety"], -- Hemorrhage
|
||||||
|
[GetSpellInfo(36554)] = L["Subtlety"], -- Shadowstep
|
||||||
|
[GetSpellInfo(14278)] = L["Subtlety"], -- Ghostly Strike
|
||||||
|
[GetSpellInfo(14183)] = L["Subtlety"], -- Premeditation
|
||||||
|
|
||||||
|
-- SHAMAN
|
||||||
|
[GetSpellInfo(16166)] = L["Elemental"], -- Elemental Mastery
|
||||||
|
[GetSpellInfo(30823)] = L["Enhancement"], -- Shamanistic Rage
|
||||||
|
[GetSpellInfo(17364)] = L["Enhancement"], -- Stormstrike
|
||||||
|
[GetSpellInfo(16190)] = L["Restoration"], -- Mana Tide Totem
|
||||||
|
[GetSpellInfo(32594)] = L["Restoration"], -- Earth Shield
|
||||||
|
--[GetSpellInfo(16188)] = L["Restoration"], -- Nature's Swiftness
|
||||||
|
|
||||||
|
-- WARLOCK
|
||||||
|
[GetSpellInfo(30405)] = L["Affliction"], -- Unstable Affliction
|
||||||
|
--[GetSpellInfo(30911)] = L["Affliction"], -- Siphon Life
|
||||||
|
[GetSpellInfo(30414)] = L["Destruction"], -- Shadowfury
|
||||||
|
|
||||||
|
-- WARRIOR
|
||||||
|
[GetSpellInfo(30330)] = L["Arms"], -- Mortal Strike
|
||||||
|
[GetSpellInfo(12292)] = L["Arms"], -- Death Wish
|
||||||
|
[GetSpellInfo(30335)] = L["Fury"], -- Bloodthirst
|
||||||
|
[GetSpellInfo(12809)] = L["Protection"], -- Concussion Blow
|
||||||
|
[GetSpellInfo(30022)] = L["Protection"], -- Devastation
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function Gladdy:GetImportantAuras()
|
||||||
|
return {
|
||||||
|
-- Cyclone
|
||||||
|
[GetSpellInfo(33786)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 6,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 33786,
|
||||||
|
},
|
||||||
|
-- Hibernate
|
||||||
|
[GetSpellInfo(18658)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 40,
|
||||||
|
magic = true,
|
||||||
|
spellID = 18658,
|
||||||
|
},
|
||||||
|
-- Entangling Roots
|
||||||
|
[GetSpellInfo(26989)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 30,
|
||||||
|
onDamage = true,
|
||||||
|
magic = true,
|
||||||
|
root = true,
|
||||||
|
spellID = 26989,
|
||||||
|
},
|
||||||
|
-- Feral Charge
|
||||||
|
[GetSpellInfo(16979)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 4,
|
||||||
|
priority = 30,
|
||||||
|
root = true,
|
||||||
|
spellID = 16979,
|
||||||
|
},
|
||||||
|
-- Bash
|
||||||
|
[GetSpellInfo(8983)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 4,
|
||||||
|
priority = 30,
|
||||||
|
spellID = 8983,
|
||||||
|
},
|
||||||
|
-- Pounce
|
||||||
|
[GetSpellInfo(9005)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 3,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 9005,
|
||||||
|
},
|
||||||
|
-- Maim
|
||||||
|
[GetSpellInfo(22570)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 6,
|
||||||
|
priority = 40,
|
||||||
|
incapacite = true,
|
||||||
|
spellID = 22570,
|
||||||
|
},
|
||||||
|
-- Innervate
|
||||||
|
[GetSpellInfo(29166)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 20,
|
||||||
|
priority = 10,
|
||||||
|
spellID = 29166,
|
||||||
|
},
|
||||||
|
-- Imp Starfire Stun
|
||||||
|
[GetSpellInfo(16922)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 3,
|
||||||
|
priority = 40,
|
||||||
|
spellSchool = "physical",
|
||||||
|
spellID = 16922,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
-- Freezing Trap Effect
|
||||||
|
[GetSpellInfo(14309)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
magic = true,
|
||||||
|
spellID = 14309,
|
||||||
|
},
|
||||||
|
-- Wyvern Sting
|
||||||
|
[GetSpellInfo(19386)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
poison = true,
|
||||||
|
sleep = true,
|
||||||
|
spellID = 19386,
|
||||||
|
},
|
||||||
|
-- Scatter Shot
|
||||||
|
[GetSpellInfo(19503)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 4,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
spellID = 19503,
|
||||||
|
},
|
||||||
|
-- Silencing Shot
|
||||||
|
[GetSpellInfo(34490)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 3,
|
||||||
|
priority = 15,
|
||||||
|
magic = true,
|
||||||
|
spellID = 34490,
|
||||||
|
},
|
||||||
|
-- Intimidation
|
||||||
|
[GetSpellInfo(19577)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 2,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 19577,
|
||||||
|
},
|
||||||
|
-- The Beast Within
|
||||||
|
[GetSpellInfo(34692)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 18,
|
||||||
|
priority = 20,
|
||||||
|
spellID = 34692,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
-- Polymorph
|
||||||
|
[GetSpellInfo(12826)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
magic = true,
|
||||||
|
spellID = 12826,
|
||||||
|
},
|
||||||
|
-- Dragon's Breath
|
||||||
|
[GetSpellInfo(31661)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 3,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
magic = true,
|
||||||
|
spellID = 31661,
|
||||||
|
},
|
||||||
|
-- Frost Nova
|
||||||
|
[GetSpellInfo(27088)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 8,
|
||||||
|
priority = 30,
|
||||||
|
onDamage = true,
|
||||||
|
magic = true,
|
||||||
|
root = true,
|
||||||
|
spellID = 27088,
|
||||||
|
},
|
||||||
|
-- Freeze (Water Elemental)
|
||||||
|
[GetSpellInfo(33395)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 8,
|
||||||
|
priority = 30,
|
||||||
|
onDamage = true,
|
||||||
|
magic = true,
|
||||||
|
root = true,
|
||||||
|
spellID = 33395,
|
||||||
|
},
|
||||||
|
-- Counterspell - Silence
|
||||||
|
[GetSpellInfo(18469)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 4,
|
||||||
|
priority = 15,
|
||||||
|
magic = true,
|
||||||
|
spellID = 18469,
|
||||||
|
},
|
||||||
|
-- Ice Block
|
||||||
|
[GetSpellInfo(45438)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 20,
|
||||||
|
spellID = 45438,
|
||||||
|
},
|
||||||
|
-- Impact
|
||||||
|
[GetSpellInfo(12355)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 2,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 12355,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Hammer of Justice
|
||||||
|
[GetSpellInfo(10308)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 6,
|
||||||
|
priority = 40,
|
||||||
|
magic = true,
|
||||||
|
spellID = 10308,
|
||||||
|
},
|
||||||
|
-- Repentance
|
||||||
|
[GetSpellInfo(20066)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 6,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
magic = true,
|
||||||
|
incapacite = true,
|
||||||
|
spellID = 20066,
|
||||||
|
},
|
||||||
|
-- Blessing of Protection
|
||||||
|
[GetSpellInfo(10278)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 10,
|
||||||
|
spellID = 10278,
|
||||||
|
},
|
||||||
|
-- Blessing of Freedom
|
||||||
|
[GetSpellInfo(1044)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 14,
|
||||||
|
priority = 10,
|
||||||
|
spellID = 1044,
|
||||||
|
},
|
||||||
|
-- Divine Shield
|
||||||
|
[GetSpellInfo(642)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 12,
|
||||||
|
priority = 20,
|
||||||
|
spellID = 642,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
-- Psychic Scream
|
||||||
|
[GetSpellInfo(8122)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 8,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
fear = true,
|
||||||
|
magic = true,
|
||||||
|
spellID = 8122,
|
||||||
|
},
|
||||||
|
-- Chastise
|
||||||
|
[GetSpellInfo(44047)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 8,
|
||||||
|
priority = 30,
|
||||||
|
root = true,
|
||||||
|
spellID = 44047,
|
||||||
|
},
|
||||||
|
-- Mind Control
|
||||||
|
[GetSpellInfo(605)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 40,
|
||||||
|
magic = true,
|
||||||
|
spellID = 605,
|
||||||
|
},
|
||||||
|
-- Silence
|
||||||
|
[GetSpellInfo(15487)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 5,
|
||||||
|
priority = 15,
|
||||||
|
magic = true,
|
||||||
|
spellID = 15487,
|
||||||
|
},
|
||||||
|
-- Pain Suppression
|
||||||
|
[GetSpellInfo(33206)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 8,
|
||||||
|
priority = 10,
|
||||||
|
spellID = 33206,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
-- Sap
|
||||||
|
[GetSpellInfo(6770)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
incapacite = true,
|
||||||
|
spellID = 6770,
|
||||||
|
},
|
||||||
|
-- Blind
|
||||||
|
[GetSpellInfo(2094)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
spellID = 2094,
|
||||||
|
},
|
||||||
|
-- Cheap Shot
|
||||||
|
[GetSpellInfo(1833)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 4,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 1833,
|
||||||
|
},
|
||||||
|
-- Kidney Shot
|
||||||
|
[GetSpellInfo(8643)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 6,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 8643,
|
||||||
|
},
|
||||||
|
-- Gouge
|
||||||
|
[GetSpellInfo(1776)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 4,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
incapacite = true,
|
||||||
|
spellID = 1776,
|
||||||
|
},
|
||||||
|
-- Kick - Silence
|
||||||
|
[GetSpellInfo(18425)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 2,
|
||||||
|
priority = 15,
|
||||||
|
spellID = 18425,
|
||||||
|
},
|
||||||
|
-- Garrote - Silence
|
||||||
|
[GetSpellInfo(1330)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 3,
|
||||||
|
priority = 15,
|
||||||
|
spellID = 1330,
|
||||||
|
},
|
||||||
|
-- Cloak of Shadows
|
||||||
|
[GetSpellInfo(31224)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 5,
|
||||||
|
priority = 20,
|
||||||
|
spellID = 31224,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
-- Fear
|
||||||
|
[GetSpellInfo(5782)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
fear = true,
|
||||||
|
magic = true,
|
||||||
|
spellID = 5782,
|
||||||
|
},
|
||||||
|
-- Death Coil
|
||||||
|
[GetSpellInfo(27223)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 3,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 27223,
|
||||||
|
},
|
||||||
|
-- Shadowfury
|
||||||
|
[GetSpellInfo(30283)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 2,
|
||||||
|
priority = 40,
|
||||||
|
magic = true,
|
||||||
|
spellID = 30283,
|
||||||
|
},
|
||||||
|
-- Seduction (Succubus)
|
||||||
|
[GetSpellInfo(6358)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 10,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
fear = true,
|
||||||
|
magic = true,
|
||||||
|
spellID = 6358,
|
||||||
|
},
|
||||||
|
-- Howl of Terror
|
||||||
|
[GetSpellInfo(5484)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 8,
|
||||||
|
priority = 40,
|
||||||
|
onDamage = true,
|
||||||
|
fear = true,
|
||||||
|
magic = true,
|
||||||
|
spellID = 5484,
|
||||||
|
texture = select(3, GetSpellInfo(5484))
|
||||||
|
},
|
||||||
|
-- Spell Lock (Felhunter)
|
||||||
|
[GetSpellInfo(24259)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 3,
|
||||||
|
priority = 15,
|
||||||
|
magic = true,
|
||||||
|
spellID = 24259,
|
||||||
|
},
|
||||||
|
-- Unstable Affliction Silence
|
||||||
|
["Unstable Affliction Silence"] = { -- GetSpellInfo returns "Unstable Affliction"
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 5,
|
||||||
|
priority = 15,
|
||||||
|
magic = true,
|
||||||
|
spellID = 31117,
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
-- Intimidating Shout
|
||||||
|
[GetSpellInfo(5246)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 8,
|
||||||
|
priority = 15,
|
||||||
|
onDamage = true,
|
||||||
|
fear = true,
|
||||||
|
spellID = 5246,
|
||||||
|
},
|
||||||
|
-- Concussion Blow
|
||||||
|
[GetSpellInfo(12809)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 5,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 12809,
|
||||||
|
},
|
||||||
|
-- Intercept Stun
|
||||||
|
[GetSpellInfo(25274)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 3,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 25274,
|
||||||
|
},
|
||||||
|
-- Spell Reflection
|
||||||
|
[GetSpellInfo(23920)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 5,
|
||||||
|
priority = 50,
|
||||||
|
spellID = 23920,
|
||||||
|
},
|
||||||
|
-- Shield Bash - Silenced
|
||||||
|
[GetSpellInfo(18498)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 3,
|
||||||
|
priority = 15,
|
||||||
|
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)] = {
|
||||||
|
track = AURA_TYPE_BUFF,
|
||||||
|
duration = 0,
|
||||||
|
priority = 20,
|
||||||
|
spellID = 8178
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
-- War Stomp
|
||||||
|
[GetSpellInfo(20549)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 2,
|
||||||
|
priority = 40,
|
||||||
|
spellID = 20549,
|
||||||
|
},
|
||||||
|
-- Arcane Torrent
|
||||||
|
[GetSpellInfo(28730)] = {
|
||||||
|
track = AURA_TYPE_DEBUFF,
|
||||||
|
duration = 2,
|
||||||
|
priority = 15,
|
||||||
|
magic = true,
|
||||||
|
spellID = 28730,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
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
|
1175
Constants_BCC.lua
1175
Constants_BCC.lua
File diff suppressed because it is too large
Load Diff
1125
Constants_Wrath.lua
1125
Constants_Wrath.lua
File diff suppressed because it is too large
Load Diff
@ -1,641 +0,0 @@
|
|||||||
local tbl_sort, select, string_lower = table.sort, select, string.lower
|
|
||||||
local GetLocale = GetLocale
|
|
||||||
local GetSpellInfo = GetSpellInfo
|
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
|
||||||
local L = Gladdy.L
|
|
||||||
|
|
||||||
Gladdy.RACES = {"Scourge", "BloodElf", "Tauren", "Orc", "Troll", "NightElf", "Draenei", "Human", "Gnome", "Dwarf"}
|
|
||||||
tbl_sort(Gladdy.RACES)
|
|
||||||
|
|
||||||
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 arenaTimer = {
|
|
||||||
["default"] = {
|
|
||||||
[60] = "One minute until the Arena battle begins!",
|
|
||||||
[30] = "Thirty seconds until the Arena battle begins!",
|
|
||||||
[15] = "Fifteen seconds until the Arena battle begins!",
|
|
||||||
[0] = "The Arena battle has begun!",
|
|
||||||
},
|
|
||||||
["esES"] = {
|
|
||||||
[60] = "¡Un minuto hasta que dé comienzo la batalla en arena!",
|
|
||||||
[30] = "¡Treinta segundos hasta que comience la batalla en arena!",
|
|
||||||
[15] = "¡Quince segundos hasta que comience la batalla en arena!",
|
|
||||||
[0] = "¡La batalla en arena ha comenzado!",
|
|
||||||
},
|
|
||||||
["ptBR"] = {
|
|
||||||
[60] = "Um minuto até a batalha na Arena começar!",
|
|
||||||
[30] = "Trinta segundos até a batalha na Arena começar!",
|
|
||||||
[15] = "Quinze segundos até a batalha na Arena começar!",
|
|
||||||
[0] = "A batalha na Arena começou!",
|
|
||||||
},
|
|
||||||
["deDE"] = {
|
|
||||||
[60] = "Noch eine Minute bis der Arenakampf beginnt!",
|
|
||||||
[30] = "Noch dreißig Sekunden bis der Arenakampf beginnt!",
|
|
||||||
[15] = "Noch fünfzehn Sekunden bis der Arenakampf beginnt!",
|
|
||||||
[0] = "Der Arenakampf hat begonnen!",
|
|
||||||
},
|
|
||||||
["frFR"] = {
|
|
||||||
[60] = "Le combat d'arène commence dans une minute\194\160!",
|
|
||||||
[30] = "Le combat d'arène commence dans trente secondes\194\160!",
|
|
||||||
[15] = "Le combat d'arène commence dans quinze secondes\194\160!",
|
|
||||||
[0] = "Le combat d'arène commence\194\160!",
|
|
||||||
},
|
|
||||||
["ruRU"] = {
|
|
||||||
[60] = "Одна минута до начала боя на арене!",
|
|
||||||
[30] = "Тридцать секунд до начала боя на арене!",
|
|
||||||
[15] = "До начала боя на арене осталось 15 секунд.",
|
|
||||||
[0] = "Бой начался!",
|
|
||||||
},
|
|
||||||
["itIT"] = { -- TODO
|
|
||||||
-- Beta has no itIT version available?
|
|
||||||
},
|
|
||||||
["koKR"] = {
|
|
||||||
[60] = "투기장 전투 시작 1분 전입니다!",
|
|
||||||
[30] = "투기장 전투 시작 30초 전입니다!",
|
|
||||||
[15] = "투기장 전투 시작 15초 전입니다!",
|
|
||||||
[0] = "투기장 전투가 시작되었습니다!",
|
|
||||||
},
|
|
||||||
["zhCN"] = {
|
|
||||||
[60] = "竞技场战斗将在一分钟后开始!",
|
|
||||||
[30] = "竞技场战斗将在三十秒后开始!",
|
|
||||||
[15] = "竞技场战斗将在十五秒后开始!",
|
|
||||||
[0] = "竞技场的战斗开始了!",
|
|
||||||
},
|
|
||||||
["zhTW"] = {
|
|
||||||
[60] = "1分鐘後競技場戰鬥開始!",
|
|
||||||
[30] = "30秒後競技場戰鬥開始!",
|
|
||||||
[15] = "15秒後競技場戰鬥開始!",
|
|
||||||
[0] = "競技場戰鬥開始了!",
|
|
||||||
},
|
|
||||||
}
|
|
||||||
arenaTimer["esMX"] = arenaTimer["esES"]
|
|
||||||
arenaTimer["ptPT"] = arenaTimer["ptBR"]
|
|
||||||
|
|
||||||
function Gladdy:GetArenaTimer()
|
|
||||||
if arenaTimer[GetLocale()] then
|
|
||||||
return arenaTimer[GetLocale()]
|
|
||||||
else
|
|
||||||
return arenaTimer["default"]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Gladdy.legacy = {
|
|
||||||
castBarPos = "LEFT",
|
|
||||||
buffsCooldownPos = "TOP",
|
|
||||||
buffsBuffsCooldownPos = "BOTTOM",
|
|
||||||
classIconPos = "LEFT",
|
|
||||||
ciAnchor = "healthBar",
|
|
||||||
ciPos = "TOP",
|
|
||||||
cooldownYPos = "TOP",
|
|
||||||
cooldownXPos = "LEFT",
|
|
||||||
drCooldownPos = "RIGHT",
|
|
||||||
racialAnchor = "trinket",
|
|
||||||
racialPos = "RIGHT",
|
|
||||||
trinketPos = "RIGHT",
|
|
||||||
padding = 1,
|
|
||||||
growUp = false,
|
|
||||||
}
|
|
||||||
|
|
||||||
Gladdy.newDefaults = {
|
|
||||||
["bottomMargin"] = 94.99996948242188,
|
|
||||||
["newLayout"] = true,
|
|
||||||
Pets = {
|
|
||||||
["petYOffset"] = -81.99993896484375,
|
|
||||||
["petXOffset"] = 181,
|
|
||||||
},
|
|
||||||
ClassIcon = {
|
|
||||||
["classIconXOffset"] = -74.90008544921875,
|
|
||||||
},
|
|
||||||
Racial = {
|
|
||||||
["racialXOffset"] = 255.9000244140625,
|
|
||||||
},
|
|
||||||
Trinket = {
|
|
||||||
["trinketXOffset"] = 182,
|
|
||||||
},
|
|
||||||
["Combat Indicator"] = {
|
|
||||||
["ciXOffset"] = 79.99993896484375,
|
|
||||||
["ciYOffset"] = -10.99993896484375,
|
|
||||||
},
|
|
||||||
Cooldowns = {
|
|
||||||
["cooldownYOffset"] = 31,
|
|
||||||
},
|
|
||||||
["Buffs and Debuffs"] = {
|
|
||||||
["buffsBuffsXOffset"] = 29,
|
|
||||||
["buffsBuffsYOffset"] = -82.99993896484375,
|
|
||||||
["buffsXOffset"] = 29,
|
|
||||||
["buffsYOffset"] = 62.00006103515625,
|
|
||||||
},
|
|
||||||
Diminishings = {
|
|
||||||
["drXOffset"] = 329.7999877929688,
|
|
||||||
["drYOffset"] = -22.5,
|
|
||||||
},
|
|
||||||
["Cast Bar"] = {
|
|
||||||
["castBarXOffset"] = -235.900146484375,
|
|
||||||
["castBarYOffset"] = -30.5,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
Gladdy.frameStrata = {
|
|
||||||
BACKGROUND = L["Background"] .. "(0)",
|
|
||||||
LOW = L["Low"] .. "(1)",
|
|
||||||
MEDIUM = L["Medium"] .. "(2)",
|
|
||||||
HIGH = L["High"] .. "(3)",
|
|
||||||
DIALOG = L["Dialog"] .. "(4)",
|
|
||||||
FULLSCREEN = L["Fullscreen"] .. "(5)",
|
|
||||||
FULLSCREEN_DIALOG = L["Fullscreen Dialog"] .. "(6)",
|
|
||||||
TOOLTIP = L["Tooltip"] .. "(7)",
|
|
||||||
}
|
|
||||||
|
|
||||||
Gladdy.frameStrataSorting = {
|
|
||||||
[1] = "BACKGROUND",
|
|
||||||
[2] = "LOW",
|
|
||||||
[3] = "MEDIUM",
|
|
||||||
[4] = "HIGH",
|
|
||||||
[5] = "DIALOG",
|
|
||||||
[6] = "FULLSCREEN",
|
|
||||||
[7] = "FULLSCREEN_DIALOG",
|
|
||||||
[8] = "TOOLTIP",
|
|
||||||
}
|
|
||||||
|
|
||||||
Gladdy.exceptionNames = {
|
|
||||||
[50334] = (GetSpellInfo(50334) or "...") .. " Feral", -- Berserk
|
|
||||||
[30151] = select(1, GetSpellInfo(30151)) .. " Felguard", -- Intercept
|
|
||||||
[30194] = select(1, GetSpellInfo(30151)) .. " Felguard", -- Intercept
|
|
||||||
[30198] = select(1, GetSpellInfo(30151)) .. " Felguard", -- Intercept
|
|
||||||
[47996] = select(1, GetSpellInfo(30151)) .. " Felguard", -- Intercept
|
|
||||||
[31117] = select(1, GetSpellInfo(30405)) .. " Silence", -- Unstable Affliction Silence
|
|
||||||
[43523] = select(1, GetSpellInfo(30405)) .. " Silence",
|
|
||||||
[24131] = select(1, GetSpellInfo(19386)) .. " Dot", -- Wyvern Sting Dot
|
|
||||||
[24134] = select(1, GetSpellInfo(19386)) .. " Dot",
|
|
||||||
[24135] = select(1, GetSpellInfo(19386)) .. " Dot",
|
|
||||||
[27069] = select(1, GetSpellInfo(19386)) .. " Dot",
|
|
||||||
[49009] = select(1, GetSpellInfo(19386)) .. " Dot",
|
|
||||||
[49010] = select(1, GetSpellInfo(19386)) .. " Dot",
|
|
||||||
[19975] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), -- Entangling Roots Nature's Grasp
|
|
||||||
[19974] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
|
||||||
[19973] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
|
||||||
[19972] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
|
||||||
[19971] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
|
||||||
[19971] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
|
||||||
[27010] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
|
||||||
[53312] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
|
||||||
}
|
|
||||||
|
|
||||||
local dispelTypeColors = {}
|
|
||||||
dispelTypeColors["none"] = { r = 0.80, g = 0, b = 0, a = 1 }
|
|
||||||
dispelTypeColors["magic"] = { r = 0.20, g = 0.60, b = 1.00, a = 1 }
|
|
||||||
dispelTypeColors["curse"] = { r = 0.60, g = 0.00, b = 1.00, a = 1 }
|
|
||||||
dispelTypeColors["disease"] = { r = 0.60, g = 0.40, b = 0, a = 1 }
|
|
||||||
dispelTypeColors["poison"] = { r = 0.00, g = 0.60, b = 0, a = 1 }
|
|
||||||
dispelTypeColors["immune"] = { r = 1.00, g = 0.02, b = 0.99, a = 1 }
|
|
||||||
dispelTypeColors["enrage"] = dispelTypeColors["none"]
|
|
||||||
dispelTypeColors["form"] = dispelTypeColors["none"]
|
|
||||||
dispelTypeColors["aura"] = dispelTypeColors["none"]
|
|
||||||
dispelTypeColors[""] = dispelTypeColors["none"]
|
|
||||||
|
|
||||||
function Gladdy:GetDispelTypeColors()
|
|
||||||
return dispelTypeColors
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--[[schoolColoring = {
|
|
||||||
[SCHOOL_MASK_NONE] = {a=1.0,r=1.00,g=1.00,b=1.00};
|
|
||||||
[SCHOOL_MASK_PHYSICAL] = {a=1.0,r=1.00,g=1.00,b=0.00};
|
|
||||||
[SCHOOL_MASK_HOLY] = {a=1.0,r=1.00,g=0.90,b=0.50};
|
|
||||||
[SCHOOL_MASK_FIRE] = {a=1.0,r=1.00,g=0.50,b=0.00};
|
|
||||||
[SCHOOL_MASK_NATURE] = {a=1.0,r=0.30,g=1.00,b=0.30};
|
|
||||||
[SCHOOL_MASK_FROST] = {a=1.0,r=0.50,g=1.00,b=1.00};
|
|
||||||
[SCHOOL_MASK_SHADOW] = {a=1.0,r=0.50,g=0.50,b=1.00};
|
|
||||||
[SCHOOL_MASK_ARCANE] = {a=1.0,r=1.00,g=0.50,b=1.00};
|
|
||||||
|
|
||||||
SCHOOL_MASK_NONE = 0x00;
|
|
||||||
SCHOOL_MASK_PHYSICAL = 0x01;
|
|
||||||
SCHOOL_MASK_HOLY = 0x02;
|
|
||||||
SCHOOL_MASK_FIRE = 0x04;
|
|
||||||
SCHOOL_MASK_NATURE = 0x08;
|
|
||||||
SCHOOL_MASK_FROST = 0x10;
|
|
||||||
SCHOOL_MASK_SHADOW = 0x20;
|
|
||||||
SCHOOL_MASK_ARCANE = 0x40;
|
|
||||||
--]]
|
|
||||||
local spellSchoolColors = {}
|
|
||||||
spellSchoolColors[1] = { r = 1, g = 1, b = 0, a = 1, type = "Physical" } -- "physical" 255, 255, 0
|
|
||||||
spellSchoolColors[2] = { r = 1, g = 0.901, b = 0.501, a = 1, type = "Holy" } --"holy" -- 255, 230, 128
|
|
||||||
spellSchoolColors[4] = { r = 1, g = 0.501, b = 0, a = 1, type = "Fire" } --"fire" -- 255, 128, 0
|
|
||||||
spellSchoolColors[8] = { r = 0.302, g = 1, b = 0.302, a = 1, type = "Nature" } --"nature" -- 77, 255, 77
|
|
||||||
spellSchoolColors[16] = { r = 0.501, g = 1, b = 1, a = 1, type = "Frost" } --"frost" -- 128, 255, 255
|
|
||||||
spellSchoolColors[32] = { r = 0.501, g = 0.501, b = 1, a = 1, type = "Shadow" } --"shadow" --128, 128, 255
|
|
||||||
spellSchoolColors[64] = { r = 1, g = 0.501, b = 1, a = 1, type = "Arcane" } --"arcane" -- 255, 128, 255
|
|
||||||
spellSchoolColors["unknown"] = { r = 0, g = 0, b = 0, a = 1, type = "Unknown" } --"unknown spell school"
|
|
||||||
|
|
||||||
function Gladdy:GetSpellSchoolColors()
|
|
||||||
return spellSchoolColors
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------
|
|
||||||
-- TRINKET STUFF
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
local pvpTrinkets = { -- [itemID] = cd in ms
|
|
||||||
--wotlk
|
|
||||||
[59752] = 120000,
|
|
||||||
[51377] = 120000,
|
|
||||||
[51378] = 120000,
|
|
||||||
[46083] = 120000,
|
|
||||||
[46085] = 120000,
|
|
||||||
[46081] = 120000,
|
|
||||||
[46084] = 120000,
|
|
||||||
[46082] = 120000,
|
|
||||||
[42122] = 120000,
|
|
||||||
[42123] = 120000,
|
|
||||||
--tbc
|
|
||||||
[37864] = 120000,
|
|
||||||
[37865] = 120000,
|
|
||||||
[28235] = 120000,
|
|
||||||
[30348] = 120000,
|
|
||||||
[28238] = 120000,
|
|
||||||
[30351] = 120000,
|
|
||||||
[28236] = 120000,
|
|
||||||
[30349] = 120000,
|
|
||||||
[28234] = 120000,
|
|
||||||
[28237] = 120000,
|
|
||||||
[30350] = 120000,
|
|
||||||
[28240] = 120000,
|
|
||||||
[28243] = 120000,
|
|
||||||
[30345] = 120000,
|
|
||||||
[28241] = 120000,
|
|
||||||
[30343] = 120000,
|
|
||||||
[28239] = 120000,
|
|
||||||
[30346] = 120000,
|
|
||||||
[28242] = 120000,
|
|
||||||
[30344] = 120000,
|
|
||||||
[29593] = 120000,
|
|
||||||
[29593] = 300000,
|
|
||||||
[18859] = 300000,
|
|
||||||
[18857] = 300000,
|
|
||||||
[18864] = 300000,
|
|
||||||
[18854] = 300000,
|
|
||||||
[18862] = 300000,
|
|
||||||
[18858] = 300000,
|
|
||||||
[18856] = 300000,
|
|
||||||
[18863] = 300000,
|
|
||||||
[18834] = 300000,
|
|
||||||
[18851] = 300000,
|
|
||||||
[18845] = 300000,
|
|
||||||
[18852] = 300000,
|
|
||||||
[29592] = 300000,
|
|
||||||
[18850] = 300000,
|
|
||||||
[18846] = 300000,
|
|
||||||
[18853] = 300000,
|
|
||||||
}
|
|
||||||
|
|
||||||
function Gladdy:GetPvpTrinkets()
|
|
||||||
return pvpTrinkets
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------
|
|
||||||
-- TOTEM STUFF
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
local totemData = {
|
|
||||||
-- Fire
|
|
||||||
[string_lower("Searing Totem")] = {id = 3599,texture = select(3, GetSpellInfo(3599)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
[string_lower("Flametongue Totem")] = {id = 8227,texture = select(3, GetSpellInfo(8227)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
[string_lower("Magma Totem")] = {id = 8190,texture = select(3, GetSpellInfo(8190)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2},
|
|
||||||
[string_lower("Fire Nova Totem")] = {id = 1535,texture = select(3, GetSpellInfo(1535)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = { cd = 4, once = true }},
|
|
||||||
[string_lower("Totem of Wrath")] = {id = 30706,texture = select(3, GetSpellInfo(30706)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
[string_lower("Fire Elemental Totem")] = {id = 32982,texture = select(3, GetSpellInfo(32982)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
[string_lower("Frost Resistance Totem")] = {id = 8181,texture = select(3, GetSpellInfo(8181)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
-- Water
|
|
||||||
[string_lower("Fire Resistance Totem")] = {id = 8184,texture = select(3, GetSpellInfo(8184)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
[string_lower("Disease Cleansing Totem")] = {id = 8170,texture = select(3, GetSpellInfo(8170)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 5},
|
|
||||||
[string_lower("Healing Stream Totem")] = {id = 5394,texture = select(3, GetSpellInfo(5394)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2},
|
|
||||||
[string_lower("Mana Tide Totem")] = {id = 16190,texture = select(3, GetSpellInfo(16190)), color = {r = 0.078, g = 0.9, b = 0.16, a = 1}, pulse = 3 },
|
|
||||||
[string_lower("Mana Spring Totem")] = {id = 5675,texture = select(3, GetSpellInfo(5675)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2},
|
|
||||||
-- Earth
|
|
||||||
[string_lower("Earthbind Totem")] = {id = 2484,texture = select(3, GetSpellInfo(2484)), color = {r = 0.5, g = 0.5, b = 0.5, a = 1}, pulse = 3},
|
|
||||||
[string_lower("Stoneclaw Totem")] = {id = 5730,texture = select(3, GetSpellInfo(5730)), color = {r = 0, g = 0, b = 0, a = 1}, pulse = 2},
|
|
||||||
[string_lower("Stoneskin Totem")] = {id = 8071,texture = select(3, GetSpellInfo(8071)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
[string_lower("Strength of Earth Totem")] = {id = 8075,texture = select(3, GetSpellInfo(8075)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
[string_lower("Earth Elemental Totem")] = {id = 33663,texture = select(3, GetSpellInfo(33663)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
[string_lower("Tremor Totem")] = {id = 8143,texture = select(3, GetSpellInfo(8143)), color = {r = 1, g = 0.9, b = 0.1, a = 1}, pulse = 3},
|
|
||||||
-- Air
|
|
||||||
[string_lower("Grounding Totem")] = {id = 8177,texture = select(3, GetSpellInfo(8177)), color = {r = 0, g = 0.53, b = 0.92, a = 1}},
|
|
||||||
[string_lower("Nature Resistance Totem")] = {id = 10595,texture = select(3, GetSpellInfo(10595)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
[string_lower("Windfury Totem")] = {id = 8512,texture = select(3, GetSpellInfo(8512)), color = {r = 0.96, g = 0, b = 0.07, a = 1}},
|
|
||||||
[string_lower("Sentry Totem")] = {id = 6495, texture = select(3, GetSpellInfo(6495)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
[string_lower("Wrath of Air Totem")] = {id = 3738,texture = select(3, GetSpellInfo(3738)), color = {r = 0, g = 0, b = 0, a = 1}},
|
|
||||||
}
|
|
||||||
|
|
||||||
local totemSpellIdToPulse = {
|
|
||||||
[GetSpellInfo(totemData[string_lower("Earthbind Totem")].id)] = totemData[string_lower("Earthbind Totem")].pulse,
|
|
||||||
[2484] = totemData[string_lower("Earthbind Totem")].pulse,
|
|
||||||
[GetSpellInfo(totemData[string_lower("Tremor Totem")].id)] = totemData[string_lower("Tremor Totem")].pulse,
|
|
||||||
[8143] = totemData[string_lower("Tremor Totem")].pulse,
|
|
||||||
[GetSpellInfo(totemData[string_lower("Disease Cleansing Totem")].id)] = totemData[string_lower("Disease Cleansing Totem")].pulse,
|
|
||||||
[8170] = totemData[string_lower("Disease Cleansing Totem")].pulse,
|
|
||||||
[GetSpellInfo(totemData[string_lower("Fire Nova Totem")].id)] = totemData[string_lower("Fire Nova Totem")].pulse,
|
|
||||||
[1535] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 1
|
|
||||||
[8498] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 2
|
|
||||||
[8499] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 3
|
|
||||||
[11314] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 4
|
|
||||||
[11315] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 5
|
|
||||||
[25546] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 6
|
|
||||||
[25547] = totemData[string_lower("Fire Nova Totem")].pulse, -- Rank 7
|
|
||||||
[GetSpellInfo(totemData[string_lower("Magma Totem")].id)] = totemData[string_lower("Magma Totem")].pulse,
|
|
||||||
[8190] = totemData[string_lower("Magma Totem")].pulse, -- Rank 1
|
|
||||||
[10585] = totemData[string_lower("Magma Totem")].pulse, -- Rank 2
|
|
||||||
[10586] = totemData[string_lower("Magma Totem")].pulse, -- Rank 3
|
|
||||||
[10587] = totemData[string_lower("Magma Totem")].pulse, -- Rank 4
|
|
||||||
[25552] = totemData[string_lower("Magma Totem")].pulse, -- Rank 5
|
|
||||||
[58731] = totemData[string_lower("Magma Totem")].pulse, -- Rank 6
|
|
||||||
[58734] = totemData[string_lower("Magma Totem")].pulse, -- Rank 7
|
|
||||||
[GetSpellInfo(totemData[string_lower("Healing Stream Totem")].id)] = totemData[string_lower("Healing Stream Totem")].pulse,
|
|
||||||
[5394] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 1
|
|
||||||
[6375] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 2
|
|
||||||
[6377] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 3
|
|
||||||
[10462] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 4
|
|
||||||
[10463] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 5
|
|
||||||
[25567] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 6
|
|
||||||
[58755] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 7
|
|
||||||
[58756] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 8
|
|
||||||
[58757] = totemData[string_lower("Healing Stream Totem")].pulse, -- Rank 9
|
|
||||||
[GetSpellInfo(totemData[string_lower("Mana Tide Totem")].id)] = totemData[string_lower("Mana Tide Totem")].pulse,
|
|
||||||
[16190] = totemData[string_lower("Mana Tide Totem")].pulse, -- Rank 1
|
|
||||||
[GetSpellInfo(totemData[string_lower("Stoneclaw Totem")].id)] = totemData[string_lower("Stoneclaw Totem")].pulse,
|
|
||||||
[5730] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 1
|
|
||||||
[6390] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 2
|
|
||||||
[6391] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 3
|
|
||||||
[6392] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 4
|
|
||||||
[10427] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 5
|
|
||||||
[10428] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 6
|
|
||||||
[25525] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 7
|
|
||||||
[58580] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 8
|
|
||||||
[58581] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 9
|
|
||||||
[58582] = totemData[string_lower("Stoneclaw Totem")].pulse, -- Rank 10
|
|
||||||
}
|
|
||||||
|
|
||||||
local totemNpcIdsToTotemData = {
|
|
||||||
--fire
|
|
||||||
[2523] = totemData[string_lower("Searing Totem")],
|
|
||||||
[3902] = totemData[string_lower("Searing Totem")],
|
|
||||||
[3903] = totemData[string_lower("Searing Totem")],
|
|
||||||
[3904] = totemData[string_lower("Searing Totem")],
|
|
||||||
[7400] = totemData[string_lower("Searing Totem")],
|
|
||||||
[7402] = totemData[string_lower("Searing Totem")],
|
|
||||||
[15480] = totemData[string_lower("Searing Totem")],
|
|
||||||
[31162] = totemData[string_lower("Searing Totem")],
|
|
||||||
[31164] = totemData[string_lower("Searing Totem")],
|
|
||||||
[31165] = totemData[string_lower("Searing Totem")],
|
|
||||||
[21995] = totemData[string_lower("Searing Totem")],
|
|
||||||
[22209] = totemData[string_lower("Searing Totem")],
|
|
||||||
[22895] = totemData[string_lower("Searing Totem")],
|
|
||||||
[22896] = totemData[string_lower("Searing Totem")],
|
|
||||||
[34687] = totemData[string_lower("Searing Totem")],
|
|
||||||
[36532] = totemData[string_lower("Searing Totem")],
|
|
||||||
[43423] = totemData[string_lower("Searing Totem")],
|
|
||||||
[67380] = totemData[string_lower("Searing Totem")],
|
|
||||||
[73477] = totemData[string_lower("Searing Totem")],
|
|
||||||
[79238] = totemData[string_lower("Searing Totem")],
|
|
||||||
[22896] = totemData[string_lower("Searing Totem")],
|
|
||||||
[84519] = totemData[string_lower("Searing Totem")],
|
|
||||||
[110730] = totemData[string_lower("Searing Totem")],
|
|
||||||
[132178] = totemData[string_lower("Searing Totem")],
|
|
||||||
[9637] = totemData[string_lower("Searing Totem")],
|
|
||||||
|
|
||||||
[5950] = totemData[string_lower("Flametongue Totem")],
|
|
||||||
[6012] = totemData[string_lower("Flametongue Totem")],
|
|
||||||
[7423] = totemData[string_lower("Flametongue Totem")],
|
|
||||||
[10557] = totemData[string_lower("Flametongue Totem")],
|
|
||||||
[15485] = totemData[string_lower("Flametongue Totem")],
|
|
||||||
[31132] = totemData[string_lower("Flametongue Totem")],
|
|
||||||
[31133] = totemData[string_lower("Flametongue Totem")],
|
|
||||||
[31158] = totemData[string_lower("Flametongue Totem")],
|
|
||||||
[42605] = totemData[string_lower("Flametongue Totem")],
|
|
||||||
|
|
||||||
[5929] = totemData[string_lower("Magma Totem")],
|
|
||||||
[7464] = totemData[string_lower("Magma Totem")],
|
|
||||||
[7465] = totemData[string_lower("Magma Totem")],
|
|
||||||
[7466] = totemData[string_lower("Magma Totem")],
|
|
||||||
[15484] = totemData[string_lower("Magma Totem")],
|
|
||||||
[31166] = totemData[string_lower("Magma Totem")],
|
|
||||||
[31167] = totemData[string_lower("Magma Totem")],
|
|
||||||
[32887] = totemData[string_lower("Magma Totem")],
|
|
||||||
[42211] = totemData[string_lower("Magma Totem")],
|
|
||||||
[71335] = totemData[string_lower("Magma Totem")],
|
|
||||||
[71925] = totemData[string_lower("Magma Totem")],
|
|
||||||
[73085] = totemData[string_lower("Magma Totem")],
|
|
||||||
[73093] = totemData[string_lower("Magma Totem")],
|
|
||||||
[73268] = totemData[string_lower("Magma Totem")],
|
|
||||||
[88971] = totemData[string_lower("Magma Totem")],
|
|
||||||
[97369] = totemData[string_lower("Magma Totem")],
|
|
||||||
[98676] = totemData[string_lower("Magma Totem")],
|
|
||||||
|
|
||||||
[5879] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
[6110] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
[6111] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
[7844] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
[7845] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
[14662] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
[15482] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
[15483] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
[24320] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
[32775] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
[32776] = totemData[string_lower("Fire Nova Totem")],
|
|
||||||
|
|
||||||
[17539] = totemData[string_lower("Totem of Wrath")],
|
|
||||||
[22970] = totemData[string_lower("Totem of Wrath")],
|
|
||||||
[22971] = totemData[string_lower("Totem of Wrath")],
|
|
||||||
[30652] = totemData[string_lower("Totem of Wrath")],
|
|
||||||
[30653] = totemData[string_lower("Totem of Wrath")],
|
|
||||||
[30654] = totemData[string_lower("Totem of Wrath")],
|
|
||||||
|
|
||||||
[15439] = totemData[string_lower("Fire Elemental Totem")],
|
|
||||||
[40830] = totemData[string_lower("Fire Elemental Totem")],
|
|
||||||
[41337] = totemData[string_lower("Fire Elemental Totem")],
|
|
||||||
[41346] = totemData[string_lower("Fire Elemental Totem")],
|
|
||||||
[72301] = totemData[string_lower("Fire Elemental Totem")],
|
|
||||||
|
|
||||||
[5926] = totemData[string_lower("Frost Resistance Totem")],
|
|
||||||
[7412] = totemData[string_lower("Frost Resistance Totem")],
|
|
||||||
[7413] = totemData[string_lower("Frost Resistance Totem")],
|
|
||||||
[15486] = totemData[string_lower("Frost Resistance Totem")],
|
|
||||||
[31171] = totemData[string_lower("Frost Resistance Totem")],
|
|
||||||
[31172] = totemData[string_lower("Frost Resistance Totem")],
|
|
||||||
|
|
||||||
-- Water
|
|
||||||
[5927] = totemData[string_lower("Fire Resistance Totem")],
|
|
||||||
[7424] = totemData[string_lower("Fire Resistance Totem")],
|
|
||||||
[7425] = totemData[string_lower("Fire Resistance Totem")],
|
|
||||||
[15487] = totemData[string_lower("Fire Resistance Totem")],
|
|
||||||
[31169] = totemData[string_lower("Fire Resistance Totem")],
|
|
||||||
[31170] = totemData[string_lower("Fire Resistance Totem")],
|
|
||||||
|
|
||||||
[5924] = totemData[string_lower("Disease Cleansing Totem")],
|
|
||||||
|
|
||||||
[3527] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[3906] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[3907] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[3908] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[3909] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[14664] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[15488] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[18235] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[31181] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[31182] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[31185] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[34686] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[36542] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[37810] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[38428] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[47077] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[72309] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[72457] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[73890] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[74433] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[97508] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[112567] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[120357] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[128539] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
[132049] = totemData[string_lower("Healing Stream Totem")],
|
|
||||||
|
|
||||||
[10467] = totemData[string_lower("Mana Tide Totem")],
|
|
||||||
[11100] = totemData[string_lower("Mana Tide Totem")],
|
|
||||||
[11101] = totemData[string_lower("Mana Tide Totem")],
|
|
||||||
[17061] = totemData[string_lower("Mana Tide Totem")],
|
|
||||||
|
|
||||||
[3573] = totemData[string_lower("Mana Spring Totem")],
|
|
||||||
[7414] = totemData[string_lower("Mana Spring Totem")],
|
|
||||||
[7415] = totemData[string_lower("Mana Spring Totem")],
|
|
||||||
[7416] = totemData[string_lower("Mana Spring Totem")],
|
|
||||||
[15304] = totemData[string_lower("Mana Spring Totem")],
|
|
||||||
[15489] = totemData[string_lower("Mana Spring Totem")],
|
|
||||||
[31186] = totemData[string_lower("Mana Spring Totem")],
|
|
||||||
[31189] = totemData[string_lower("Mana Spring Totem")],
|
|
||||||
[31190] = totemData[string_lower("Mana Spring Totem")],
|
|
||||||
|
|
||||||
-- Earth
|
|
||||||
[2630] = totemData[string_lower("Earthbind Totem")],
|
|
||||||
[22486] = totemData[string_lower("Earthbind Totem")],
|
|
||||||
[40233] = totemData[string_lower("Earthbind Totem")],
|
|
||||||
[74737] = totemData[string_lower("Earthbind Totem")],
|
|
||||||
[79155] = totemData[string_lower("Earthbind Totem")],
|
|
||||||
|
|
||||||
[3579] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[3911] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[3912] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[3913] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[7398] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[7399] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[14870] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[15478] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[31120] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[31121] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[31122] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[40258] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
[102402] = totemData[string_lower("Stoneclaw Totem")],
|
|
||||||
|
|
||||||
[5873] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[5919] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[5920] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[7366] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[7367] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[7368] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[14663] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[15470] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[15474] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[18177] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[21994] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[31175] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[31176] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[36550] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[40267] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
[41967] = totemData[string_lower("Stoneskin Totem")],
|
|
||||||
|
|
||||||
[5874] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
[5921] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
[5922] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
[7403] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
[15464] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
[15479] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
[21992] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
[30647] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
[31129] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
[40266] = totemData[string_lower("Strength of Earth Totem")],
|
|
||||||
|
|
||||||
[15430] = totemData[string_lower("Earth Elemental Totem")],
|
|
||||||
[24649] = totemData[string_lower("Earth Elemental Totem")],
|
|
||||||
[39387] = totemData[string_lower("Earth Elemental Totem")],
|
|
||||||
[40247] = totemData[string_lower("Earth Elemental Totem")],
|
|
||||||
[72307] = totemData[string_lower("Earth Elemental Totem")],
|
|
||||||
|
|
||||||
[5913] = totemData[string_lower("Tremor Totem")],
|
|
||||||
[41938] = totemData[string_lower("Tremor Totem")],
|
|
||||||
[41939] = totemData[string_lower("Tremor Totem")],
|
|
||||||
|
|
||||||
-- Air
|
|
||||||
[5925] = totemData[string_lower("Grounding Totem")],
|
|
||||||
[128537] = totemData[string_lower("Grounding Totem")],
|
|
||||||
[136251] = totemData[string_lower("Grounding Totem")],
|
|
||||||
|
|
||||||
[7467] = totemData[string_lower("Nature Resistance Totem")],
|
|
||||||
[7468] = totemData[string_lower("Nature Resistance Totem")],
|
|
||||||
[7469] = totemData[string_lower("Nature Resistance Totem")],
|
|
||||||
[15490] = totemData[string_lower("Nature Resistance Totem")],
|
|
||||||
[31173] = totemData[string_lower("Nature Resistance Totem")],
|
|
||||||
[31174] = totemData[string_lower("Nature Resistance Totem")],
|
|
||||||
|
|
||||||
[6112] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[7483] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[7484] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[14666] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[15496] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[15497] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[22897] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[41940] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[41941] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[80703] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[105690] = totemData[string_lower("Windfury Totem")],
|
|
||||||
[133684] = totemData[string_lower("Windfury Totem")],
|
|
||||||
|
|
||||||
[3968] = totemData[string_lower("Sentry Totem")],
|
|
||||||
[28938] = totemData[string_lower("Sentry Totem")],
|
|
||||||
[40187] = totemData[string_lower("Sentry Totem")],
|
|
||||||
[69505] = totemData[string_lower("Sentry Totem")],
|
|
||||||
[70413] = totemData[string_lower("Sentry Totem")],
|
|
||||||
[71145] = totemData[string_lower("Sentry Totem")],
|
|
||||||
[147410] = totemData[string_lower("Sentry Totem")],
|
|
||||||
|
|
||||||
[15447] = totemData[string_lower("Wrath of Air Totem")],
|
|
||||||
[36556] = totemData[string_lower("Wrath of Air Totem")],
|
|
||||||
}
|
|
||||||
|
|
||||||
function Gladdy:GetSharedTotemData()
|
|
||||||
return totemData, totemNpcIdsToTotemData, totemSpellIdToPulse
|
|
||||||
end
|
|
@ -1,23 +1,20 @@
|
|||||||
local select, string_gsub, tostring, pairs, ipairs = select, string.gsub, tostring, pairs, ipairs
|
local select, string_gsub, tostring = select, string.gsub, tostring
|
||||||
local wipe = wipe
|
|
||||||
local unpack = unpack
|
|
||||||
|
|
||||||
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
|
local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo
|
||||||
|
local RAID_CLASS_COLORS = RAID_CLASS_COLORS
|
||||||
local AURA_TYPE_DEBUFF = AURA_TYPE_DEBUFF
|
local AURA_TYPE_DEBUFF = AURA_TYPE_DEBUFF
|
||||||
local AURA_TYPE_BUFF = AURA_TYPE_BUFF
|
local AURA_TYPE_BUFF = AURA_TYPE_BUFF
|
||||||
|
|
||||||
local UnitName, UnitAura, UnitRace, UnitClass, UnitGUID, UnitIsUnit, UnitExists = UnitName, UnitAura, UnitRace, UnitClass, UnitGUID, UnitIsUnit, UnitExists
|
local UnitName, UnitAura, UnitRace, UnitClass, UnitGUID, UnitIsUnit = UnitName, UnitAura, UnitRace, UnitClass, UnitGUID, UnitIsUnit
|
||||||
local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo
|
local UnitCastingInfo, UnitChannelInfo = UnitCastingInfo, UnitChannelInfo
|
||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local FindAuraByName = AuraUtil.FindAuraByName
|
local FindAuraByName = AuraUtil.FindAuraByName
|
||||||
local GetTime = GetTime
|
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
|
||||||
local Cooldowns = Gladdy.modules["Cooldowns"]
|
local Cooldowns = Gladdy.modules["Cooldowns"]
|
||||||
local Diminishings = Gladdy.modules["Diminishings"]
|
local Diminishings = Gladdy.modules["Diminishings"]
|
||||||
|
|
||||||
local EventListener = Gladdy:NewModule("EventListener", 101, {
|
local EventListener = Gladdy:NewModule("EventListener", nil, {
|
||||||
test = true,
|
test = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -36,19 +33,8 @@ function EventListener:JOINED_ARENA()
|
|||||||
self:RegisterEvent("UNIT_SPELLCAST_START")
|
self:RegisterEvent("UNIT_SPELLCAST_START")
|
||||||
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
|
self:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START")
|
||||||
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
|
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
|
||||||
-- in case arena has started already we check for units
|
|
||||||
for i=1,Gladdy.curBracket do
|
|
||||||
if Gladdy.buttons["arena"..i].lastAuras then
|
|
||||||
wipe(Gladdy.buttons["arena"..i].lastAuras)
|
|
||||||
end
|
|
||||||
if UnitExists("arena" .. i) then
|
|
||||||
Gladdy:SpotEnemy("arena" .. i, true)
|
|
||||||
end
|
|
||||||
if UnitExists("arenapet" .. i) then
|
|
||||||
Gladdy:SendMessage("PET_SPOTTED", "arenapet" .. i)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
self:SetScript("OnEvent", EventListener.OnEvent)
|
self:SetScript("OnEvent", EventListener.OnEvent)
|
||||||
|
Gladdy:SendCommMessage("GladdyVCheck", tostring(Gladdy.version_num), "RAID", UnitName("player"))
|
||||||
end
|
end
|
||||||
|
|
||||||
function EventListener:Reset()
|
function EventListener:Reset()
|
||||||
@ -56,144 +42,95 @@ function EventListener:Reset()
|
|||||||
self:SetScript("OnEvent", nil)
|
self:SetScript("OnEvent", nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Gladdy:DetectSpec(unit, specSpell)
|
||||||
|
if specSpell then
|
||||||
|
self.modules["Cooldowns"]:DetectSpec(unit, specSpell)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function Gladdy:SpotEnemy(unit, auraScan)
|
function Gladdy:SpotEnemy(unit, auraScan)
|
||||||
local button = self.buttons[unit]
|
local button = self.buttons[unit]
|
||||||
if not unit or not button then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if UnitExists(unit) then
|
|
||||||
button.raceLoc = UnitRace(unit)
|
button.raceLoc = UnitRace(unit)
|
||||||
button.race = select(2, UnitRace(unit))
|
button.race = select(2, UnitRace(unit))
|
||||||
button.classLoc = select(1, UnitClass(unit))
|
button.classLoc = select(1, UnitClass(unit))
|
||||||
button.class = select(2, UnitClass(unit))
|
button.class = select(2, UnitClass(unit))
|
||||||
button.name = UnitName(unit)
|
button.name = UnitName(unit)
|
||||||
|
button.stealthed = false
|
||||||
Gladdy.guids[UnitGUID(unit)] = unit
|
Gladdy.guids[UnitGUID(unit)] = unit
|
||||||
end
|
|
||||||
if button.class and button.race then
|
|
||||||
Gladdy:SendMessage("ENEMY_SPOTTED", unit)
|
Gladdy:SendMessage("ENEMY_SPOTTED", unit)
|
||||||
end
|
|
||||||
if auraScan and not button.spec then
|
if auraScan and not button.spec then
|
||||||
Gladdy:SendMessage("AURA_FADE", unit, "HELPFUL")
|
|
||||||
for n = 1, 30 do
|
for n = 1, 30 do
|
||||||
local spellName, texture, count, dispelType, duration, expirationTime, unitCaster, _, _, spellID = UnitAura(unit, n, "HELPFUL")
|
local spellName,_,_,_,_,_,unitCaster = UnitAura(unit, n, "HELPFUL")
|
||||||
if ( not spellName ) then
|
if ( not spellName ) then
|
||||||
Gladdy:SendMessage("AURA_GAIN_LIMIT", unit, AURA_TYPE_BUFF, n - 1)
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
if Gladdy.specBuffs[spellName] then
|
||||||
if Gladdy.exceptionNames[spellID] then
|
|
||||||
spellName = Gladdy.exceptionNames[spellID]
|
|
||||||
end
|
|
||||||
|
|
||||||
if Gladdy.specBuffs[spellName] and unitCaster then -- Check for auras that detect a spec
|
|
||||||
local unitPet = string_gsub(unit, "%d$", "pet%1")
|
local unitPet = string_gsub(unit, "%d$", "pet%1")
|
||||||
if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then
|
if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then
|
||||||
EventListener:DetectSpec(unit, Gladdy.specBuffs[spellName])
|
Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if Gladdy.cooldownBuffs[spellName] and unitCaster then -- Check for auras that detect used CDs (like Fear Ward)
|
|
||||||
for arenaUnit,v in pairs(self.buttons) do
|
|
||||||
if (UnitIsUnit(arenaUnit, unitCaster)) then
|
|
||||||
Cooldowns:CooldownUsed(arenaUnit, v.class, Gladdy.cooldownBuffs[spellName].spellId, Gladdy.cooldownBuffs[spellName].cd(expirationTime - GetTime()))
|
|
||||||
-- /run LibStub("Gladdy").modules["Cooldowns"]:CooldownUsed("arena5", "PRIEST", 6346, 10)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if Gladdy.cooldownBuffs.racials[spellName] and Gladdy.cooldownBuffs.racials[spellName] then
|
|
||||||
Gladdy:SendMessage("RACIAL_USED", unit, spellName, Gladdy.cooldownBuffs.racials[spellName].cd(expirationTime - GetTime()), spellName)
|
|
||||||
end
|
|
||||||
Gladdy:SendMessage("AURA_GAIN", unit, AURA_TYPE_BUFF, spellID, spellName, texture, duration, expirationTime, count, dispelType, n, unitCaster)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
|
function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
|
||||||
-- timestamp,eventType,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags,destRaidFlags,spellId,spellName,spellSchool
|
-- timestamp,eventType,hideCaster,sourceGUID,sourceName,sourceFlags,sourceRaidFlags,destGUID,destName,destFlags,destRaidFlags,spellId,spellName,spellSchool
|
||||||
local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool = CombatLogGetCurrentEventInfo()
|
local _,eventType,_,sourceGUID,_,_,_,destGUID,_,_,_,spellID,spellName = CombatLogGetCurrentEventInfo()
|
||||||
local srcUnit = Gladdy.guids[sourceGUID] -- can be a PET
|
local srcUnit = Gladdy.guids[sourceGUID]
|
||||||
local destUnit = Gladdy.guids[destGUID] -- can be a PET
|
local destUnit = Gladdy.guids[destGUID]
|
||||||
if (Gladdy.db.shadowsightTimerEnabled and eventType == "SPELL_AURA_APPLIED" and spellID == 34709) then
|
|
||||||
Gladdy.modules["Shadowsight Timer"]:AURA_GAIN(nil, nil, 34709)
|
if Gladdy.specSpells[spellName] and srcUnit then
|
||||||
|
--Gladdy:Print(eventType, spellName, Gladdy.specSpells[spellName], srcUnit)
|
||||||
|
end
|
||||||
|
if (eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then
|
||||||
|
if destUnit then
|
||||||
|
--Gladdy:Print(eventType, "destUnit", destUnit)
|
||||||
|
elseif srcUnit then
|
||||||
|
--Gladdy:Print(eventType, "srcUnit", srcUnit)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if Gladdy.exceptionNames[spellID] then
|
|
||||||
spellName = Gladdy.exceptionNames[spellID]
|
|
||||||
end
|
|
||||||
if destUnit then
|
if destUnit then
|
||||||
-- diminish tracker
|
-- diminish tracker
|
||||||
if Gladdy.buttons[destUnit] and Gladdy.db.drEnabled and extraSpellId == AURA_TYPE_DEBUFF then
|
if (Gladdy.db.drEnabled and (eventType == "SPELL_AURA_REMOVED" or eventType == "SPELL_AURA_REFRESH")) then
|
||||||
if (eventType == "SPELL_AURA_REMOVED") then
|
|
||||||
Diminishings:AuraFade(destUnit, spellID)
|
Diminishings:AuraFade(destUnit, spellID)
|
||||||
end
|
end
|
||||||
if (eventType == "SPELL_AURA_REFRESH") then
|
|
||||||
Diminishings:AuraGain(destUnit, spellID)
|
|
||||||
--Diminishings:AuraFade(destUnit, spellID)
|
|
||||||
end
|
|
||||||
if (eventType == "SPELL_AURA_APPLIED") then
|
|
||||||
Diminishings:AuraGain(destUnit, spellID)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- death detection
|
-- death detection
|
||||||
if (eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then
|
if (eventType == "UNIT_DIED" or eventType == "PARTY_KILL" or eventType == "SPELL_INSTAKILL") then
|
||||||
if not Gladdy:isFeignDeath(destUnit) then
|
|
||||||
Gladdy:SendMessage("UNIT_DEATH", destUnit)
|
Gladdy:SendMessage("UNIT_DEATH", destUnit)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
-- spec detection
|
-- spec detection
|
||||||
if Gladdy.buttons[destUnit] and (not Gladdy.buttons[destUnit].class or not Gladdy.buttons[destUnit].race) then
|
if not Gladdy.buttons[destUnit].class then
|
||||||
Gladdy:SpotEnemy(destUnit, true)
|
Gladdy:SpotEnemy(destUnit, true)
|
||||||
end
|
end
|
||||||
--interrupt detection
|
|
||||||
if Gladdy.buttons[destUnit] and eventType == "SPELL_INTERRUPT" then
|
|
||||||
Gladdy:SendMessage("SPELL_INTERRUPT", destUnit,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
if srcUnit then
|
if srcUnit then
|
||||||
srcUnit = string_gsub(srcUnit, "pet", "")
|
local unitRace = Gladdy.buttons[srcUnit].race
|
||||||
if (not UnitExists(srcUnit)) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if not Gladdy.buttons[srcUnit].class or not Gladdy.buttons[srcUnit].race then
|
|
||||||
Gladdy:SpotEnemy(srcUnit, true)
|
|
||||||
end
|
|
||||||
if not Gladdy.buttons[srcUnit].spec then
|
|
||||||
self:DetectSpec(srcUnit, Gladdy.specSpells[spellName])
|
|
||||||
end
|
|
||||||
if (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_MISSED") then
|
|
||||||
-- cooldown tracker
|
-- cooldown tracker
|
||||||
if Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName] then
|
if Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName] then
|
||||||
local unitClass
|
local unitClass
|
||||||
local spellId = Cooldowns.cooldownSpellIds[spellName] -- don't use spellId from combatlog, in case of different spellrank
|
local spellId = Cooldowns.cooldownSpellIds[spellName] -- don't use spellId from combatlog, in case of different spellrank
|
||||||
if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman)
|
if Gladdy.db.cooldownCooldowns[tostring(spellId)] then
|
||||||
spellId = spellID
|
|
||||||
end
|
|
||||||
if Gladdy.db.cooldownCooldowns[tostring(spellId)] and (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_MISSED" or eventType == "SPELL_DODGED") then
|
|
||||||
if (Gladdy:GetCooldownList()[Gladdy.buttons[srcUnit].class][spellId]) then
|
if (Gladdy:GetCooldownList()[Gladdy.buttons[srcUnit].class][spellId]) then
|
||||||
unitClass = Gladdy.buttons[srcUnit].class
|
unitClass = Gladdy.buttons[srcUnit].class
|
||||||
else
|
else
|
||||||
unitClass = Gladdy.buttons[srcUnit].race
|
unitClass = Gladdy.buttons[srcUnit].race
|
||||||
end
|
end
|
||||||
if spellID ~= 16188 and spellID ~= 17116 and spellID ~= 16166 and spellID ~= 12043 and spellID ~= 5384 then -- Nature's Swiftness CD starts when buff fades
|
Cooldowns:CooldownUsed(srcUnit, unitClass, spellId, spellName)
|
||||||
Gladdy:Debug("INFO", eventType, "- CooldownUsed", srcUnit, "spellID:", spellID)
|
Gladdy:DetectSpec(srcUnit, Gladdy.specSpells[spellName])
|
||||||
Cooldowns:CooldownUsed(srcUnit, unitClass, spellId)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Gladdy.db.racialEnabled and Gladdy:Racials()[unitRace].spellName == spellName and Gladdy:Racials()[unitRace][spellID] then
|
||||||
|
Gladdy:SendMessage("RACIAL_USED", srcUnit)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not Gladdy.buttons[srcUnit].class then
|
||||||
|
Gladdy:SpotEnemy(srcUnit, true)
|
||||||
end
|
end
|
||||||
if (eventType == "SPELL_AURA_REMOVED" and (spellID == 16188 or spellID == 17116 or spellID == 16166 or spellID == 12043) and Gladdy.buttons[srcUnit].class) then
|
if not Gladdy.buttons[srcUnit].spec then
|
||||||
Gladdy:Debug("INFO", "SPELL_AURA_REMOVED - CooldownUsed", srcUnit, "spellID:", spellID)
|
Gladdy:DetectSpec(srcUnit, Gladdy.specSpells[spellName])
|
||||||
Cooldowns:CooldownUsed(srcUnit, Gladdy.buttons[srcUnit].class, spellID)
|
|
||||||
end
|
|
||||||
if (eventType == "SPELL_AURA_REMOVED" and Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[spellName]) then
|
|
||||||
local unit = Gladdy:GetArenaUnit(srcUnit, true)
|
|
||||||
local spellId = Cooldowns.cooldownSpellIds[spellName] -- don't use spellId from combatlog, in case of different spellrank
|
|
||||||
if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman)
|
|
||||||
spellId = spellID
|
|
||||||
end
|
|
||||||
if unit then
|
|
||||||
--Gladdy:Debug("INFO", "EL:CL:SPELL_AURA_REMOVED (srcUnit)", "Cooldowns:AURA_FADE", unit, spellId)
|
|
||||||
Cooldowns:AURA_FADE(unit, spellId)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -201,19 +138,17 @@ end
|
|||||||
function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason)
|
function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason)
|
||||||
--[[ updateReason: seen, unseen, destroyed, cleared ]]
|
--[[ updateReason: seen, unseen, destroyed, cleared ]]
|
||||||
|
|
||||||
unit = Gladdy:GetArenaUnit(unit)
|
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
local pet = Gladdy.modules["Pets"].frames[unit]
|
local pet = Gladdy.modules["Pets"].frames[unit]
|
||||||
Gladdy:Debug("INFO", "ARENA_OPPONENT_UPDATE", unit, updateReason)
|
|
||||||
if button or pet then
|
if button or pet then
|
||||||
if updateReason == "seen" then
|
if updateReason == "seen" then
|
||||||
-- ENEMY_SPOTTED
|
-- ENEMY_SPOTTED
|
||||||
if button then
|
if button and not button.class then
|
||||||
button.stealthed = false
|
|
||||||
Gladdy:SendMessage("ENEMY_STEALTH", unit, false)
|
|
||||||
if not button.class or not button.race then
|
|
||||||
Gladdy:SpotEnemy(unit, true)
|
Gladdy:SpotEnemy(unit, true)
|
||||||
end
|
end
|
||||||
|
if button and button.stealthed then
|
||||||
|
local class = Gladdy.buttons[unit].class
|
||||||
|
button.healthBar.hp:SetStatusBarColor(RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b, 1)
|
||||||
end
|
end
|
||||||
if pet then
|
if pet then
|
||||||
Gladdy:SendMessage("PET_SPOTTED", unit)
|
Gladdy:SendMessage("PET_SPOTTED", unit)
|
||||||
@ -221,8 +156,9 @@ function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason)
|
|||||||
elseif updateReason == "unseen" then
|
elseif updateReason == "unseen" then
|
||||||
-- STEALTH
|
-- STEALTH
|
||||||
if button then
|
if button then
|
||||||
|
Gladdy:SendMessage("ENEMY_STEALTH", unit)
|
||||||
|
button.healthBar.hp:SetStatusBarColor(0.66, 0.66, 0.66, 1)
|
||||||
button.stealthed = true
|
button.stealthed = true
|
||||||
Gladdy:SendMessage("ENEMY_STEALTH", unit, true)
|
|
||||||
end
|
end
|
||||||
if pet then
|
if pet then
|
||||||
Gladdy:SendMessage("PET_STEALTH", unit)
|
Gladdy:SendMessage("PET_STEALTH", unit)
|
||||||
@ -241,118 +177,60 @@ function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Gladdy.cooldownBuffs = {
|
local exceptionNames = {
|
||||||
[GetSpellInfo(6346)] = { cd = function(expTime) -- 180s uptime == cd
|
[31117] = GetSpellInfo(30405) .. " Silence", -- Unstable Affliction Silence
|
||||||
return expTime
|
[43523] = GetSpellInfo(30405) .. " Silence",
|
||||||
end, spellId = 6346 }, -- Fear Ward
|
[24131] = select(1, GetSpellInfo(19386)) .. " Dot", -- Wyvern Sting Dot
|
||||||
[GetSpellInfo(11305)] = { cd = function(expTime) -- 15s uptime
|
[24134] = select(1, GetSpellInfo(19386)) .. " Dot",
|
||||||
return 300 - (15 - expTime)
|
[24135] = select(1, GetSpellInfo(19386)) .. " Dot",
|
||||||
end, spellId = 11305 }, -- Sprint
|
[27069] = select(1, GetSpellInfo(19386)) .. " Dot",
|
||||||
[36554] = { cd = function(expTime) -- 3s uptime
|
[19975] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)), -- Entangling Roots Nature's Grasp
|
||||||
return 30 - (3 - expTime)
|
[19974] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
||||||
end, spellId = 36554 }, -- Shadowstep speed buff
|
[19973] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
||||||
[36563] = { cd = function(expTime) -- 10s uptime
|
[19972] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
||||||
return 30 - (10 - expTime)
|
[19971] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
||||||
end, spellId = 36554 }, -- Shadowstep dmg buff
|
[19971] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
||||||
[GetSpellInfo(26889)] = { cd = function(expTime) -- 3s uptime
|
[27010] = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)),
|
||||||
return 180 - (10 - expTime)
|
|
||||||
end, spellId = 26889 }, -- Vanish
|
|
||||||
racials = {
|
|
||||||
[GetSpellInfo(20600)] = { cd = function(expTime) -- 20s uptime
|
|
||||||
return GetTime() - (20 - expTime)
|
|
||||||
end, spellId = 20600 }, -- Perception
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
--[[
|
|
||||||
/run local f,sn,dt for i=1,2 do f=(i==1 and "HELPFUL"or"HARMFUL")for n=1,30 do sn,_,_,dt=UnitAura("player",n,f) if(not sn)then break end print(sn,dt,dt and dt:len())end end
|
function EventListener:UNIT_AURA(unit)
|
||||||
--]]
|
|
||||||
function EventListener:UNIT_AURA(unit, isFullUpdate, updatedAuras)
|
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
if not button then
|
if not button then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not button.auras then
|
|
||||||
button.auras = {}
|
|
||||||
end
|
|
||||||
wipe(button.auras)
|
|
||||||
if not button.lastAuras then
|
|
||||||
button.lastAuras = {}
|
|
||||||
end
|
|
||||||
Gladdy:Debug("INFO", "AURA_FADE", unit, AURA_TYPE_BUFF, AURA_TYPE_DEBUFF)
|
|
||||||
Gladdy:SendMessage("AURA_FADE", unit, AURA_TYPE_BUFF)
|
|
||||||
Gladdy:SendMessage("AURA_FADE", unit, AURA_TYPE_DEBUFF)
|
|
||||||
for i = 1, 2 do
|
for i = 1, 2 do
|
||||||
if not Gladdy.buttons[unit].class or not Gladdy.buttons[unit].race then
|
if not Gladdy.buttons[unit].class then
|
||||||
Gladdy:SpotEnemy(unit, false)
|
Gladdy:SpotEnemy(unit, false)
|
||||||
end
|
end
|
||||||
local filter = (i == 1 and "HELPFUL" or "HARMFUL")
|
local filter = (i == 1 and "HELPFUL" or "HARMFUL")
|
||||||
local auraType = i == 1 and AURA_TYPE_BUFF or AURA_TYPE_DEBUFF
|
local auraType = i == 1 and AURA_TYPE_BUFF or AURA_TYPE_DEBUFF
|
||||||
|
Gladdy:SendMessage("AURA_FADE", unit, auraType)
|
||||||
for n = 1, 30 do
|
for n = 1, 30 do
|
||||||
local spellName, texture, count, dispelType, duration, expirationTime, unitCaster, _, shouldConsolidate, spellID = UnitAura(unit, n, filter)
|
local spellName, texture, count, debuffType, duration, expirationTime, unitCaster, _, shouldConsolidate, spellID = UnitAura(unit, n, filter)
|
||||||
if ( not spellID ) then
|
if ( not spellID ) then
|
||||||
Gladdy:SendMessage("AURA_GAIN_LIMIT", unit, auraType, n - 1)
|
Gladdy:SendMessage("AURA_GAIN_LIMIT", unit, auraType, n - 1)
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
if Gladdy.exceptionNames[spellID] then
|
if not button.spec and Gladdy.specBuffs[spellName] then
|
||||||
spellName = Gladdy.exceptionNames[spellID]
|
|
||||||
end
|
|
||||||
button.auras[spellID] = { auraType, spellID, spellName, texture, duration, expirationTime, count, dispelType }
|
|
||||||
if not button.spec and Gladdy.specBuffs[spellName] and unitCaster then
|
|
||||||
local unitPet = string_gsub(unit, "%d$", "pet%1")
|
local unitPet = string_gsub(unit, "%d$", "pet%1")
|
||||||
if unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then
|
if UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster) then
|
||||||
self:DetectSpec(unit, Gladdy.specBuffs[spellName])
|
Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (Gladdy.cooldownBuffs[spellName] or Gladdy.cooldownBuffs[spellID]) and unitCaster then -- Check for auras that hint used CDs (like Fear Ward)
|
if exceptionNames[spellID] then
|
||||||
local cooldownBuff = Gladdy.cooldownBuffs[spellID] or Gladdy.cooldownBuffs[spellName]
|
spellName = exceptionNames[spellID]
|
||||||
for arenaUnit,v in pairs(Gladdy.buttons) do
|
|
||||||
if (UnitIsUnit(arenaUnit, unitCaster)) then
|
|
||||||
Cooldowns:CooldownUsed(arenaUnit, v.class, cooldownBuff.spellId, cooldownBuff.cd(expirationTime - GetTime()))
|
|
||||||
end
|
end
|
||||||
|
Gladdy:SendMessage("AURA_GAIN", unit, auraType, spellID, spellName, texture, duration, expirationTime, count, debuffType, i)
|
||||||
|
Gladdy:Call("Announcements", "CheckDrink", unit, spellName)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if Gladdy.cooldownBuffs.racials[spellName] then
|
|
||||||
Gladdy:SendMessage("RACIAL_USED", unit, spellName, Gladdy.cooldownBuffs.racials[spellName].cd(expirationTime - GetTime()), spellName)
|
|
||||||
end
|
|
||||||
Gladdy:Debug("INFO", "AURA_GAIN", unit, auraType, spellName)
|
|
||||||
Gladdy:SendMessage("AURA_GAIN", unit, auraType, spellID, spellName, texture, duration, expirationTime, count, dispelType, i, unitCaster)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- check auras
|
|
||||||
for spellID,v in pairs(button.lastAuras) do
|
|
||||||
if not button.auras[spellID] then
|
|
||||||
if Gladdy.db.cooldown and Cooldowns.cooldownSpellIds[v[3]] then
|
|
||||||
local spellId = Cooldowns.cooldownSpellIds[v[3]] -- don't use spellId from combatlog, in case of different spellrank
|
|
||||||
if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman)
|
|
||||||
spellId = spellID
|
|
||||||
end
|
|
||||||
--Gladdy:Debug("INFO", "EL:UNIT_AURA Cooldowns:AURA_FADE", unit, spellId)
|
|
||||||
Cooldowns:AURA_FADE(unit, spellId)
|
|
||||||
if spellID == 5384 then -- Feign Death CD Detection needs this
|
|
||||||
Cooldowns:CooldownUsed(unit, Gladdy.buttons[unit].class, 5384)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
wipe(button.lastAuras)
|
|
||||||
button.lastAuras = Gladdy:DeepCopy(button.auras)
|
|
||||||
end
|
|
||||||
|
|
||||||
function EventListener:UpdateAuras(unit)
|
|
||||||
local button = Gladdy.buttons[unit]
|
|
||||||
if not button or button.lastAuras then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
for i=1, #button.lastAuras do
|
|
||||||
Gladdy.modules["Auras"]:AURA_GAIN(unit, unpack(button.lastAuras[i]))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function EventListener:UNIT_SPELLCAST_START(unit)
|
function EventListener:UNIT_SPELLCAST_START(unit)
|
||||||
if Gladdy.buttons[unit] then
|
if Gladdy.buttons[unit] then
|
||||||
local spellName = UnitCastingInfo(unit)
|
local spellName = UnitCastingInfo(unit)
|
||||||
if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then
|
if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then
|
||||||
self:DetectSpec(unit, Gladdy.specSpells[spellName])
|
Gladdy:DetectSpec(unit, Gladdy.specSpells[spellName])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -361,81 +239,20 @@ function EventListener:UNIT_SPELLCAST_CHANNEL_START(unit)
|
|||||||
if Gladdy.buttons[unit] then
|
if Gladdy.buttons[unit] then
|
||||||
local spellName = UnitChannelInfo(unit)
|
local spellName = UnitChannelInfo(unit)
|
||||||
if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then
|
if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then
|
||||||
self:DetectSpec(unit, Gladdy.specSpells[spellName])
|
Gladdy:DetectSpec(unit, Gladdy.specSpells[spellName])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function EventListener:UNIT_SPELLCAST_SUCCEEDED(...)
|
function EventListener:UNIT_SPELLCAST_SUCCEEDED(unit)
|
||||||
local unit, castGUID, spellID = ...
|
|
||||||
unit = Gladdy:GetArenaUnit(unit, true)
|
|
||||||
if Gladdy.buttons[unit] then
|
if Gladdy.buttons[unit] then
|
||||||
local unitRace = Gladdy.buttons[unit].race
|
local spellName = UnitCastingInfo(unit)
|
||||||
local spellName = GetSpellInfo(spellID)
|
if Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then
|
||||||
|
Gladdy:DetectSpec(unit, Gladdy.specSpells[spellName])
|
||||||
if Gladdy.exceptionNames[spellID] then
|
|
||||||
spellName = Gladdy.exceptionNames[spellID]
|
|
||||||
end
|
|
||||||
|
|
||||||
-- spec detection
|
|
||||||
if spellName and Gladdy.specSpells[spellName] and not Gladdy.buttons[unit].spec then
|
|
||||||
self:DetectSpec(unit, Gladdy.specSpells[spellName])
|
|
||||||
end
|
|
||||||
|
|
||||||
-- trinket
|
|
||||||
if spellID == 42292 or spellID == 59752 then
|
|
||||||
Gladdy:Debug("INFO", "UNIT_SPELLCAST_SUCCEEDED - TRINKET_USED", unit, spellID)
|
|
||||||
Gladdy:SendMessage("TRINKET_USED", unit)
|
|
||||||
end
|
|
||||||
|
|
||||||
-- racial
|
|
||||||
if unitRace and Gladdy:Racials()[unitRace].spellName == spellName and Gladdy:Racials()[unitRace][spellID] then
|
|
||||||
Gladdy:Debug("INFO", "UNIT_SPELLCAST_SUCCEEDED - RACIAL_USED", unit, spellID)
|
|
||||||
Gladdy:SendMessage("RACIAL_USED", unit)
|
|
||||||
end
|
|
||||||
|
|
||||||
--cooldown
|
|
||||||
local unitClass
|
|
||||||
if (Gladdy:GetCooldownList()[Gladdy.buttons[unit].class][unit]) then
|
|
||||||
unitClass = Gladdy.buttons[unit].class
|
|
||||||
else
|
|
||||||
unitClass = Gladdy.buttons[unit].race
|
|
||||||
end
|
|
||||||
if spellID ~= 16188 and spellID ~= 17116 and spellID ~= 16166 and spellID ~= 12043 and spellID ~= 5384 then -- Nature's Swiftness CD starts when buff fades
|
|
||||||
Gladdy:Debug("INFO", "UNIT_SPELLCAST_SUCCEEDED", "- CooldownUsed", unit, "spellID:", spellID)
|
|
||||||
Cooldowns:CooldownUsed(unit, unitClass, spellID)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function EventListener:DetectSpec(unit, spec)
|
function EventListener:GetOptions()
|
||||||
local button = Gladdy.buttons[unit]
|
return nil
|
||||||
if (not button or not spec or button.spec) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if button.class == "PALADIN" and not Gladdy:contains(spec, {L["Holy"], L["Retribution"], L["Protection"]})
|
|
||||||
or button.class == "SHAMAN" and not Gladdy:contains(spec, {L["Restoration"], L["Enhancement"], L["Elemental"]})
|
|
||||||
or button.class == "ROGUE" and not Gladdy:contains(spec, {L["Subtlety"], L["Assassination"], L["Combat"]})
|
|
||||||
or button.class == "WARLOCK" and not Gladdy:contains(spec, {L["Demonology"], L["Destruction"], L["Affliction"]})
|
|
||||||
or button.class == "PRIEST" and not Gladdy:contains(spec, {L["Shadow"], L["Discipline"], L["Holy"]})
|
|
||||||
or button.class == "MAGE" and not Gladdy:contains(spec, {L["Frost"], L["Fire"], L["Arcane"]})
|
|
||||||
or button.class == "DRUID" and not Gladdy:contains(spec, {L["Restoration"], L["Feral"], L["Balance"]})
|
|
||||||
or button.class == "HUNTER" and not Gladdy:contains(spec, {L["Beast Mastery"], L["Marksmanship"], L["Survival"]})
|
|
||||||
or button.class == "WARRIOR" and not Gladdy:contains(spec, {L["Arms"], L["Protection"], L["Fury"]})
|
|
||||||
or button.class == "DEATHKNIGHT" and not Gladdy:contains(spec, {L["Unholy"], L["Blood"], L["Frost"]}) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if not button.spec then
|
|
||||||
button.spec = spec
|
|
||||||
Gladdy:SendMessage("UNIT_SPEC", unit, spec)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function EventListener:Test(unit)
|
|
||||||
local button = Gladdy.buttons[unit]
|
|
||||||
if (button and Gladdy.testData[unit].testSpec) then
|
|
||||||
button.spec = nil
|
|
||||||
Gladdy:SpotEnemy(unit, false)
|
|
||||||
self:DetectSpec(unit, button.testSpec)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
422
Frame.lua
422
Frame.lua
@ -1,9 +1,6 @@
|
|||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
local UIParent = UIParent
|
local UIParent = UIParent
|
||||||
local InCombatLockdown = InCombatLockdown
|
local InCombatLockdown = InCombatLockdown
|
||||||
local math_abs = math.abs
|
|
||||||
local pairs = pairs
|
|
||||||
local LibStub = LibStub
|
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
@ -29,28 +26,15 @@ Gladdy.BUTTON_DEFAULTS = {
|
|||||||
damaged = 0,
|
damaged = 0,
|
||||||
click = false,
|
click = false,
|
||||||
stealthed = false,
|
stealthed = false,
|
||||||
classColors = {},
|
|
||||||
lastState = 0,
|
|
||||||
auras = {},
|
|
||||||
lastAuras = {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Gladdy:CreateFrame()
|
function Gladdy:CreateFrame()
|
||||||
self.frame = CreateFrame("Frame", "GladdyFrame", UIParent)
|
self.frame = CreateFrame("Frame", "GladdyFrame", UIParent)
|
||||||
|
|
||||||
self.frame.background = CreateFrame("Frame", nil, self.frame, BackdropTemplateMixin and "BackdropTemplate")
|
|
||||||
self.frame.background:SetBackdrop({bgFile = "Interface\\Tooltips\\UI-Tooltip-Background", tile = false, tileSize = 16})
|
|
||||||
self.frame.background:SetFrameStrata("BACKGROUND")
|
|
||||||
self.frame.background:SetBackdropColor(Gladdy:SetColor(self.db.backgroundColor))
|
|
||||||
self.frame.background:SetAllPoints(self.frame)
|
|
||||||
--self.frame.texture = self.frame:CreateTexture(nil, "OVERLAY")
|
|
||||||
--self.frame.texture:SetAllPoints(self.frame)
|
|
||||||
--self.frame.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
|
||||||
|
|
||||||
self.frame:SetClampedToScreen(true)
|
self.frame:SetClampedToScreen(true)
|
||||||
self.frame:EnableMouse(false)
|
self.frame:EnableMouse(true)
|
||||||
self.frame:SetMovable(true)
|
self.frame:SetMovable(true)
|
||||||
--self.frame:RegisterForDrag("LeftButton")
|
self.frame:RegisterForDrag("LeftButton")
|
||||||
|
|
||||||
self.frame:SetScript("OnDragStart", function(f)
|
self.frame:SetScript("OnDragStart", function(f)
|
||||||
if (not InCombatLockdown() and not self.db.locked) then
|
if (not InCombatLockdown() and not self.db.locked) then
|
||||||
@ -63,7 +47,7 @@ function Gladdy:CreateFrame()
|
|||||||
|
|
||||||
local scale = f:GetEffectiveScale()
|
local scale = f:GetEffectiveScale()
|
||||||
self.db.x = f:GetLeft() * scale
|
self.db.x = f:GetLeft() * scale
|
||||||
self.db.y = (self.db.growDirection == "TOP" and f:GetBottom() or f:GetTop()) * scale
|
self.db.y = (self.db.growUp and f:GetBottom() or f:GetTop()) * scale
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -87,7 +71,7 @@ function Gladdy:CreateFrame()
|
|||||||
|
|
||||||
local scale = self.frame:GetEffectiveScale()
|
local scale = self.frame:GetEffectiveScale()
|
||||||
self.db.x = self.frame:GetLeft() * scale
|
self.db.x = self.frame:GetLeft() * scale
|
||||||
self.db.y = (self.db.growDirection == "TOP" and self.frame:GetBottom() or self.frame:GetTop()) * scale
|
self.db.y = (self.db.growUp and self.frame:GetBottom() or self.frame:GetTop()) * scale
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
self.anchor:SetScript("OnClick", function()
|
self.anchor:SetScript("OnClick", function()
|
||||||
@ -120,175 +104,133 @@ end
|
|||||||
|
|
||||||
function Gladdy:UpdateFrame()
|
function Gladdy:UpdateFrame()
|
||||||
|
|
||||||
if (InCombatLockdown()) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if (not self.frame) then
|
if (not self.frame) then
|
||||||
self:CreateFrame()
|
self:CreateFrame()
|
||||||
end
|
end
|
||||||
local teamSize = self.curBracket or 0
|
local teamSize = self.curBracket or 0
|
||||||
|
|
||||||
local highlightBorderSize = (self.db.highlightInset and 0 or self.db.highlightBorderSize * 2)
|
local iconSize = self.db.healthBarHeight
|
||||||
local powerBarHeight = self.db.powerBarEnabled and (self.db.powerBarHeight + 1) or 0
|
local margin = 0
|
||||||
|
local width = self.db.barWidth + self.db.padding * 2 + 5
|
||||||
|
local height = self.db.healthBarHeight * teamSize + margin * (teamSize - 1) + self.db.padding * 2 + 5
|
||||||
|
local extraBarWidth = 0
|
||||||
|
local extraBarHeight = 0
|
||||||
|
|
||||||
local margin = powerBarHeight
|
-- Powerbar
|
||||||
local height = (self.db.healthBarHeight + powerBarHeight) * teamSize
|
iconSize = iconSize + self.db.powerBarHeight
|
||||||
+ (self.db.highlightInset and 0 or self.db.highlightBorderSize * 2 * teamSize)
|
margin = margin + self.db.powerBarHeight
|
||||||
+ self.db.bottomMargin * (teamSize - 1)
|
height = height + self.db.powerBarHeight * teamSize
|
||||||
local singleFrameHeight = self.db.healthBarHeight + powerBarHeight +
|
extraBarHeight = extraBarHeight + self.db.powerBarHeight
|
||||||
(self.db.highlightInset and 0 or self.db.highlightBorderSize * 2) + self.db.bottomMargin
|
|
||||||
|
|
||||||
-- Highlight
|
-- Cooldown
|
||||||
margin = margin + highlightBorderSize
|
margin = margin + 1 + self.db.highlightBorderSize * 2 + 1 -- + 1 space between health and power bar
|
||||||
margin, height = Gladdy:LegacyPositioning(margin, height, teamSize)
|
height = height + self.db.highlightBorderSize * teamSize
|
||||||
|
|
||||||
-- GrowDirection
|
if (self.db.cooldownYPos == "TOP" or self.db.cooldownYPos == "BOTTOM") and self.db.cooldown then
|
||||||
if (self.db.growDirection == "LEFT" or self.db.growDirection == "RIGHT") then
|
margin = margin + self.db.cooldownSize
|
||||||
height = self.db.healthBarHeight + powerBarHeight
|
height = height + self.db.cooldownSize * teamSize
|
||||||
|
end
|
||||||
|
if (self.db.buffsCooldownPos == "TOP" or self.db.buffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then
|
||||||
|
margin = margin + self.db.buffsIconSize
|
||||||
|
height = height + self.db.buffsIconSize * teamSize
|
||||||
|
end
|
||||||
|
if (self.db.buffsBuffsCooldownPos == "TOP" or self.db.buffsBuffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then
|
||||||
|
margin = margin + self.db.buffsBuffsIconSize
|
||||||
|
height = height + self.db.buffsBuffsIconSize * teamSize
|
||||||
|
end
|
||||||
|
if self.db.buffsCooldownPos == "TOP" and self.db.cooldownYPos == "TOP" and self.db.cooldown and self.db.buffsEnabled then
|
||||||
|
margin = margin + 1
|
||||||
|
end
|
||||||
|
if self.db.buffsCooldownPos == "BOTTOM" and self.db.cooldownYPos == "BOTTOM" and self.db.cooldown and self.db.buffsEnabled then
|
||||||
|
margin = margin + 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Classicon
|
||||||
|
width = width + iconSize
|
||||||
|
extraBarWidth = extraBarWidth + iconSize
|
||||||
|
|
||||||
|
-- Trinket
|
||||||
|
width = width + iconSize
|
||||||
|
|
||||||
self.frame:SetScale(self.db.frameScale)
|
self.frame:SetScale(self.db.frameScale)
|
||||||
self:PixelPerfectScale(false)
|
self.frame:SetWidth(width)
|
||||||
self.frame:SetWidth(self.db.barWidth + highlightBorderSize)
|
|
||||||
self.frame:SetHeight(height)
|
self.frame:SetHeight(height)
|
||||||
self.frame:ClearAllPoints()
|
--self.frame:SetBackdropColor(self.db.frameColor.r, self.db.frameColor.g, self.db.frameColor.b, self.db.frameColor.a)
|
||||||
self.frame.background:SetBackdropColor(Gladdy:SetColor(self.db.backgroundColor))
|
|
||||||
self.frame:ClearAllPoints()
|
self.frame:ClearAllPoints()
|
||||||
if (self.db.x == 0 and self.db.y == 0) then
|
if (self.db.x == 0 and self.db.y == 0) then
|
||||||
self.frame:SetPoint("CENTER")
|
self.frame:SetPoint("CENTER")
|
||||||
else
|
else
|
||||||
local scale = self.frame:GetEffectiveScale()
|
local scale = self.frame:GetEffectiveScale()
|
||||||
local growMiddle = self.db.growMiddle and teamSize > 0 and teamSize / 2 >= 1 and (teamSize - 1) * (singleFrameHeight / 2) or 0
|
if (self.db.growUp) then
|
||||||
if (self.db.growDirection == "TOP") then
|
self.frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, self.db.y / scale)
|
||||||
self.frame:SetPoint("BOTTOMLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, (self.db.y / scale) - growMiddle)
|
|
||||||
elseif self.db.growDirection == "BOTTOM" then
|
|
||||||
self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, (self.db.y / scale) + growMiddle)
|
|
||||||
else
|
else
|
||||||
self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, (self.db.y / scale))
|
self.frame:SetPoint("TOPLEFT", UIParent, "BOTTOMLEFT", self.db.x / scale, self.db.y / scale)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--Anchor
|
self.anchor:SetWidth(width)
|
||||||
self.anchor:SetWidth(self.db.barWidth * 2 + highlightBorderSize)
|
|
||||||
self.anchor:ClearAllPoints()
|
self.anchor:ClearAllPoints()
|
||||||
if (self.db.growDirection == "TOP") then
|
if (self.db.growUp) then
|
||||||
self.anchor:SetPoint("TOP", self.frame, "BOTTOM")
|
self.anchor:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
|
||||||
elseif self.growDirection == "BOTTOM" or self.growDirection == "RIGHT" then
|
|
||||||
self.anchor:SetPoint("BOTTOM", self.frame, "TOP")
|
|
||||||
else
|
else
|
||||||
self.anchor:SetPoint("BOTTOM", self.frame, "TOP")
|
self.anchor:SetPoint("BOTTOMLEFT", self.frame, "TOPLEFT")
|
||||||
end
|
end
|
||||||
|
|
||||||
if (self.db.locked) then
|
if (self.db.locked) then
|
||||||
self.anchor:Hide()
|
self.anchor:Hide()
|
||||||
|
self.anchor:Hide()
|
||||||
else
|
else
|
||||||
self.anchor:Show()
|
self.anchor:Show()
|
||||||
end
|
end
|
||||||
|
|
||||||
for i = 1, teamSize do
|
for i = 1, teamSize do
|
||||||
local button = self.buttons["arena" .. i]
|
local button = self.buttons["arena" .. i]
|
||||||
button:SetWidth(self.db.barWidth)
|
button:SetWidth(self.db.barWidth + extraBarWidth)
|
||||||
button:SetHeight(self.db.healthBarHeight)
|
button:SetHeight(self.db.healthBarHeight)
|
||||||
button.secure:SetWidth(self.db.barWidth)
|
button.secure:SetWidth(self.db.barWidth + extraBarWidth)
|
||||||
button.secure:SetHeight(self.db.healthBarHeight + powerBarHeight)
|
button.secure:SetHeight(self.db.healthBarHeight + extraBarHeight)
|
||||||
|
|
||||||
button:ClearAllPoints()
|
button:ClearAllPoints()
|
||||||
button.secure:ClearAllPoints()
|
button.secure:ClearAllPoints()
|
||||||
if (self.db.growDirection == "TOP") then
|
if (self.db.growUp) then
|
||||||
if (i == 1) then
|
if (i == 1) then
|
||||||
button:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", 0, powerBarHeight)
|
button:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", self.db.padding + 2, 0)
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
button.secure:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", self.db.padding + 2, 0)
|
||||||
else
|
else
|
||||||
button:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin)
|
button:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin)
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
button.secure:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin)
|
||||||
end
|
end
|
||||||
elseif (self.db.growDirection == "BOTTOM") then
|
else
|
||||||
if (i == 1) then
|
if (i == 1) then
|
||||||
button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, 0)
|
button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", self.db.padding + 2, 0)
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
button.secure:SetPoint("TOPLEFT", self.frame, "TOPLEFT", self.db.padding + 2, 0)
|
||||||
else
|
else
|
||||||
button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin)
|
button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin)
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
button.secure:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin)
|
||||||
end
|
|
||||||
elseif (self.db.growDirection == "LEFT") then
|
|
||||||
if (i == 1) then
|
|
||||||
button:SetPoint("TOPRIGHT", self.frame, "TOPRIGHT", -0, 0)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
else
|
|
||||||
button:SetPoint("TOPRIGHT", self.buttons["arena" .. (i - 1)], "TOPLEFT", - self.db.bottomMargin, 0)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
end
|
|
||||||
elseif (self.db.growDirection == "RIGHT") then
|
|
||||||
if (i == 1) then
|
|
||||||
button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, 0)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
else
|
|
||||||
button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "TOPRIGHT", self.db.bottomMargin, 0)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
for _, v in self:IterModules() do
|
for k, v in self:IterModules() do
|
||||||
self:Call(v, "UpdateFrame", "arena" .. i)
|
self:Call(v, "UpdateFrame", button.unit)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
for _, v in self:IterModules() do
|
for k, v in self:IterModules() do
|
||||||
self:Call(v, "UpdateFrameOnce")
|
self:Call(v, "UpdateFrameOnce")
|
||||||
end
|
end
|
||||||
if Gladdy.db.hideBlizzard == "always" then
|
|
||||||
Gladdy:BlizzArenaSetAlpha(0)
|
|
||||||
elseif Gladdy.db.hideBlizzard == "arena" then
|
|
||||||
if Gladdy.curBracket then
|
|
||||||
Gladdy:BlizzArenaSetAlpha(0)
|
|
||||||
else
|
|
||||||
Gladdy:BlizzArenaSetAlpha(1)
|
|
||||||
end
|
|
||||||
elseif Gladdy.db.hideBlizzard == "never" then
|
|
||||||
Gladdy:BlizzArenaSetAlpha(1)
|
|
||||||
end
|
|
||||||
if (not Gladdy.db.newLayout) then
|
|
||||||
Gladdy.db.newLayout = true
|
|
||||||
--get margin
|
|
||||||
local arena1Bottom
|
|
||||||
local arena2Top
|
|
||||||
if (self.db.growDirection == "BOTTOM") then
|
|
||||||
arena1Bottom = self.buttons["arena1"].secure:GetBottom()
|
|
||||||
arena2Top = self.buttons["arena2"].secure:GetTop()
|
|
||||||
elseif (self.db.growDirection == "TOP") then
|
|
||||||
arena1Bottom = self.buttons["arena1"].secure:GetTop()
|
|
||||||
arena2Top = self.buttons["arena2"].secure:GetBottom()
|
|
||||||
elseif (self.db.growDirection == "LEFT") then
|
|
||||||
arena1Bottom = self.buttons["arena1"].secure:GetLeft()
|
|
||||||
arena2Top = self.buttons["arena2"].secure:GetRight()
|
|
||||||
elseif (self.db.growDirection == "RIGHT") then
|
|
||||||
arena1Bottom = self.buttons["arena1"].secure:GetRight()
|
|
||||||
arena2Top = self.buttons["arena2"].secure:GetLeft()
|
|
||||||
end
|
|
||||||
Gladdy.db.bottomMargin = math_abs(arena1Bottom - arena2Top)
|
|
||||||
Gladdy:UpdateFrame()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:HideFrame()
|
function Gladdy:HideFrame()
|
||||||
if (self.frame) then
|
if (self.frame) then
|
||||||
if InCombatLockdown() then
|
|
||||||
self.startTest = nil
|
|
||||||
self.hideFrame = true
|
|
||||||
else
|
|
||||||
self:Reset()
|
|
||||||
self.frame:Hide()
|
self.frame:Hide()
|
||||||
end
|
|
||||||
|
|
||||||
self.frame.testing = nil
|
self.frame.testing = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:ToggleFrame(i)
|
function Gladdy:ToggleFrame(i)
|
||||||
self:Reset()
|
self:Reset()
|
||||||
|
|
||||||
if (self.frame and self.frame:IsShown() and i == self.curBracket) then
|
if (self.frame and self.frame:IsShown() and i == self.curBracket) then
|
||||||
self.frame.testing = nil
|
|
||||||
self:HideFrame()
|
self:HideFrame()
|
||||||
else
|
else
|
||||||
self.curBracket = i
|
self.curBracket = i
|
||||||
@ -296,7 +238,6 @@ function Gladdy:ToggleFrame(i)
|
|||||||
if (not self.frame) then
|
if (not self.frame) then
|
||||||
self:CreateFrame()
|
self:CreateFrame()
|
||||||
end
|
end
|
||||||
self.frame.testing = true
|
|
||||||
|
|
||||||
for o = 1, self.curBracket do
|
for o = 1, self.curBracket do
|
||||||
local unit = "arena" .. o
|
local unit = "arena" .. o
|
||||||
@ -304,18 +245,10 @@ function Gladdy:ToggleFrame(i)
|
|||||||
self:CreateButton(o)
|
self:CreateButton(o)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
self:Reset()
|
|
||||||
self.curBracket = i
|
|
||||||
self:UpdateFrame()
|
self:UpdateFrame()
|
||||||
if InCombatLockdown() then
|
|
||||||
Gladdy:Print("Gladdy frames show as soon as you leave combat")
|
|
||||||
self.showFrame = true
|
|
||||||
self.startTest = true
|
|
||||||
else
|
|
||||||
self:Test()
|
self:Test()
|
||||||
self.frame:Show()
|
self.frame:Show()
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:CreateButton(i)
|
function Gladdy:CreateButton(i)
|
||||||
@ -324,225 +257,32 @@ function Gladdy:CreateButton(i)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local button = CreateFrame("Frame", "GladdyButtonFrame" .. i, self.frame)
|
local button = CreateFrame("Frame", "GladdyButtonFrame" .. i, self.frame)
|
||||||
button:EnableMouse(false)
|
button:SetAlpha(0)
|
||||||
--button:SetAlpha(0)
|
|
||||||
--button.texture = button:CreateTexture(nil, "OVERLAY")
|
|
||||||
--button.texture:SetAllPoints(button)
|
|
||||||
--button.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
|
||||||
|
|
||||||
local secure = CreateFrame("Button", "GladdyButton" .. i, button, "SecureActionButtonTemplate, SecureHandlerEnterLeaveTemplate")
|
local secure = CreateFrame("Button", "GladdyButton" .. i, button, "SecureActionButtonTemplate")
|
||||||
secure:RegisterForClicks("AnyUp")
|
secure:RegisterForClicks("AnyUp")
|
||||||
secure:RegisterForClicks("AnyDown")
|
secure:RegisterForClicks("AnyUp")
|
||||||
|
secure:SetAttribute("*type1", "target")
|
||||||
secure:SetAttribute("target", "arena" .. i)
|
secure:SetAttribute("*type2", "focus")
|
||||||
secure:SetAttribute("focus", "arena" .. i)
|
|
||||||
secure:SetAttribute("unit", "arena" .. i)
|
secure:SetAttribute("unit", "arena" .. i)
|
||||||
|
|
||||||
--[[
|
button:RegisterEvent("UNIT_NAME_UPDATE")
|
||||||
secure:SetAttribute("target", i == 1 and "player" or "focus")
|
button:RegisterEvent("ARENA_OPPONENT_UPDATE")
|
||||||
secure:SetAttribute("focus", i == 1 and "player" or "focus")
|
button:RegisterEvent("ARENA_COOLDOWNS_UPDATE")
|
||||||
secure:SetAttribute("unit", i == 1 and "player" or "focus")
|
button:RegisterEvent("ARENA_CROWD_CONTROL_SPELL_UPDATE")
|
||||||
--]]
|
button:RegisterUnitEvent("UNIT_CONNECTION", "arena" .. i)
|
||||||
|
|
||||||
--secure.texture = secure:CreateTexture(nil, "OVERLAY")
|
|
||||||
--secure.texture:SetAllPoints(secure)
|
|
||||||
--secure.texture:SetTexture("Interface\\AddOns\\Gladdy\\Images\\Border_rounded_blp")
|
|
||||||
|
|
||||||
button.id = i
|
button.id = i
|
||||||
--button.unit = i == 1 and "player" or "focus"
|
|
||||||
button.unit = "arena" .. i
|
button.unit = "arena" .. i
|
||||||
button.secure = secure
|
button.secure = secure
|
||||||
|
|
||||||
|
|
||||||
self:ResetButton("arena" .. i)
|
self:ResetButton(button.unit)
|
||||||
|
|
||||||
self.buttons["arena" .. i] = button
|
self.buttons[button.unit] = button
|
||||||
|
|
||||||
for _, v in self:IterModules() do
|
for k, v in self:IterModules() do
|
||||||
self:Call(v, "CreateFrame", "arena" .. i)
|
self:Call(v, "CreateFrame", button.unit)
|
||||||
end
|
|
||||||
self:ResetButton("arena" .. i)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function Gladdy:SetPosition(frame, unit, xOffsetDB, yOffsetDB, newLayout, module)
|
|
||||||
local button = self.buttons[unit]
|
|
||||||
if not button or not frame or not xOffsetDB or not yOffsetDB then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if (not newLayout) then
|
|
||||||
--Gladdy:Debug("INFO", name, "old X/Y:", frame:GetCenter())
|
|
||||||
local xOffset, yOffset = frame:GetLeft(), frame:GetTop()
|
|
||||||
if not xOffset or not yOffset then
|
|
||||||
xOffset = frame:GetCenter()-- - frame:GetWidth()/2
|
|
||||||
yOffset = select(2, frame:GetCenter())-- + frame:GetHeight()/2
|
|
||||||
end
|
|
||||||
local x,y = button.healthBar:GetLeft(), button.healthBar:GetTop()
|
|
||||||
local newXOffset = math_abs(x - xOffset) * (x > xOffset and -1 or 1)
|
|
||||||
local newYOffset = math_abs(y - yOffset) * (y > yOffset and -1 or 1)
|
|
||||||
frame:ClearAllPoints()
|
|
||||||
frame:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT", newXOffset, newYOffset)
|
|
||||||
--Gladdy:Debug("INFO", name, "new X/Y:", frame:GetCenter())
|
|
||||||
if unit == "arena1" then
|
|
||||||
Gladdy.db[xOffsetDB] = newXOffset
|
|
||||||
Gladdy.db[yOffsetDB] = newYOffset
|
|
||||||
LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy")
|
|
||||||
end
|
|
||||||
else
|
|
||||||
frame:ClearAllPoints()
|
|
||||||
frame:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT", Gladdy.db[xOffsetDB], Gladdy.db[yOffsetDB])
|
|
||||||
end
|
|
||||||
if (self.newDefaults[module.name]) then
|
|
||||||
for k,v in pairs(self.newDefaults[module.name]) do
|
|
||||||
module.defaults[k] = v
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Gladdy:CreateMover(frame, xConfig, yConfig, name, points, width, height, xOffset, yOffset, activated)
|
|
||||||
if not frame.mover then
|
|
||||||
frame:EnableMouse(false)
|
|
||||||
frame:SetMovable(true)
|
|
||||||
frame.mover = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate")
|
|
||||||
frame.mover:SetFrameStrata("TOOLTIP")
|
|
||||||
frame.mover:SetPoint(points[1], frame, points[2], xOffset or 0, yOffset or 0)
|
|
||||||
frame.mover:SetHeight(height or frame:GetHeight())
|
|
||||||
frame.mover:SetWidth(width or frame:GetWidth())
|
|
||||||
|
|
||||||
local backdrop = {
|
|
||||||
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
|
|
||||||
edgeFile = "",
|
|
||||||
tile = true, tileSize = 16, edgeSize = 10,
|
|
||||||
insets = {left = 0, right = 0, top = 0, bottom = 0}
|
|
||||||
}
|
|
||||||
frame.mover:SetBackdrop(backdrop)
|
|
||||||
frame.mover:SetBackdropColor(0,1,0,0.5)
|
|
||||||
frame.mover.border = CreateFrame("Frame", nil, frame.mover, BackdropTemplateMixin and "BackdropTemplate")
|
|
||||||
frame.mover.border:SetBackdrop({ edgeFile = Gladdy:SMFetch("border", "highlightBorderStyle"), edgeSize = 2 })
|
|
||||||
frame.mover.border:SetAllPoints(frame.mover)
|
|
||||||
frame.mover.border:SetBackdropBorderColor(0,1,0,1)
|
|
||||||
frame.mover.border:SetFrameStrata("TOOLTIP")
|
|
||||||
|
|
||||||
frame.mover.text = frame.mover.border:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
|
|
||||||
frame.mover.text:SetText(name)
|
|
||||||
frame.mover.text:SetPoint("CENTER")
|
|
||||||
|
|
||||||
frame.mover:SetMovable(true)
|
|
||||||
frame.mover:EnableMouse(true)
|
|
||||||
|
|
||||||
frame.mover:SetScript("OnMouseDown", function(self)
|
|
||||||
self.point = { frame:GetPoint() }
|
|
||||||
self.start = { frame:GetCenter() }
|
|
||||||
frame:StartMoving()
|
|
||||||
self:StartMoving()
|
|
||||||
end)
|
|
||||||
frame.mover:SetScript("OnMouseUp", function(self)
|
|
||||||
frame:StopMovingOrSizing()
|
|
||||||
self:StopMovingOrSizing()
|
|
||||||
self.stop = { frame:GetCenter() }
|
|
||||||
local diffX = math_abs(self.start[1] - self.stop[1])
|
|
||||||
diffX = self.start[1] > self.stop[1] and -diffX or diffX
|
|
||||||
local diffY = math_abs(self.start[2] - self.stop[2])
|
|
||||||
diffY = self.start[2] > self.stop[2] and -diffY or diffY
|
|
||||||
frame:ClearAllPoints()
|
|
||||||
frame:SetPoint(self.point[1], self.point[2], self.point[3], self.point[4] + diffX, self.point[5] + diffY)
|
|
||||||
Gladdy.db[xConfig] = self.point[4] + diffX
|
|
||||||
Gladdy.db[yConfig] = self.point[5] + diffY
|
|
||||||
LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy")
|
|
||||||
Gladdy:UpdateFrame()
|
|
||||||
end)
|
|
||||||
else
|
|
||||||
frame.mover:ClearAllPoints()
|
|
||||||
frame.mover:SetPoint(points[1], frame, points[2], xOffset or 0, yOffset or 0)
|
|
||||||
frame.mover:SetHeight(height or frame:GetHeight())
|
|
||||||
frame.mover:SetWidth(width or frame:GetWidth())
|
|
||||||
end
|
|
||||||
if self.frame and self.frame.testing and self.db.showMover then
|
|
||||||
if (activated ~= nil and not Gladdy.db[activated]) then
|
|
||||||
frame.mover:Hide()
|
|
||||||
else
|
|
||||||
frame.mover:Show()
|
|
||||||
end
|
|
||||||
else
|
|
||||||
frame.mover:Hide()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
-- LAGACY SUPPORT
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
function Gladdy:LegacyPositioning(margin, height, teamSize)
|
|
||||||
if not Gladdy.db.newLayout then
|
|
||||||
for k,v in pairs(Gladdy.legacy) do
|
|
||||||
if Gladdy.db[k] == nil then
|
|
||||||
Gladdy:Debug("INFO", "Gladdy:LegacyPositioning write", k,v)
|
|
||||||
Gladdy.db[k] = v
|
|
||||||
else
|
|
||||||
Gladdy:Debug("INFO", "Gladdy:LegacyPositioning found", k,v)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if (self.db.cooldownYPos == "TOP" or self.db.cooldownYPos == "BOTTOM") and self.db.cooldown then
|
|
||||||
margin = margin + self.db.cooldownSize
|
|
||||||
height = height + self.db.cooldownSize * (teamSize - 1)
|
|
||||||
end
|
|
||||||
if (self.db.buffsCooldownPos == "TOP" or self.db.buffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then
|
|
||||||
margin = margin + self.db.buffsIconSize
|
|
||||||
height = height + self.db.buffsIconSize * (teamSize - 1)
|
|
||||||
end
|
|
||||||
if (self.db.buffsBuffsCooldownPos == "TOP" or self.db.buffsBuffsCooldownPos == "BOTTOM") and self.db.buffsEnabled then
|
|
||||||
margin = margin + self.db.buffsBuffsIconSize
|
|
||||||
height = height + self.db.buffsBuffsIconSize * (teamSize - 1)
|
|
||||||
end
|
|
||||||
if self.db.buffsCooldownPos == "TOP" and self.db.cooldownYPos == "TOP" and self.db.cooldown and self.db.buffsEnabled then
|
|
||||||
margin = margin + 1
|
|
||||||
height = height + (teamSize - 1)
|
|
||||||
end
|
|
||||||
if self.db.buffsCooldownPos == "BOTTOM" and self.db.cooldownYPos == "BOTTOM" and self.db.cooldown and self.db.buffsEnabled then
|
|
||||||
margin = margin + 1
|
|
||||||
height = height + (teamSize - 1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return margin, height
|
|
||||||
end
|
|
||||||
|
|
||||||
function Gladdy:PositionButton(button, i, leftSize, rightSize, powerBarHeight, margin)
|
|
||||||
if (self.db.growDirection == "TOP") then
|
|
||||||
if (i == 1) then
|
|
||||||
button:SetPoint("BOTTOMLEFT", self.frame, "BOTTOMLEFT", leftSize, powerBarHeight)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
else
|
|
||||||
button:SetPoint("BOTTOMLEFT", self.buttons["arena" .. (i - 1)], "TOPLEFT", 0, margin + self.db.bottomMargin)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
end
|
|
||||||
elseif (self.db.growDirection == "BOTTOM") then
|
|
||||||
if (i == 1) then
|
|
||||||
button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", leftSize, 0)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
else
|
|
||||||
button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "BOTTOMLEFT", 0, -margin - self.db.bottomMargin)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
end
|
|
||||||
elseif (self.db.growDirection == "LEFT") then
|
|
||||||
if (i == 1) then
|
|
||||||
button:SetPoint("TOPRIGHT", self.frame, "TOPRIGHT", -rightSize, 0)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
else
|
|
||||||
button:SetPoint("TOPRIGHT", self.buttons["arena" .. (i - 1)], "TOPLEFT", -rightSize - leftSize - self.db.bottomMargin, 0)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
end
|
|
||||||
elseif (self.db.growDirection == "RIGHT") then
|
|
||||||
if (i == 1) then
|
|
||||||
button:SetPoint("TOPLEFT", self.frame, "TOPLEFT", leftSize, 0)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
else
|
|
||||||
button:SetPoint("TOPLEFT", self.buttons["arena" .. (i - 1)], "TOPRIGHT", leftSize + rightSize + self.db.bottomMargin, 0)
|
|
||||||
button.secure:SetPoint("TOPLEFT", button.healthBar, "TOPLEFT")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
298
Gladdy.lua
298
Gladdy.lua
@ -5,20 +5,15 @@ local select = select
|
|||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
local tinsert = table.insert
|
local tinsert = table.insert
|
||||||
local tsort = table.sort
|
local tsort = table.sort
|
||||||
local str_lower = string.lower
|
|
||||||
local GetTime = GetTime
|
|
||||||
local GetPhysicalScreenSize = GetPhysicalScreenSize
|
|
||||||
local InCombatLockdown = InCombatLockdown
|
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
local DEFAULT_CHAT_FRAME = DEFAULT_CHAT_FRAME
|
local DEFAULT_CHAT_FRAME = DEFAULT_CHAT_FRAME
|
||||||
local IsAddOnLoaded = IsAddOnLoaded
|
local IsAddOnLoaded = IsAddOnLoaded
|
||||||
local GetBattlefieldStatus = GetBattlefieldStatus
|
|
||||||
local IsInInstance = IsInInstance
|
local IsInInstance = IsInInstance
|
||||||
local GetNumArenaOpponents = GetNumArenaOpponents
|
local GetBattlefieldStatus = GetBattlefieldStatus
|
||||||
|
local IsActiveBattlefieldArena = IsActiveBattlefieldArena
|
||||||
local RELEASE_TYPES = { alpha = "Alpha", beta = "Beta", release = "Release"}
|
local RELEASE_TYPES = { alpha = "Alpha", beta = "Beta", release = "Release"}
|
||||||
local PREFIX = "Gladdy v"
|
local PREFIX = "TBC-Classic_v"
|
||||||
local VERSION_REGEX = PREFIX .. "(%d+%.%d+)%-(%a)"
|
local VERSION_REGEX = PREFIX .. "(%d+%.%d+)%-(%a)"
|
||||||
local LibStub = LibStub
|
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
@ -26,18 +21,16 @@ local LibStub = LibStub
|
|||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
local MAJOR, MINOR = "Gladdy", 15
|
local MAJOR, MINOR = "Gladdy", 4
|
||||||
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
|
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
|
||||||
local L
|
local L
|
||||||
Gladdy.version_major_num = 2
|
Gladdy.version_major_num = 1
|
||||||
Gladdy.version_minor_num = 0.27
|
Gladdy.version_minor_num = 0.06
|
||||||
Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num
|
Gladdy.version_num = Gladdy.version_major_num + Gladdy.version_minor_num
|
||||||
Gladdy.version_releaseType = RELEASE_TYPES.release
|
Gladdy.version_releaseType = RELEASE_TYPES.beta
|
||||||
Gladdy.version = PREFIX .. string.format("%.2f", Gladdy.version_num) .. "-" .. Gladdy.version_releaseType
|
Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType
|
||||||
Gladdy.VERSION_REGEX = VERSION_REGEX
|
Gladdy.VERSION_REGEX = VERSION_REGEX
|
||||||
|
|
||||||
Gladdy.debug = false
|
|
||||||
|
|
||||||
LibStub("AceTimer-3.0"):Embed(Gladdy)
|
LibStub("AceTimer-3.0"):Embed(Gladdy)
|
||||||
LibStub("AceComm-3.0"):Embed(Gladdy)
|
LibStub("AceComm-3.0"):Embed(Gladdy)
|
||||||
Gladdy.modules = {}
|
Gladdy.modules = {}
|
||||||
@ -59,17 +52,6 @@ function Gladdy:Print(...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:Warn(...)
|
function Gladdy:Warn(...)
|
||||||
local text = "|cfff29f05Gladdy|r:"
|
|
||||||
local val
|
|
||||||
for i = 1, select("#", ...) do
|
|
||||||
val = select(i, ...)
|
|
||||||
if (type(val) == 'boolean') then val = val and "true" or false end
|
|
||||||
text = text .. " " .. tostring(val)
|
|
||||||
end
|
|
||||||
DEFAULT_CHAT_FRAME:AddMessage(text)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Gladdy:Error(...)
|
|
||||||
local text = "|cfffc0303Gladdy|r:"
|
local text = "|cfffc0303Gladdy|r:"
|
||||||
local val
|
local val
|
||||||
for i = 1, select("#", ...) do
|
for i = 1, select("#", ...) do
|
||||||
@ -80,38 +62,13 @@ function Gladdy:Error(...)
|
|||||||
DEFAULT_CHAT_FRAME:AddMessage(text)
|
DEFAULT_CHAT_FRAME:AddMessage(text)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:Debug(lvl, ...)
|
|
||||||
if Gladdy.debug then
|
|
||||||
if lvl == "INFO" then
|
|
||||||
Gladdy:Print("[INFO]", ...)
|
|
||||||
elseif lvl == "WARN" then
|
|
||||||
Gladdy:Warn("[WARN]", ...)
|
|
||||||
elseif lvl == "ERROR" then
|
|
||||||
Gladdy:Error("[ERROR]", ...)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
Gladdy.events = CreateFrame("Frame")
|
Gladdy.events = CreateFrame("Frame")
|
||||||
Gladdy.events.registered = {}
|
Gladdy.events.registered = {}
|
||||||
Gladdy.events:RegisterEvent("PLAYER_LOGIN")
|
Gladdy.events:RegisterEvent("PLAYER_LOGIN")
|
||||||
Gladdy.events:RegisterEvent("PLAYER_LOGOUT")
|
|
||||||
Gladdy.events:RegisterEvent("CVAR_UPDATE")
|
|
||||||
hooksecurefunc("VideoOptionsFrameOkay_OnClick", function(self, button, down, apply)
|
|
||||||
if (self:GetName() == "VideoOptionsFrameApply") then
|
|
||||||
Gladdy:PixelPerfectScale(true)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
Gladdy.events:SetScript("OnEvent", function(self, event, ...)
|
Gladdy.events:SetScript("OnEvent", function(self, event, ...)
|
||||||
if (event == "PLAYER_LOGIN") then
|
if (event == "PLAYER_LOGIN") then
|
||||||
Gladdy:OnInitialize()
|
Gladdy:OnInitialize()
|
||||||
Gladdy:OnEnable()
|
Gladdy:OnEnable()
|
||||||
elseif (event == "CVAR_UPDATE") then
|
|
||||||
if (str_lower(select(1, ...)) == "uiscale") then
|
|
||||||
Gladdy:PixelPerfectScale(true)
|
|
||||||
end
|
|
||||||
elseif (event == "PLAYER_LOGOUT") then
|
|
||||||
Gladdy:DeleteUnknownOptions(Gladdy.db, Gladdy.defaults.profile)
|
|
||||||
else
|
else
|
||||||
local func = self.registered[event]
|
local func = self.registered[event]
|
||||||
|
|
||||||
@ -174,8 +131,8 @@ function Gladdy:Call(module, func, ...)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
function Gladdy:SendMessage(message, ...)
|
function Gladdy:SendMessage(message, ...)
|
||||||
for _, module in self:IterModules() do
|
for k, v in self:IterModules() do
|
||||||
self:Call(module, module.messages[message], ...)
|
self:Call(v, v.messages[message], ...)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -186,32 +143,10 @@ function Gladdy:NewModule(name, priority, defaults)
|
|||||||
module.defaults = defaults or {}
|
module.defaults = defaults or {}
|
||||||
module.messages = {}
|
module.messages = {}
|
||||||
|
|
||||||
module.RegisterMessages = function(self, ...)
|
|
||||||
for _,message in pairs({...}) do
|
|
||||||
self.messages[message] = message
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module.RegisterMessage = function(self, message, func)
|
module.RegisterMessage = function(self, message, func)
|
||||||
self.messages[message] = func or message
|
self.messages[message] = func or message
|
||||||
end
|
end
|
||||||
|
|
||||||
module.UnregisterMessage = function(self, message)
|
|
||||||
self.messages[message] = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
module.UnregisterMessages = function(self, ...)
|
|
||||||
for _,message in pairs({...}) do
|
|
||||||
self.messages[message] = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module.UnregisterAllMessages = function(self)
|
|
||||||
for msg,_ in pairs(self.messages) do
|
|
||||||
self.messages[msg] = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
module.GetOptions = function()
|
module.GetOptions = function()
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
@ -237,11 +172,11 @@ function Gladdy:DeleteUnknownOptions(tbl, refTbl, str)
|
|||||||
end
|
end
|
||||||
for k,v in pairs(tbl) do
|
for k,v in pairs(tbl) do
|
||||||
if refTbl[k] == nil then
|
if refTbl[k] == nil then
|
||||||
Gladdy:Debug("INFO", "SavedVariable deleted:", str .. "." .. k, "not found!")
|
--Gladdy:Print("SavedVariable deleted:", str .. "." .. k, "not found!")
|
||||||
tbl[k] = nil
|
tbl[k] = nil
|
||||||
else
|
else
|
||||||
if type(v) ~= type(refTbl[k]) then
|
if type(v) ~= type(refTbl[k]) then
|
||||||
Gladdy:Debug("INFO", "SavedVariable deleted:", str .. "." .. k, "type error!", "Expected", type(refTbl[k]), "but found", type(v))
|
--Gladdy:Print("SavedVariable deleted:", str .. "." .. k, "type error!", "Expected", type(refTbl[k]), "but found", type(v))
|
||||||
tbl[k] = nil
|
tbl[k] = nil
|
||||||
elseif type(v) == "table" then
|
elseif type(v) == "table" then
|
||||||
Gladdy:DeleteUnknownOptions(v, refTbl[k], str .. "." .. k)
|
Gladdy:DeleteUnknownOptions(v, refTbl[k], str .. "." .. k)
|
||||||
@ -250,28 +185,11 @@ function Gladdy:DeleteUnknownOptions(tbl, refTbl, str)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:PixelPerfectScale(update)
|
|
||||||
local physicalWidth, physicalHeight = GetPhysicalScreenSize()
|
|
||||||
local perfectUIScale = 768.0/physicalHeight--768/select(2, strsplit("x",({ GetScreenResolutions()})[GetCurrentResolution()]))
|
|
||||||
if self.db and self.db.pixelPerfect and self.frame then
|
|
||||||
self.frame:SetIgnoreParentScale(true)
|
|
||||||
self.frame:SetScale(perfectUIScale)
|
|
||||||
--local adaptiveScale = (GetCVar("useUiScale") == "1" and 1.0 + perfectUIScale - GetCVar("UIScale") or perfectUIScale)
|
|
||||||
--self.frame:SetScale(adaptiveScale)
|
|
||||||
if update then
|
|
||||||
self:UpdateFrame()
|
|
||||||
end
|
|
||||||
elseif self.frame then
|
|
||||||
self.frame:SetScale(self.db.frameScale)
|
|
||||||
self.frame:SetIgnoreParentScale(false)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Gladdy:OnInitialize()
|
function Gladdy:OnInitialize()
|
||||||
self.dbi = LibStub("AceDB-3.0"):New("GladdyXZ", self.defaults)
|
self.dbi = LibStub("AceDB-3.0"):New("GladdyXZ", self.defaults)
|
||||||
self.dbi.RegisterCallback(self, "OnProfileChanged", "OnProfileChanged")
|
self.dbi.RegisterCallback(self, "OnProfileChanged", "OnProfileChanged")
|
||||||
self.dbi.RegisterCallback(self, "OnProfileCopied", "OnProfileChanged")
|
self.dbi.RegisterCallback(self, "OnProfileCopied", "OnProfileChanged")
|
||||||
self.dbi.RegisterCallback(self, "OnProfileReset", "OnProfileReset")
|
self.dbi.RegisterCallback(self, "OnProfileReset", "OnProfileChanged")
|
||||||
self.db = self.dbi.profile
|
self.db = self.dbi.profile
|
||||||
|
|
||||||
self.LSM = LibStub("LibSharedMedia-3.0")
|
self.LSM = LibStub("LibSharedMedia-3.0")
|
||||||
@ -279,20 +197,18 @@ function Gladdy:OnInitialize()
|
|||||||
self.LSM:Register("statusbar", "Smooth", "Interface\\AddOns\\Gladdy\\Images\\Smooth")
|
self.LSM:Register("statusbar", "Smooth", "Interface\\AddOns\\Gladdy\\Images\\Smooth")
|
||||||
self.LSM:Register("statusbar", "Minimalist", "Interface\\AddOns\\Gladdy\\Images\\Minimalist")
|
self.LSM:Register("statusbar", "Minimalist", "Interface\\AddOns\\Gladdy\\Images\\Minimalist")
|
||||||
self.LSM:Register("statusbar", "LiteStep", "Interface\\AddOns\\Gladdy\\Images\\LiteStep.tga")
|
self.LSM:Register("statusbar", "LiteStep", "Interface\\AddOns\\Gladdy\\Images\\LiteStep.tga")
|
||||||
self.LSM:Register("statusbar", "Flat", "Interface\\AddOns\\Gladdy\\Images\\UI-StatusBar")
|
|
||||||
self.LSM:Register("border", "Gladdy Tooltip round", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_round_selfmade")
|
self.LSM:Register("border", "Gladdy Tooltip round", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_round_selfmade")
|
||||||
self.LSM:Register("border", "Gladdy Tooltip squared", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_square_selfmade")
|
self.LSM:Register("border", "Gladdy Tooltip squared", "Interface\\AddOns\\Gladdy\\Images\\UI-Tooltip-Border_square_selfmade")
|
||||||
self.LSM:Register("font", "DorisPP", "Interface\\AddOns\\Gladdy\\Images\\DorisPP.TTF")
|
self.LSM:Register("font", "DorisPP", "Interface\\AddOns\\Gladdy\\Images\\DorisPP.TTF")
|
||||||
self.LSM:Register("border", "Square Full White", "Interface\\AddOns\\Gladdy\\Images\\Square_FullWhite.tga")
|
|
||||||
|
|
||||||
L = self.L
|
L = self.L
|
||||||
|
|
||||||
self.testData = {
|
self.testData = {
|
||||||
["arena1"] = { name = "Swift", raceLoc = L["NightElf"], classLoc = L["Druid"], class = "DRUID", health = 67, healthMax = 100, power = 76, powerMax = 100, powerType = 1, testSpec = L["Restoration"], race = "NightElf" },
|
["arena1"] = { name = "Swift", raceLoc = L["Tauren"], classLoc = L["Warrior"], class = "WARRIOR", health = 9635, healthMax = 14207, power = 76, powerMax = 100, powerType = 1, testSpec = L["Arms"], race = "Tauren" },
|
||||||
["arena2"] = { name = "Vilden", raceLoc = L["Undead"], classLoc = L["Mage"], class = "MAGE", health = 99, healthMax = 100, power = 7833, powerMax = 10460, powerType = 0, testSpec = L["Frost"], race = "Scourge" },
|
["arena2"] = { name = "Vilden", raceLoc = L["Undead"], classLoc = L["Mage"], class = "MAGE", health = 10969, healthMax = 11023, power = 7833, powerMax = 10460, powerType = 0, testSpec = L["Frost"], race = "Scourge" },
|
||||||
["arena3"] = { name = "Krymu", raceLoc = L["Human"], classLoc = L["Rogue"], class = "ROGUE", health = 10, healthMax = 100, power = 45, powerMax = 110, powerType = 3, testSpec = L["Subtlety"], race = "Human" },
|
["arena3"] = { name = "Krymu", raceLoc = L["Human"], classLoc = L["Rogue"], class = "ROGUE", health = 1592, healthMax = 11740, power = 45, powerMax = 110, powerType = 3, testSpec = L["Subtlety"], race = "Human" },
|
||||||
["arena4"] = { name = "Talmon", raceLoc = L["Human"], classLoc = L["Warlock"], class = "WARLOCK", health = 40, healthMax = 100, power = 9855, powerMax = 9855, powerType = 0, testSpec = L["Demonology"], race = "Human" },
|
["arena4"] = { name = "Talmon", raceLoc = L["Human"], classLoc = L["Warlock"], class = "WARLOCK", health = 10221, healthMax = 14960, power = 9855, powerMax = 9855, powerType = 0, testSpec = L["Demonology"], race = "Human" },
|
||||||
["arena5"] = { name = "Hydra", raceLoc = L["Undead"], classLoc = L["Priest"], class = "PRIEST", health = 70, healthMax = 100, power = 2515, powerMax = 10240, powerType = 0, testSpec = L["Discipline"], race = "Human" },
|
["arena5"] = { name = "Hydra", raceLoc = L["Undead"], classLoc = L["Priest"], class = "PRIEST", health = 11960, healthMax = 11960, power = 2515, powerMax = 10240, powerType = 0, testSpec = L["Discipline"], race = "Human" },
|
||||||
}
|
}
|
||||||
|
|
||||||
self.cooldownSpellIds = {}
|
self.cooldownSpellIds = {}
|
||||||
@ -303,44 +219,27 @@ function Gladdy:OnInitialize()
|
|||||||
self.guids = {}
|
self.guids = {}
|
||||||
self.curBracket = nil
|
self.curBracket = nil
|
||||||
self.curUnit = 1
|
self.curUnit = 1
|
||||||
|
self.lastInstance = nil
|
||||||
|
|
||||||
self:SetupOptions()
|
self:SetupOptions()
|
||||||
|
|
||||||
for _, module in self:IterModules() do
|
for k, v in self:IterModules() do
|
||||||
self:Call(module, "Initialize") -- B.E > A.E :D
|
self:Call(v, "Initialize") -- B.E > A.E :D
|
||||||
end
|
end
|
||||||
if Gladdy.db.hideBlizzard == "always" then
|
self:DeleteUnknownOptions(self.db, self.defaults.profile)
|
||||||
Gladdy:BlizzArenaSetAlpha(0)
|
|
||||||
end
|
|
||||||
if not self.db.newLayout then
|
|
||||||
self:ToggleFrame(3)
|
|
||||||
self:HideFrame()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Gladdy:OnProfileReset()
|
|
||||||
self.db = self.dbi.profile
|
|
||||||
Gladdy:Debug("INFO", "OnProfileReset")
|
|
||||||
self:HideFrame()
|
|
||||||
self:ToggleFrame(3)
|
|
||||||
Gladdy.options.args.lock.name = Gladdy.db.locked and L["Unlock frame"] or L["Lock frame"]
|
|
||||||
Gladdy.options.args.showMover.name = Gladdy.db.showMover and L["Hide Mover"] or L["Show Mover"]
|
|
||||||
LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:OnProfileChanged()
|
function Gladdy:OnProfileChanged()
|
||||||
self.db = self.dbi.profile
|
self.db = self.dbi.profile
|
||||||
|
self:DeleteUnknownOptions(self.db, self.defaults.profile)
|
||||||
|
|
||||||
self:HideFrame()
|
self:HideFrame()
|
||||||
self:ToggleFrame(3)
|
self:ToggleFrame(3)
|
||||||
Gladdy.options.args.lock.name = Gladdy.db.locked and L["Unlock frame"] or L["Lock frame"]
|
|
||||||
Gladdy.options.args.showMover.name = Gladdy.db.showMover and L["Hide Mover"] or L["Show Mover"]
|
|
||||||
LibStub("AceConfigRegistry-3.0"):NotifyChange("Gladdy")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:OnEnable()
|
function Gladdy:OnEnable()
|
||||||
self:RegisterEvent("UPDATE_BATTLEFIELD_STATUS")
|
self:RegisterEvent("UPDATE_BATTLEFIELD_STATUS")
|
||||||
self:RegisterEvent("PLAYER_ENTERING_WORLD")
|
self:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||||
self:RegisterEvent("PLAYER_REGEN_ENABLED")
|
|
||||||
|
|
||||||
if (IsAddOnLoaded("Clique")) then
|
if (IsAddOnLoaded("Clique")) then
|
||||||
for i = 1, 5 do
|
for i = 1, 5 do
|
||||||
@ -367,7 +266,6 @@ function Gladdy:OnEnable()
|
|||||||
|
|
||||||
self:HideFrame()
|
self:HideFrame()
|
||||||
self:ToggleFrame(3)
|
self:ToggleFrame(3)
|
||||||
self.showConfig = true
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -387,8 +285,7 @@ end
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
function Gladdy:Test()
|
function Gladdy:Test()
|
||||||
self.frame.testing = true
|
Gladdy.frame.testing = true
|
||||||
if self.curBracket then
|
|
||||||
for i = 1, self.curBracket do
|
for i = 1, self.curBracket do
|
||||||
local unit = "arena" .. i
|
local unit = "arena" .. i
|
||||||
if (not self.buttons[unit]) then
|
if (not self.buttons[unit]) then
|
||||||
@ -400,16 +297,12 @@ function Gladdy:Test()
|
|||||||
button[k] = v
|
button[k] = v
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, module in self:IterModules() do
|
for k, v in self:IterModules() do
|
||||||
self:Call(module, "Test", unit)
|
self:Call(v, "Test", unit)
|
||||||
end
|
end
|
||||||
|
|
||||||
button:SetAlpha(1)
|
button:SetAlpha(1)
|
||||||
end
|
end
|
||||||
for _, module in self:IterModules() do
|
|
||||||
self:Call(module, "TestOnce")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------
|
---------------------------
|
||||||
@ -419,40 +312,23 @@ end
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
function Gladdy:PLAYER_ENTERING_WORLD()
|
function Gladdy:PLAYER_ENTERING_WORLD()
|
||||||
if self.showConfig then
|
local instance = select(2, IsInInstance())
|
||||||
LibStub("AceConfigDialog-3.0"):Open("Gladdy", nil, LibStub("AceConfigDialog-3.0"):SelectGroup("Gladdy", "XiconProfiles"))
|
if (instance ~= "arena" and self.frame and self.frame:IsVisible() and not self.frame.testing) then
|
||||||
self.showConfig = nil
|
|
||||||
end
|
|
||||||
if (self.frame and self.frame:IsVisible()) then
|
|
||||||
self:Reset()
|
self:Reset()
|
||||||
self:HideFrame()
|
self:HideFrame()
|
||||||
end
|
end
|
||||||
|
if (instance == "arena") then
|
||||||
|
self:Reset()
|
||||||
|
self:HideFrame()
|
||||||
|
end
|
||||||
|
self.lastInstance = instance
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:UPDATE_BATTLEFIELD_STATUS(_, index)
|
function Gladdy:UPDATE_BATTLEFIELD_STATUS(_, index)
|
||||||
local status, mapName, instanceID, levelRangeMin, levelRangeMax, teamSize, isRankedArena, suspendedQueue, bool, queueType = GetBattlefieldStatus(index)
|
local status, mapName, instanceID, levelRangeMin, levelRangeMax, teamSize, isRankedArena, suspendedQueue, bool, queueType = GetBattlefieldStatus(index)
|
||||||
local instanceType = select(2, IsInInstance())
|
if (status == "active" and teamSize > 0 and IsActiveBattlefieldArena()) then
|
||||||
self:Debug("INFO", "UPDATE_BATTLEFIELD_STATUS", instanceType, status, teamSize)
|
|
||||||
if ((instanceType == "arena" or GetNumArenaOpponents() > 0) and status == "active" and teamSize > 0) then
|
|
||||||
self.curBracket = teamSize
|
self.curBracket = teamSize
|
||||||
self:JoinedArena()
|
self:JoinedArena()
|
||||||
elseif status == "active" then
|
|
||||||
if self.db.hideBlizzard == "always" then
|
|
||||||
self:BlizzArenaSetAlpha(0)
|
|
||||||
else
|
|
||||||
self:BlizzArenaSetAlpha(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Gladdy:PLAYER_REGEN_ENABLED()
|
|
||||||
if self.showFrame then
|
|
||||||
self:InitFrames()
|
|
||||||
end
|
|
||||||
if self.hideFrame then
|
|
||||||
self:Reset()
|
|
||||||
self.frame:Hide()
|
|
||||||
self.hideFrame = nil
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -464,7 +340,7 @@ end
|
|||||||
|
|
||||||
function Gladdy:Reset()
|
function Gladdy:Reset()
|
||||||
if type(self.guids) == "table" then
|
if type(self.guids) == "table" then
|
||||||
for k,_ in pairs(self.guids) do
|
for k, v in pairs(self.guids) do
|
||||||
self.guids[k] = nil
|
self.guids[k] = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -472,16 +348,13 @@ function Gladdy:Reset()
|
|||||||
self.curBracket = nil
|
self.curBracket = nil
|
||||||
self.curUnit = 1
|
self.curUnit = 1
|
||||||
|
|
||||||
for _, module in self:IterModules() do
|
for k1, v1 in self:IterModules() do
|
||||||
self:Call(module, "Reset")
|
self:Call(v1, "Reset")
|
||||||
end
|
end
|
||||||
|
|
||||||
for unit in pairs(self.buttons) do
|
for unit in pairs(self.buttons) do
|
||||||
self:ResetUnit(unit)
|
self:ResetUnit(unit)
|
||||||
end
|
end
|
||||||
if self.db.hideBlizzard == "never" or self.db.hideBlizzard == "arena" then
|
|
||||||
self:BlizzArenaSetAlpha(1)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Gladdy:ResetUnit(unit)
|
function Gladdy:ResetUnit(unit)
|
||||||
@ -493,8 +366,8 @@ function Gladdy:ResetUnit(unit)
|
|||||||
button:SetAlpha(0)
|
button:SetAlpha(0)
|
||||||
self:ResetButton(unit)
|
self:ResetButton(unit)
|
||||||
|
|
||||||
for _, module in self:IterModules() do
|
for k2, v2 in self:IterModules() do
|
||||||
self:Call(module, "ResetUnit", unit)
|
self:Call(v2, "ResetUnit", unit)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -508,7 +381,7 @@ function Gladdy:ResetButton(unit)
|
|||||||
button[k1] = nil
|
button[k1] = nil
|
||||||
elseif (type(v1) == "number") then
|
elseif (type(v1) == "number") then
|
||||||
button[k1] = 0
|
button[k1] = 0
|
||||||
elseif (type(v1) == "table") then
|
elseif (type(v1) == "array") then
|
||||||
button[k1] = {}
|
button[k1] = {}
|
||||||
elseif (type(v1) == "boolean") then
|
elseif (type(v1) == "boolean") then
|
||||||
button[k1] = false
|
button[k1] = false
|
||||||
@ -523,16 +396,6 @@ end
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
function Gladdy:JoinedArena()
|
function Gladdy:JoinedArena()
|
||||||
if InCombatLockdown() then
|
|
||||||
self:Print("Gladdy frames show as soon as you leave combat")
|
|
||||||
self.showFrame = true
|
|
||||||
else
|
|
||||||
self:InitFrames()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Gladdy:InitFrames()
|
|
||||||
self.showFrame = nil
|
|
||||||
if not self.curBracket then
|
if not self.curBracket then
|
||||||
self.curBracket = 2
|
self.curBracket = 2
|
||||||
end
|
end
|
||||||
@ -543,85 +406,10 @@ function Gladdy:InitFrames()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
self:UpdateFrame()
|
|
||||||
if self.startTest then
|
|
||||||
self:Test()
|
|
||||||
self.startTest = nil
|
|
||||||
end
|
|
||||||
self.frame:Show()
|
|
||||||
self:SendMessage("JOINED_ARENA")
|
self:SendMessage("JOINED_ARENA")
|
||||||
|
self:UpdateFrame()
|
||||||
|
self.frame:Show()
|
||||||
for i=1, self.curBracket do
|
for i=1, self.curBracket do
|
||||||
self.buttons["arena" .. i]:SetAlpha(1)
|
self.buttons["arena" .. i]:SetAlpha(1)
|
||||||
end
|
end
|
||||||
if self.db.hideBlizzard == "arena" or self.db.hideBlizzard == "always" then
|
|
||||||
self:BlizzArenaSetAlpha(0)
|
|
||||||
else
|
|
||||||
self:BlizzArenaSetAlpha(1)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
-- BLIZZARD FRAMES
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
function Gladdy:BlizzArenaSetAlpha(alpha)
|
|
||||||
if IsAddOnLoaded("Blizzard_ArenaUI") then
|
|
||||||
if (ArenaEnemyFrames) then
|
|
||||||
ArenaEnemyFrames:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
if ArenaEnemyFrame1 then
|
|
||||||
ArenaEnemyFrame1:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
if ArenaEnemyFrame1PetFrame then
|
|
||||||
ArenaEnemyFrame1PetFrame:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
if ArenaEnemyFrame2 then
|
|
||||||
ArenaEnemyFrame2:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
if ArenaEnemyFrame2PetFrame then
|
|
||||||
ArenaEnemyFrame2PetFrame:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
if ArenaEnemyFrame3 then
|
|
||||||
ArenaEnemyFrame3:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
if ArenaEnemyFrame3PetFrame then
|
|
||||||
ArenaEnemyFrame3PetFrame:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
if ArenaEnemyFrame4 then
|
|
||||||
ArenaEnemyFrame4:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
if ArenaEnemyFrame4PetFrame then
|
|
||||||
ArenaEnemyFrame4PetFrame:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
if ArenaEnemyFrame5 then
|
|
||||||
ArenaEnemyFrame5:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
if ArenaEnemyFrame5PetFrame then
|
|
||||||
ArenaEnemyFrame5PetFrame:SetAlpha(alpha)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
-- FONT/STATUSBAR/BORDER
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
local defaults = {["statusbar"] = "Smooth", ["border"] = "Gladdy Tooltip round", ["font"] = "DorisPP"}
|
|
||||||
|
|
||||||
local lastWarning = {}
|
|
||||||
function Gladdy:SMFetch(lsmType, key)
|
|
||||||
local smMediaType = self.LSM:Fetch(lsmType, Gladdy.db[key])
|
|
||||||
if (smMediaType == nil and Gladdy.db[key] ~= "None") then
|
|
||||||
if not lastWarning[key] or GetTime() - lastWarning[key] > 120 then
|
|
||||||
lastWarning[key] = GetTime()
|
|
||||||
Gladdy:Warn("Could not find", "\"" .. lsmType .. "\" \"", Gladdy.db[key], " \" for", "\"" .. key .. "\"", "- setting it to", "\"" .. defaults[lsmType] .. "\"")
|
|
||||||
end
|
|
||||||
return self.LSM:Fetch(lsmType, defaults[lsmType])
|
|
||||||
end
|
|
||||||
return smMediaType
|
|
||||||
end
|
end
|
41
Gladdy.toc
41
Gladdy.toc
@ -1,8 +1,37 @@
|
|||||||
## Title: Gladdy |cFFFF0000 game client not supported|r
|
## Interface: 20501
|
||||||
## Version: 2.27-Release
|
## Title: Gladdy - TBC
|
||||||
## Notes: The most powerful arena AddOn for WoW Classic TBC/WotLK
|
## Version: 1.06-Beta
|
||||||
|
## Notes: The most powerful arena AddOn for WoW 2.5.1
|
||||||
## Author: XiconQoo, DnB_Junkee, Knall
|
## Author: XiconQoo, DnB_Junkee, Knall
|
||||||
## X-Email: contact me on discord Knall#1751
|
## X-Email: contact me on discord Knall#1751
|
||||||
## X-Curse-Project-ID: 482332
|
## SavedVariables: GladdyXZ
|
||||||
## X-WoWI-ID: 26350
|
## OptionalDeps: SharedMedia, Blizzard_CombatLog, Blizzard_ArenaUI, Blizzard_CombatText
|
||||||
## Notes: Gladdy only supports Classic TBC and Classic WotLK.
|
|
||||||
|
embeds.xml
|
||||||
|
|
||||||
|
Gladdy.lua
|
||||||
|
Lang.lua
|
||||||
|
Frame.lua
|
||||||
|
Options.lua
|
||||||
|
Constants.lua
|
||||||
|
ImportStrings.lua
|
||||||
|
|
||||||
|
Modules\Announcements.lua
|
||||||
|
Modules\Healthbar.lua
|
||||||
|
Modules\Powerbar.lua
|
||||||
|
Modules\Auras.lua
|
||||||
|
Modules\Castbar.lua
|
||||||
|
Modules\Classicon.lua
|
||||||
|
Modules\Diminishings.lua
|
||||||
|
Modules\Highlight.lua
|
||||||
|
Modules\TotemPlates.lua
|
||||||
|
Modules\Trinket.lua
|
||||||
|
Modules\Racial.lua
|
||||||
|
Modules\Cooldowns.lua
|
||||||
|
Modules\ArenaCountDown.lua
|
||||||
|
Modules\BuffsDebuffs.lua
|
||||||
|
Modules\VersionCheck.lua
|
||||||
|
Modules\XiconProfiles.lua
|
||||||
|
Modules\Pets.lua
|
||||||
|
Modules\ExportImport.lua
|
||||||
|
EventListener.lua
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
## Interface: 20504
|
|
||||||
## Title: Gladdy - TBC
|
|
||||||
## Version: 2.27-Release
|
|
||||||
## Notes: The most powerful arena AddOn for WoW 2.5.4
|
|
||||||
## Author: XiconQoo, DnB_Junkee, Knall
|
|
||||||
## X-Email: contact me on discord Knall#1751
|
|
||||||
## X-Curse-Project-ID: 482332
|
|
||||||
## X-WoWI-ID: 26350
|
|
||||||
## SavedVariables: GladdyXZ
|
|
||||||
## OptionalDeps: SharedMedia, Blizzard_CombatLog, Blizzard_ArenaUI, Blizzard_CombatText, Plater, Kui_Nameplates, NeatPlates, TidyPlates_ThreatPlates, Tukui, ElvUI
|
|
||||||
|
|
||||||
embeds.xml
|
|
||||||
|
|
||||||
Gladdy.lua
|
|
||||||
Lang.lua
|
|
||||||
Util.lua
|
|
||||||
Frame.lua
|
|
||||||
Options.lua
|
|
||||||
Constants_shared.lua
|
|
||||||
Constants_BCC.lua
|
|
||||||
ImportStrings.lua
|
|
||||||
|
|
||||||
Modules\Announcements.lua
|
|
||||||
Modules\Healthbar.lua
|
|
||||||
Modules\Powerbar.lua
|
|
||||||
Modules\Auras.lua
|
|
||||||
Modules\Castbar.lua
|
|
||||||
Modules\Classicon.lua
|
|
||||||
Modules\Clicks.lua
|
|
||||||
Modules\Diminishings.lua
|
|
||||||
Modules\Highlight.lua
|
|
||||||
Modules\TotemPlates.lua
|
|
||||||
Modules\TotemPulse.lua
|
|
||||||
Modules\Trinket.lua
|
|
||||||
Modules\Racial.lua
|
|
||||||
Modules\Cooldowns.lua
|
|
||||||
Modules\ArenaCountDown.lua
|
|
||||||
Modules\BuffsDebuffs.lua
|
|
||||||
Modules\VersionCheck.lua
|
|
||||||
Modules\XiconProfiles.lua
|
|
||||||
Modules\Pets.lua
|
|
||||||
Modules\ExportImport.lua
|
|
||||||
Modules\CombatIndicator.lua
|
|
||||||
Modules\RangeCheck.lua
|
|
||||||
Modules\ShadowsightTimer.lua
|
|
||||||
EventListener.lua
|
|
@ -1,46 +0,0 @@
|
|||||||
## Interface: 30402
|
|
||||||
## Title: Gladdy - WotLK
|
|
||||||
## Version: 2.27-Release
|
|
||||||
## Notes: The most powerful arena AddOn for WoW 3.4.2
|
|
||||||
## Author: XiconQoo, DnB_Junkee, Knall
|
|
||||||
## X-Email: contact me on discord Knall#1751
|
|
||||||
## X-Curse-Project-ID: 482332
|
|
||||||
## X-WoWI-ID: 26350
|
|
||||||
## SavedVariables: GladdyXZ
|
|
||||||
## OptionalDeps: SharedMedia, Blizzard_CombatLog, Blizzard_ArenaUI, Blizzard_CombatText, Plater, Kui_Nameplates, NeatPlates, TidyPlates_ThreatPlates, Tukui, ElvUI
|
|
||||||
|
|
||||||
embeds.xml
|
|
||||||
|
|
||||||
Gladdy.lua
|
|
||||||
Lang.lua
|
|
||||||
Util.lua
|
|
||||||
Frame.lua
|
|
||||||
Options.lua
|
|
||||||
Constants_shared.lua
|
|
||||||
Constants_Wrath.lua
|
|
||||||
ImportStrings.lua
|
|
||||||
|
|
||||||
Modules\Announcements.lua
|
|
||||||
Modules\Healthbar.lua
|
|
||||||
Modules\Powerbar.lua
|
|
||||||
Modules\Auras.lua
|
|
||||||
Modules\Castbar.lua
|
|
||||||
Modules\Classicon.lua
|
|
||||||
Modules\Clicks.lua
|
|
||||||
Modules\Diminishings.lua
|
|
||||||
Modules\Highlight.lua
|
|
||||||
Modules\TotemPlates.lua
|
|
||||||
Modules\TotemPulse.lua
|
|
||||||
Modules\Trinket.lua
|
|
||||||
Modules\Racial.lua
|
|
||||||
Modules\Cooldowns.lua
|
|
||||||
Modules\ArenaCountDown.lua
|
|
||||||
Modules\BuffsDebuffs.lua
|
|
||||||
Modules\VersionCheck.lua
|
|
||||||
Modules\XiconProfiles.lua
|
|
||||||
Modules\Pets.lua
|
|
||||||
Modules\ExportImport.lua
|
|
||||||
Modules\CombatIndicator.lua
|
|
||||||
Modules\RangeCheck.lua
|
|
||||||
Modules\ShadowsightTimer.lua
|
|
||||||
EventListener.lua
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Images/Totems/Spell_Nature_InvisibilityTotem_edit.blp
Normal file
BIN
Images/Totems/Spell_Nature_InvisibilityTotem_edit.blp
Normal file
Binary file not shown.
BIN
Images/Totems/Spell_Nature_ManaRegenTotem_edit.blp
Normal file
BIN
Images/Totems/Spell_Nature_ManaRegenTotem_edit.blp
Normal file
Binary file not shown.
BIN
Images/Totems/Spell_Nature_RemoveCurse_edit.blp
Normal file
BIN
Images/Totems/Spell_Nature_RemoveCurse_edit.blp
Normal file
Binary file not shown.
BIN
Images/Totems/Spell_Nature_SlowingTotem_edit.blp
Normal file
BIN
Images/Totems/Spell_Nature_SlowingTotem_edit.blp
Normal file
Binary file not shown.
BIN
Images/Totems/Spell_Nature_Windfury_edit.blp
Normal file
BIN
Images/Totems/Spell_Nature_Windfury_edit.blp
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Images/mask.blp
BIN
Images/mask.blp
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@
|
|||||||
-- make into AceComm.
|
-- make into AceComm.
|
||||||
-- @class file
|
-- @class file
|
||||||
-- @name AceComm-3.0
|
-- @name AceComm-3.0
|
||||||
-- @release $Id: AceComm-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
|
-- @release $Id: AceComm-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
|
||||||
|
|
||||||
--[[ AceComm-3.0
|
--[[ AceComm-3.0
|
||||||
|
|
||||||
@ -35,6 +35,10 @@ local error, assert = error, assert
|
|||||||
-- WoW APIs
|
-- WoW APIs
|
||||||
local Ambiguate = Ambiguate
|
local Ambiguate = Ambiguate
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: LibStub, DEFAULT_CHAT_FRAME, geterrorhandler, RegisterAddonMessagePrefix
|
||||||
|
|
||||||
AceComm.embeds = AceComm.embeds or {}
|
AceComm.embeds = AceComm.embeds or {}
|
||||||
|
|
||||||
-- for my sanity and yours, let's give the message type bytes some names
|
-- for my sanity and yours, let's give the message type bytes some names
|
||||||
|
@ -75,7 +75,7 @@ local next = next
|
|||||||
local strlen = string.len
|
local strlen = string.len
|
||||||
local GetFramerate = GetFramerate
|
local GetFramerate = GetFramerate
|
||||||
local strlower = string.lower
|
local strlower = string.lower
|
||||||
local unpack,type,pairs,wipe = unpack,type,pairs,table.wipe
|
local unpack,type,pairs,wipe = unpack,type,pairs,wipe
|
||||||
local UnitInRaid,UnitInParty = UnitInRaid,UnitInParty
|
local UnitInRaid,UnitInParty = UnitInRaid,UnitInParty
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames.
|
--- AceConfigCmd-3.0 handles access to an options table through the "command line" interface via the ChatFrames.
|
||||||
-- @class file
|
-- @class file
|
||||||
-- @name AceConfigCmd-3.0
|
-- @name AceConfigCmd-3.0
|
||||||
-- @release $Id: AceConfigCmd-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
|
-- @release $Id: AceConfigCmd-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
AceConfigCmd-3.0
|
AceConfigCmd-3.0
|
||||||
@ -37,10 +37,17 @@ local error, assert = error, assert
|
|||||||
-- WoW APIs
|
-- WoW APIs
|
||||||
local _G = _G
|
local _G = _G
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: LibStub, SELECTED_CHAT_FRAME, DEFAULT_CHAT_FRAME
|
||||||
|
|
||||||
|
|
||||||
local L = setmetatable({}, { -- TODO: replace with proper locale
|
local L = setmetatable({}, { -- TODO: replace with proper locale
|
||||||
__index = function(self,k) return k end
|
__index = function(self,k) return k end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function print(msg)
|
local function print(msg)
|
||||||
(SELECTED_CHAT_FRAME or DEFAULT_CHAT_FRAME):AddMessage(msg)
|
(SELECTED_CHAT_FRAME or DEFAULT_CHAT_FRAME):AddMessage(msg)
|
||||||
end
|
end
|
||||||
@ -394,7 +401,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local strInput = strsub(info.input,inputpos);
|
local str = strsub(info.input,inputpos);
|
||||||
|
|
||||||
if tab.type=="execute" then
|
if tab.type=="execute" then
|
||||||
------------ execute --------------------------------------------
|
------------ execute --------------------------------------------
|
||||||
@ -407,21 +414,21 @@ local function handle(info, inputpos, tab, depth, retfalse)
|
|||||||
|
|
||||||
local res = true
|
local res = true
|
||||||
if tab.pattern then
|
if tab.pattern then
|
||||||
if type(tab.pattern)~="string" then err(info, inputpos, "'pattern' - expected a string") end
|
if not(type(tab.pattern)=="string") then err(info, inputpos, "'pattern' - expected a string") end
|
||||||
if not strmatch(strInput, tab.pattern) then
|
if not strmatch(str, tab.pattern) then
|
||||||
usererr(info, inputpos, "'"..strInput.."' - " .. L["invalid input"])
|
usererr(info, inputpos, "'"..str.."' - " .. L["invalid input"])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
do_final(info, inputpos, tab, "set", strInput)
|
do_final(info, inputpos, tab, "set", str)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
elseif tab.type=="toggle" then
|
elseif tab.type=="toggle" then
|
||||||
------------ toggle --------------------------------------------
|
------------ toggle --------------------------------------------
|
||||||
local b
|
local b
|
||||||
local str = strtrim(strlower(strInput))
|
local str = strtrim(strlower(str))
|
||||||
if str=="" then
|
if str=="" then
|
||||||
b = callmethod(info, inputpos, tab, "get")
|
b = callmethod(info, inputpos, tab, "get")
|
||||||
|
|
||||||
@ -458,9 +465,9 @@ local function handle(info, inputpos, tab, depth, retfalse)
|
|||||||
|
|
||||||
elseif tab.type=="range" then
|
elseif tab.type=="range" then
|
||||||
------------ range --------------------------------------------
|
------------ range --------------------------------------------
|
||||||
local val = tonumber(strInput)
|
local val = tonumber(str)
|
||||||
if not val then
|
if not val then
|
||||||
usererr(info, inputpos, "'"..strInput.."' - "..L["expected number"])
|
usererr(info, inputpos, "'"..str.."' - "..L["expected number"])
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if type(info.step)=="number" then
|
if type(info.step)=="number" then
|
||||||
@ -480,7 +487,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
|
|||||||
|
|
||||||
elseif tab.type=="select" then
|
elseif tab.type=="select" then
|
||||||
------------ select ------------------------------------
|
------------ select ------------------------------------
|
||||||
local str = strtrim(strlower(strInput))
|
local str = strtrim(strlower(str))
|
||||||
|
|
||||||
local values = tab.values
|
local values = tab.values
|
||||||
if type(values) == "function" or type(values) == "string" then
|
if type(values) == "function" or type(values) == "string" then
|
||||||
@ -521,7 +528,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
|
|||||||
|
|
||||||
elseif tab.type=="multiselect" then
|
elseif tab.type=="multiselect" then
|
||||||
------------ multiselect -------------------------------------------
|
------------ multiselect -------------------------------------------
|
||||||
local str = strtrim(strlower(strInput))
|
local str = strtrim(strlower(str))
|
||||||
|
|
||||||
local values = tab.values
|
local values = tab.values
|
||||||
if type(values) == "function" or type(values) == "string" then
|
if type(values) == "function" or type(values) == "string" then
|
||||||
@ -558,7 +565,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
|
|||||||
|
|
||||||
--check that the opt is valid
|
--check that the opt is valid
|
||||||
local ok
|
local ok
|
||||||
for k in pairs(values) do
|
for k,v in pairs(values) do
|
||||||
if strlower(k)==opt then
|
if strlower(k)==opt then
|
||||||
opt = k -- overwrite with key (in case of case mismatches)
|
opt = k -- overwrite with key (in case of case mismatches)
|
||||||
ok = true
|
ok = true
|
||||||
@ -627,7 +634,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
|
|||||||
|
|
||||||
elseif tab.type=="color" then
|
elseif tab.type=="color" then
|
||||||
------------ color --------------------------------------------
|
------------ color --------------------------------------------
|
||||||
local str = strtrim(strlower(strInput))
|
local str = strtrim(strlower(str))
|
||||||
if str == "" then
|
if str == "" then
|
||||||
--TODO: Show current value
|
--TODO: Show current value
|
||||||
return
|
return
|
||||||
@ -699,7 +706,7 @@ local function handle(info, inputpos, tab, depth, retfalse)
|
|||||||
|
|
||||||
elseif tab.type=="keybinding" then
|
elseif tab.type=="keybinding" then
|
||||||
------------ keybinding --------------------------------------------
|
------------ keybinding --------------------------------------------
|
||||||
local str = strtrim(strlower(strInput))
|
local str = strtrim(strlower(str))
|
||||||
if str == "" then
|
if str == "" then
|
||||||
--TODO: Show current value
|
--TODO: Show current value
|
||||||
return
|
return
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
|
--- AceConfigDialog-3.0 generates AceGUI-3.0 based windows based on option tables.
|
||||||
-- @class file
|
-- @class file
|
||||||
-- @name AceConfigDialog-3.0
|
-- @name AceConfigDialog-3.0
|
||||||
-- @release $Id: AceConfigDialog-3.0.lua 1296 2022-11-04 18:50:10Z nevcairiel $
|
-- @release $Id: AceConfigDialog-3.0.lua 1232 2020-04-14 22:21:22Z nevcairiel $
|
||||||
|
|
||||||
local LibStub = LibStub
|
local LibStub = LibStub
|
||||||
local gui = LibStub("AceGUI-3.0")
|
local gui = LibStub("AceGUI-3.0")
|
||||||
local reg = LibStub("AceConfigRegistry-3.0")
|
local reg = LibStub("AceConfigRegistry-3.0")
|
||||||
|
|
||||||
local MAJOR, MINOR = "AceConfigDialog-3.0", 86
|
local MAJOR, MINOR = "AceConfigDialog-3.0", 79
|
||||||
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
local AceConfigDialog, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
||||||
|
|
||||||
if not AceConfigDialog then return end
|
if not AceConfigDialog then return end
|
||||||
@ -22,13 +22,19 @@ AceConfigDialog.frame.closing = AceConfigDialog.frame.closing or {}
|
|||||||
AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {}
|
AceConfigDialog.frame.closeAllOverride = AceConfigDialog.frame.closeAllOverride or {}
|
||||||
|
|
||||||
-- Lua APIs
|
-- Lua APIs
|
||||||
local tinsert, tsort, tremove, wipe = table.insert, table.sort, table.remove, table.wipe
|
local tinsert, tsort, tremove = table.insert, table.sort, table.remove
|
||||||
local strmatch, format = string.match, string.format
|
local strmatch, format = string.match, string.format
|
||||||
local error = error
|
local error = error
|
||||||
local pairs, next, select, type, unpack, ipairs = pairs, next, select, type, unpack, ipairs
|
local pairs, next, select, type, unpack, wipe, ipairs = pairs, next, select, type, unpack, wipe, ipairs
|
||||||
local tostring, tonumber = tostring, tonumber
|
local tostring, tonumber = tostring, tonumber
|
||||||
local math_min, math_max, math_floor = math.min, math.max, math.floor
|
local math_min, math_max, math_floor = math.min, math.max, math.floor
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: NORMAL_FONT_COLOR, ACCEPT, CANCEL
|
||||||
|
-- GLOBALS: PlaySound, GameFontHighlight, GameFontHighlightSmall, GameFontHighlightLarge
|
||||||
|
-- GLOBALS: CloseSpecialWindows, InterfaceOptions_AddCategory, geterrorhandler
|
||||||
|
|
||||||
local emptyTbl = {}
|
local emptyTbl = {}
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
@ -147,7 +153,6 @@ local stringIsLiteral = {
|
|||||||
width = true,
|
width = true,
|
||||||
image = true,
|
image = true,
|
||||||
fontSize = true,
|
fontSize = true,
|
||||||
tooltipHyperlink = true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--Is Never a function or method
|
--Is Never a function or method
|
||||||
@ -189,8 +194,9 @@ local function GetOptionsMemberValue(membername, option, options, path, appName,
|
|||||||
--We have a function to call
|
--We have a function to call
|
||||||
local info = new()
|
local info = new()
|
||||||
--traverse the options table, picking up the handler and filling the info with the path
|
--traverse the options table, picking up the handler and filling the info with the path
|
||||||
|
local handler
|
||||||
local group = options
|
local group = options
|
||||||
local handler = group.handler
|
handler = group.handler or handler
|
||||||
|
|
||||||
for i = 1, #path do
|
for i = 1, #path do
|
||||||
group = GetSubOption(group, path[i])
|
group = GetSubOption(group, path[i])
|
||||||
@ -502,14 +508,6 @@ local function OptionOnMouseOver(widget, event)
|
|||||||
local tooltip = AceConfigDialog.tooltip
|
local tooltip = AceConfigDialog.tooltip
|
||||||
|
|
||||||
tooltip:SetOwner(widget.frame, "ANCHOR_TOPRIGHT")
|
tooltip:SetOwner(widget.frame, "ANCHOR_TOPRIGHT")
|
||||||
|
|
||||||
local tooltipHyperlink = GetOptionsMemberValue("tooltipHyperlink", opt, options, path, appName)
|
|
||||||
if tooltipHyperlink then
|
|
||||||
tooltip:SetHyperlink(tooltipHyperlink)
|
|
||||||
tooltip:Show()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local name = GetOptionsMemberValue("name", opt, options, path, appName)
|
local name = GetOptionsMemberValue("name", opt, options, path, appName)
|
||||||
local desc = GetOptionsMemberValue("desc", opt, options, path, appName)
|
local desc = GetOptionsMemberValue("desc", opt, options, path, appName)
|
||||||
local usage = GetOptionsMemberValue("usage", opt, options, path, appName)
|
local usage = GetOptionsMemberValue("usage", opt, options, path, appName)
|
||||||
@ -537,7 +535,8 @@ local function OptionOnMouseLeave(widget, event)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function GetFuncName(option)
|
local function GetFuncName(option)
|
||||||
if option.type == "execute" then
|
local type = option.type
|
||||||
|
if type == "execute" then
|
||||||
return "func"
|
return "func"
|
||||||
else
|
else
|
||||||
return "set"
|
return "set"
|
||||||
@ -545,15 +544,13 @@ local function GetFuncName(option)
|
|||||||
end
|
end
|
||||||
do
|
do
|
||||||
local frame = AceConfigDialog.popup
|
local frame = AceConfigDialog.popup
|
||||||
if not frame or oldminor < 81 then
|
if not frame then
|
||||||
frame = CreateFrame("Frame", nil, UIParent)
|
frame = CreateFrame("Frame", nil, UIParent)
|
||||||
AceConfigDialog.popup = frame
|
AceConfigDialog.popup = frame
|
||||||
frame:Hide()
|
frame:Hide()
|
||||||
frame:SetPoint("CENTER", UIParent, "CENTER")
|
frame:SetPoint("CENTER", UIParent, "CENTER")
|
||||||
frame:SetSize(320, 72)
|
frame:SetSize(320, 72)
|
||||||
frame:EnableMouse(true) -- Do not allow click-through on the frame
|
|
||||||
frame:SetFrameStrata("TOOLTIP")
|
frame:SetFrameStrata("TOOLTIP")
|
||||||
frame:SetFrameLevel(100) -- Lots of room to draw under it
|
|
||||||
frame:SetScript("OnKeyDown", function(self, key)
|
frame:SetScript("OnKeyDown", function(self, key)
|
||||||
if key == "ESCAPE" then
|
if key == "ESCAPE" then
|
||||||
self:SetPropagateKeyboardInput(false)
|
self:SetPropagateKeyboardInput(false)
|
||||||
@ -567,17 +564,26 @@ do
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
local border = CreateFrame("Frame", nil, frame, "DialogBorderOpaqueTemplate")
|
if WOW_PROJECT_ID == WOW_PROJECT_CLASSIC then
|
||||||
|
frame:SetBackdrop({
|
||||||
|
bgFile = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
|
||||||
|
edgeFile = [[Interface\DialogFrame\UI-DialogBox-Border]],
|
||||||
|
tile = true,
|
||||||
|
tileSize = 32,
|
||||||
|
edgeSize = 32,
|
||||||
|
insets = { left = 11, right = 11, top = 11, bottom = 11 },
|
||||||
|
})
|
||||||
|
else
|
||||||
|
local border = CreateFrame("Frame", nil, frame, "DialogBorderDarkTemplate")
|
||||||
border:SetAllPoints(frame)
|
border:SetAllPoints(frame)
|
||||||
frame:SetFixedFrameStrata(true)
|
end
|
||||||
frame:SetFixedFrameLevel(true)
|
|
||||||
|
|
||||||
local text = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlight")
|
local text = frame:CreateFontString(nil, "ARTWORK", "GameFontHighlight")
|
||||||
text:SetSize(290, 0)
|
text:SetSize(290, 0)
|
||||||
text:SetPoint("TOP", 0, -16)
|
text:SetPoint("TOP", 0, -16)
|
||||||
frame.text = text
|
frame.text = text
|
||||||
|
|
||||||
local function newButton(newText)
|
local function newButton(text)
|
||||||
local button = CreateFrame("Button", nil, frame)
|
local button = CreateFrame("Button", nil, frame)
|
||||||
button:SetSize(128, 21)
|
button:SetSize(128, 21)
|
||||||
button:SetNormalFontObject(GameFontNormal)
|
button:SetNormalFontObject(GameFontNormal)
|
||||||
@ -588,7 +594,7 @@ do
|
|||||||
button:GetPushedTexture():SetTexCoord(0.0, 1.0, 0.0, 0.71875)
|
button:GetPushedTexture():SetTexCoord(0.0, 1.0, 0.0, 0.71875)
|
||||||
button:SetHighlightTexture(130762) -- "Interface\\Buttons\\UI-DialogBox-Button-Highlight"
|
button:SetHighlightTexture(130762) -- "Interface\\Buttons\\UI-DialogBox-Button-Highlight"
|
||||||
button:GetHighlightTexture():SetTexCoord(0.0, 1.0, 0.0, 0.71875)
|
button:GetHighlightTexture():SetTexCoord(0.0, 1.0, 0.0, 0.71875)
|
||||||
button:SetText(newText)
|
button:SetText(text)
|
||||||
return button
|
return button
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -675,7 +681,7 @@ local function ActivateControl(widget, event, ...)
|
|||||||
if group[funcname] ~= nil then
|
if group[funcname] ~= nil then
|
||||||
func = group[funcname]
|
func = group[funcname]
|
||||||
end
|
end
|
||||||
handler = group.handler
|
handler = group.handler or handler
|
||||||
confirm = group.confirm
|
confirm = group.confirm
|
||||||
validate = group.validate
|
validate = group.validate
|
||||||
for i = 1, #path do
|
for i = 1, #path do
|
||||||
@ -739,6 +745,7 @@ local function ActivateControl(widget, event, ...)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local rootframe = user.rootframe
|
||||||
if not validated or type(validated) == "string" then
|
if not validated or type(validated) == "string" then
|
||||||
if not validated then
|
if not validated then
|
||||||
if usage then
|
if usage then
|
||||||
@ -753,8 +760,8 @@ local function ActivateControl(widget, event, ...)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- show validate message
|
-- show validate message
|
||||||
if user.rootframe.SetStatusText then
|
if rootframe.SetStatusText then
|
||||||
user.rootframe:SetStatusText(validated)
|
rootframe:SetStatusText(validated)
|
||||||
else
|
else
|
||||||
validationErrorPopup(validated)
|
validationErrorPopup(validated)
|
||||||
end
|
end
|
||||||
@ -791,14 +798,14 @@ local function ActivateControl(widget, event, ...)
|
|||||||
if type(confirm) == "boolean" then
|
if type(confirm) == "boolean" then
|
||||||
if confirm then
|
if confirm then
|
||||||
if not confirmText then
|
if not confirmText then
|
||||||
local option_name, desc = option.name, option.desc
|
local name, desc = option.name, option.desc
|
||||||
if type(option_name) == "function" then
|
if type(name) == "function" then
|
||||||
option_name = option_name(info)
|
name = name(info)
|
||||||
end
|
end
|
||||||
if type(desc) == "function" then
|
if type(desc) == "function" then
|
||||||
desc = desc(info)
|
desc = desc(info)
|
||||||
end
|
end
|
||||||
confirmText = option_name
|
confirmText = name
|
||||||
if desc then
|
if desc then
|
||||||
confirmText = confirmText.." - "..desc
|
confirmText = confirmText.." - "..desc
|
||||||
end
|
end
|
||||||
@ -1140,6 +1147,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
|||||||
--Control to feed
|
--Control to feed
|
||||||
local control
|
local control
|
||||||
|
|
||||||
|
local name = GetOptionsMemberValue("name", v, options, path, appName)
|
||||||
|
|
||||||
if v.type == "execute" then
|
if v.type == "execute" then
|
||||||
|
|
||||||
local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
|
local imageCoords = GetOptionsMemberValue("imageCoords",v, options, path, appName)
|
||||||
@ -1242,7 +1251,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
|||||||
end
|
end
|
||||||
tsort(sorting, sortTblAsStrings)
|
tsort(sorting, sortTblAsStrings)
|
||||||
end
|
end
|
||||||
for _, value in ipairs(sorting) do
|
for k, value in ipairs(sorting) do
|
||||||
local text = values[value]
|
local text = values[value]
|
||||||
local radio = gui:Create("CheckBox")
|
local radio = gui:Create("CheckBox")
|
||||||
radio:SetLabel(text)
|
radio:SetLabel(text)
|
||||||
@ -1324,8 +1333,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
|||||||
control:SetWidth(width_multiplier)
|
control:SetWidth(width_multiplier)
|
||||||
end
|
end
|
||||||
--check:SetTriState(v.tristate)
|
--check:SetTriState(v.tristate)
|
||||||
for s = 1, #valuesort do
|
for i = 1, #valuesort do
|
||||||
local key = valuesort[s]
|
local key = valuesort[i]
|
||||||
local value = GetOptionsMemberValue("get",v, options, path, appName, key)
|
local value = GetOptionsMemberValue("get",v, options, path, appName, key)
|
||||||
control:SetItemValue(key,value)
|
control:SetItemValue(key,value)
|
||||||
end
|
end
|
||||||
@ -1337,8 +1346,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
|||||||
|
|
||||||
control:PauseLayout()
|
control:PauseLayout()
|
||||||
local width = GetOptionsMemberValue("width",v,options,path,appName)
|
local width = GetOptionsMemberValue("width",v,options,path,appName)
|
||||||
for s = 1, #valuesort do
|
for i = 1, #valuesort do
|
||||||
local value = valuesort[s]
|
local value = valuesort[i]
|
||||||
local text = values[value]
|
local text = values[value]
|
||||||
local check = gui:Create("CheckBox")
|
local check = gui:Create("CheckBox")
|
||||||
check:SetLabel(text)
|
check:SetLabel(text)
|
||||||
@ -1355,7 +1364,7 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
|||||||
elseif width == "half" then
|
elseif width == "half" then
|
||||||
check:SetWidth(width_multiplier / 2)
|
check:SetWidth(width_multiplier / 2)
|
||||||
elseif (type(width) == "number") then
|
elseif (type(width) == "number") then
|
||||||
check:SetWidth(width_multiplier * width)
|
control:SetWidth(width_multiplier * width)
|
||||||
elseif width == "full" then
|
elseif width == "full" then
|
||||||
check.width = "fill"
|
check.width = "fill"
|
||||||
else
|
else
|
||||||
@ -1425,8 +1434,8 @@ local function FeedOptions(appName, options,container,rootframe,path,group,inlin
|
|||||||
end
|
end
|
||||||
control:SetImageSize(width, height)
|
control:SetImageSize(width, height)
|
||||||
end
|
end
|
||||||
local controlWidth = GetOptionsMemberValue("width",v,options,path,appName)
|
local width = GetOptionsMemberValue("width",v,options,path,appName)
|
||||||
control.width = not controlWidth and "fill"
|
control.width = not width and "fill"
|
||||||
end
|
end
|
||||||
|
|
||||||
--Common Init
|
--Common Init
|
||||||
@ -1681,29 +1690,29 @@ function AceConfigDialog:FeedGroup(appName,options,container,rootframe,path, isR
|
|||||||
|
|
||||||
elseif grouptype == "select" then
|
elseif grouptype == "select" then
|
||||||
|
|
||||||
local selectGroup = gui:Create("DropdownGroup")
|
local select = gui:Create("DropdownGroup")
|
||||||
selectGroup:SetTitle(name)
|
select:SetTitle(name)
|
||||||
InjectInfo(selectGroup, options, group, path, rootframe, appName)
|
InjectInfo(select, options, group, path, rootframe, appName)
|
||||||
selectGroup:SetCallback("OnGroupSelected", GroupSelected)
|
select:SetCallback("OnGroupSelected", GroupSelected)
|
||||||
local status = AceConfigDialog:GetStatusTable(appName, path)
|
local status = AceConfigDialog:GetStatusTable(appName, path)
|
||||||
if not status.groups then
|
if not status.groups then
|
||||||
status.groups = {}
|
status.groups = {}
|
||||||
end
|
end
|
||||||
selectGroup:SetStatusTable(status.groups)
|
select:SetStatusTable(status.groups)
|
||||||
local grouplist, orderlist = BuildSelect(group, options, path, appName)
|
local grouplist, orderlist = BuildSelect(group, options, path, appName)
|
||||||
selectGroup:SetGroupList(grouplist, orderlist)
|
select:SetGroupList(grouplist, orderlist)
|
||||||
selectGroup:SetUserData("grouplist", grouplist)
|
select:SetUserData("grouplist", grouplist)
|
||||||
selectGroup:SetUserData("orderlist", orderlist)
|
select:SetUserData("orderlist", orderlist)
|
||||||
|
|
||||||
local firstgroup = orderlist[1]
|
local firstgroup = orderlist[1]
|
||||||
if firstgroup then
|
if firstgroup then
|
||||||
selectGroup:SetGroup((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or firstgroup)
|
select:SetGroup((GroupExists(appName, options, path,status.groups.selected) and status.groups.selected) or firstgroup)
|
||||||
end
|
end
|
||||||
|
|
||||||
selectGroup.width = "fill"
|
select.width = "fill"
|
||||||
selectGroup.height = "fill"
|
select.height = "fill"
|
||||||
|
|
||||||
container:AddChild(selectGroup)
|
container:AddChild(select)
|
||||||
|
|
||||||
--assume tree group by default
|
--assume tree group by default
|
||||||
--if parenttype is tree then this group is already a node on that tree
|
--if parenttype is tree then this group is already a node on that tree
|
||||||
@ -1931,13 +1940,13 @@ end
|
|||||||
-- convert pre-39 BlizOptions structure to the new format
|
-- convert pre-39 BlizOptions structure to the new format
|
||||||
if oldminor and oldminor < 39 and AceConfigDialog.BlizOptions then
|
if oldminor and oldminor < 39 and AceConfigDialog.BlizOptions then
|
||||||
local old = AceConfigDialog.BlizOptions
|
local old = AceConfigDialog.BlizOptions
|
||||||
local newOpt = {}
|
local new = {}
|
||||||
for key, widget in pairs(old) do
|
for key, widget in pairs(old) do
|
||||||
local appName = widget:GetUserData("appName")
|
local appName = widget:GetUserData("appName")
|
||||||
if not newOpt[appName] then newOpt[appName] = {} end
|
if not new[appName] then new[appName] = {} end
|
||||||
newOpt[appName][key] = widget
|
new[appName][key] = widget
|
||||||
end
|
end
|
||||||
AceConfigDialog.BlizOptions = newOpt
|
AceConfigDialog.BlizOptions = new
|
||||||
else
|
else
|
||||||
AceConfigDialog.BlizOptions = AceConfigDialog.BlizOptions or {}
|
AceConfigDialog.BlizOptions = AceConfigDialog.BlizOptions or {}
|
||||||
end
|
end
|
||||||
@ -1970,7 +1979,6 @@ end
|
|||||||
-- @param parent The parent to use in the interface options tree.
|
-- @param parent The parent to use in the interface options tree.
|
||||||
-- @param ... The path in the options table to feed into the interface options panel.
|
-- @param ... The path in the options table to feed into the interface options panel.
|
||||||
-- @return The reference to the frame registered into the Interface Options.
|
-- @return The reference to the frame registered into the Interface Options.
|
||||||
-- @return The category ID to pass to Settings.OpenToCategory (or InterfaceOptionsFrame_OpenToCategory)
|
|
||||||
function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
|
function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
|
||||||
local BlizOptions = AceConfigDialog.BlizOptions
|
local BlizOptions = AceConfigDialog.BlizOptions
|
||||||
|
|
||||||
@ -1986,6 +1994,7 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
|
|||||||
if not BlizOptions[appName][key] then
|
if not BlizOptions[appName][key] then
|
||||||
local group = gui:Create("BlizOptionsGroup")
|
local group = gui:Create("BlizOptionsGroup")
|
||||||
BlizOptions[appName][key] = group
|
BlizOptions[appName][key] = group
|
||||||
|
group:SetName(name or appName, parent)
|
||||||
|
|
||||||
group:SetTitle(name or appName)
|
group:SetTitle(name or appName)
|
||||||
group:SetUserData("appName", appName)
|
group:SetUserData("appName", appName)
|
||||||
@ -1998,30 +2007,8 @@ function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...)
|
|||||||
end
|
end
|
||||||
group:SetCallback("OnShow", FeedToBlizPanel)
|
group:SetCallback("OnShow", FeedToBlizPanel)
|
||||||
group:SetCallback("OnHide", ClearBlizPanel)
|
group:SetCallback("OnHide", ClearBlizPanel)
|
||||||
if Settings and Settings.RegisterCanvasLayoutCategory then
|
|
||||||
local categoryName = name or appName
|
|
||||||
if parent then
|
|
||||||
local category = Settings.GetCategory(parent)
|
|
||||||
if not category then
|
|
||||||
error(("The parent category '%s' was not found"):format(parent), 2)
|
|
||||||
end
|
|
||||||
local subcategory = Settings.RegisterCanvasLayoutSubcategory(category, group.frame, categoryName)
|
|
||||||
|
|
||||||
-- force the generated ID to be used for subcategories, as these can have very simple names like "Profiles"
|
|
||||||
group:SetName(subcategory.ID, parent)
|
|
||||||
else
|
|
||||||
local category = Settings.RegisterCanvasLayoutCategory(group.frame, categoryName)
|
|
||||||
-- using appName here would be cleaner, but would not be 100% compatible
|
|
||||||
-- but for top-level categories it should be fine, as these are typically addon names
|
|
||||||
category.ID = categoryName
|
|
||||||
group:SetName(categoryName, parent)
|
|
||||||
Settings.RegisterAddOnCategory(category)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
group:SetName(name or appName, parent)
|
|
||||||
InterfaceOptions_AddCategory(group.frame)
|
InterfaceOptions_AddCategory(group.frame)
|
||||||
end
|
return group.frame
|
||||||
return group.frame, group.frame.name
|
|
||||||
else
|
else
|
||||||
error(("%s has already been added to the Blizzard Options Window with the given path"):format(appName), 2)
|
error(("%s has already been added to the Blizzard Options Window with the given path"):format(appName), 2)
|
||||||
end
|
end
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
|
-- :IterateOptionsTables() (and :GetOptionsTable() if only given one argument) return a function reference that the requesting config handling addon must call with valid "uiType", "uiName".
|
||||||
-- @class file
|
-- @class file
|
||||||
-- @name AceConfigRegistry-3.0
|
-- @name AceConfigRegistry-3.0
|
||||||
-- @release $Id: AceConfigRegistry-3.0.lua 1296 2022-11-04 18:50:10Z nevcairiel $
|
-- @release $Id: AceConfigRegistry-3.0.lua 1207 2019-06-23 12:08:33Z nevcairiel $
|
||||||
local CallbackHandler = LibStub("CallbackHandler-1.0")
|
local CallbackHandler = LibStub("CallbackHandler-1.0")
|
||||||
|
|
||||||
local MAJOR, MINOR = "AceConfigRegistry-3.0", 21
|
local MAJOR, MINOR = "AceConfigRegistry-3.0", 20
|
||||||
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
|
local AceConfigRegistry = LibStub:NewLibrary(MAJOR, MINOR)
|
||||||
|
|
||||||
if not AceConfigRegistry then return end
|
if not AceConfigRegistry then return end
|
||||||
@ -83,7 +83,6 @@ local basekeys={
|
|||||||
dialogHidden=optmethodbool,
|
dialogHidden=optmethodbool,
|
||||||
dropdownHidden=optmethodbool,
|
dropdownHidden=optmethodbool,
|
||||||
cmdHidden=optmethodbool,
|
cmdHidden=optmethodbool,
|
||||||
tooltipHyperlink=optstringfunc,
|
|
||||||
icon=optstringnumberfunc,
|
icon=optstringnumberfunc,
|
||||||
iconCoords=optmethodtable,
|
iconCoords=optmethodtable,
|
||||||
handler=opttable,
|
handler=opttable,
|
||||||
|
@ -40,8 +40,8 @@
|
|||||||
-- end
|
-- end
|
||||||
-- @class file
|
-- @class file
|
||||||
-- @name AceDB-3.0.lua
|
-- @name AceDB-3.0.lua
|
||||||
-- @release $Id: AceDB-3.0.lua 1306 2023-06-23 14:55:09Z nevcairiel $
|
-- @release $Id: AceDB-3.0.lua 1217 2019-07-11 03:06:18Z funkydude $
|
||||||
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 28
|
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 27
|
||||||
local AceDB = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
|
local AceDB = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)
|
||||||
|
|
||||||
if not AceDB then return end -- No upgrade needed
|
if not AceDB then return end -- No upgrade needed
|
||||||
@ -53,6 +53,10 @@ local setmetatable, rawset, rawget = setmetatable, rawset, rawget
|
|||||||
-- WoW APIs
|
-- WoW APIs
|
||||||
local _G = _G
|
local _G = _G
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: LibStub
|
||||||
|
|
||||||
AceDB.db_registry = AceDB.db_registry or {}
|
AceDB.db_registry = AceDB.db_registry or {}
|
||||||
AceDB.frame = AceDB.frame or CreateFrame("Frame")
|
AceDB.frame = AceDB.frame or CreateFrame("Frame")
|
||||||
|
|
||||||
@ -94,11 +98,11 @@ local function copyDefaults(dest, src)
|
|||||||
-- This is a metatable used for table defaults
|
-- This is a metatable used for table defaults
|
||||||
local mt = {
|
local mt = {
|
||||||
-- This handles the lookup and creation of new subtables
|
-- This handles the lookup and creation of new subtables
|
||||||
__index = function(t,k2)
|
__index = function(t,k)
|
||||||
if k2 == nil then return nil end
|
if k == nil then return nil end
|
||||||
local tbl = {}
|
local tbl = {}
|
||||||
copyDefaults(tbl, v)
|
copyDefaults(tbl, v)
|
||||||
rawset(t, k2, tbl)
|
rawset(t, k, tbl)
|
||||||
return tbl
|
return tbl
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
@ -111,7 +115,7 @@ local function copyDefaults(dest, src)
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- Values are not tables, so this is just a simple return
|
-- Values are not tables, so this is just a simple return
|
||||||
local mt = {__index = function(t,k2) return k2~=nil and v or nil end}
|
local mt = {__index = function(t,k) return k~=nil and v or nil end}
|
||||||
setmetatable(dest, mt)
|
setmetatable(dest, mt)
|
||||||
end
|
end
|
||||||
elseif type(v) == "table" then
|
elseif type(v) == "table" then
|
||||||
@ -260,7 +264,7 @@ local factionrealmKey = factionKey .. " - " .. realmKey
|
|||||||
local localeKey = GetLocale():lower()
|
local localeKey = GetLocale():lower()
|
||||||
|
|
||||||
local regionTable = { "US", "KR", "EU", "TW", "CN" }
|
local regionTable = { "US", "KR", "EU", "TW", "CN" }
|
||||||
local regionKey = regionTable[GetCurrentRegion()] or GetCurrentRegionName() or "TR"
|
local regionKey = regionTable[GetCurrentRegion()]
|
||||||
local factionrealmregionKey = factionrealmKey .. " - " .. regionKey
|
local factionrealmregionKey = factionrealmKey .. " - " .. regionKey
|
||||||
|
|
||||||
-- Actual database initialization function
|
-- Actual database initialization function
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--- AceDBOptions-3.0 provides a universal AceConfig options screen for managing AceDB-3.0 profiles.
|
--- AceDBOptions-3.0 provides a universal AceConfig options screen for managing AceDB-3.0 profiles.
|
||||||
-- @class file
|
-- @class file
|
||||||
-- @name AceDBOptions-3.0
|
-- @name AceDBOptions-3.0
|
||||||
-- @release $Id: AceDBOptions-3.0.lua 1304 2023-05-19 19:50:10Z nevcairiel $
|
-- @release $Id: AceDBOptions-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
|
||||||
local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 15
|
local ACEDBO_MAJOR, ACEDBO_MINOR = "AceDBOptions-3.0", 15
|
||||||
local AceDBOptions = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)
|
local AceDBOptions = LibStub:NewLibrary(ACEDBO_MAJOR, ACEDBO_MINOR)
|
||||||
|
|
||||||
@ -13,6 +13,10 @@ local pairs, next = pairs, next
|
|||||||
-- WoW APIs
|
-- WoW APIs
|
||||||
local UnitClass = UnitClass
|
local UnitClass = UnitClass
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: NORMAL_FONT_COLOR_CODE, FONT_COLOR_CODE_CLOSE
|
||||||
|
|
||||||
AceDBOptions.optionTables = AceDBOptions.optionTables or {}
|
AceDBOptions.optionTables = AceDBOptions.optionTables or {}
|
||||||
AceDBOptions.handlers = AceDBOptions.handlers or {}
|
AceDBOptions.handlers = AceDBOptions.handlers or {}
|
||||||
|
|
||||||
@ -84,25 +88,25 @@ elseif LOCALE == "frFR" then
|
|||||||
L["reset_desc"] = "Réinitialise le profil actuel au cas où votre configuration est corrompue ou si vous voulez tout simplement faire table rase."
|
L["reset_desc"] = "Réinitialise le profil actuel au cas où votre configuration est corrompue ou si vous voulez tout simplement faire table rase."
|
||||||
L["reset_sub"] = "Réinitialise le profil actuel avec les paramètres par défaut."
|
L["reset_sub"] = "Réinitialise le profil actuel avec les paramètres par défaut."
|
||||||
elseif LOCALE == "koKR" then
|
elseif LOCALE == "koKR" then
|
||||||
L["choose"] = "기존 프로필"
|
L["choose"] = "저장 중인 프로필"
|
||||||
L["choose_desc"] = "편집 상자에 이름을 입력하여 새로운 프로필을 만들거나 이미 존재하는 프로필 중 하나를 선택할 수 있습니다."
|
L["choose_desc"] = "입력창에 새로운 이름을 입력하거나 저장 중인 프로필 중 하나를 선택하여 새로운 프로필을 만들 수 있습니다."
|
||||||
L["choose_sub"] = "현재 이용할 수 있는 프로필 중 하나를 선택합니다."
|
L["choose_sub"] = "현재 이용할 수 있는 프로필 중 하나를 선택합니다."
|
||||||
L["copy"] = "복사해 올 프로필"
|
L["copy"] = "복사해오기"
|
||||||
L["copy_desc"] = "기존 프로필의 설정을 현재 활성화된 프로필로 복사합니다."
|
L["copy_desc"] = "현재 사용 중인 프로필에 선택한 프로필의 설정을 복사합니다."
|
||||||
L["current"] = "현재 프로필:"
|
L["current"] = "현재 프로필:"
|
||||||
L["default"] = "기본값"
|
L["default"] = "기본값"
|
||||||
L["delete"] = "프로필 삭제"
|
L["delete"] = "프로필 삭제"
|
||||||
L["delete_confirm"] = "선택한 프로필을 삭제하시겠습니까?"
|
L["delete_confirm"] = "정말로 선택한 프로필을 삭제할까요?"
|
||||||
L["delete_desc"] = "데이터베이스에서 기존 프로필과 사용하지 않는 프로필을 삭제하여 공간을 절약하고 SavedVariables 파일을 정리합니다."
|
L["delete_desc"] = "저장 공간 절약과 SavedVariables 파일의 정리를 위해 데이터베이스에서 사용하지 않는 프로필을 삭제하세요."
|
||||||
L["delete_sub"] = "데이터베이스에서 프로필을 삭제합니다."
|
L["delete_sub"] = "데이터베이스의 프로필을 삭제합니다."
|
||||||
L["intro"] = "활성 데이터베이스 프로필을 변경할 수 있으며, 모든 캐릭터마다 서로 다른 설정을 지정할 수 있습니다."
|
L["intro"] = "활성 데이터베이스 프로필을 변경할 수 있고, 각 캐릭터 별로 다른 설정을 할 수 있습니다."
|
||||||
L["new"] = "새로운 프로필"
|
L["new"] = "새로운 프로필"
|
||||||
L["new_sub"] = "비어 있는 프로필을 새로 만듭니다."
|
L["new_sub"] = "새로운 프로필을 만듭니다."
|
||||||
L["profiles"] = "프로필"
|
L["profiles"] = "프로필"
|
||||||
L["profiles_sub"] = "프로필 관리"
|
L["profiles_sub"] = "프로필 관리"
|
||||||
L["reset"] = "프로필 재설정"
|
L["reset"] = "프로필 초기화"
|
||||||
L["reset_desc"] = "구성이 손상되었거나 처음부터 다시 시작하고 싶은 경우 현재 프로필을 기본값으로 재설정하세요."
|
L["reset_desc"] = "설정이 깨졌거나 처음부터 다시 설정을 원하는 경우, 현재 프로필을 기본값으로 초기화하세요."
|
||||||
L["reset_sub"] = "현재 프로필을 기본값으로 재설정합니다"
|
L["reset_sub"] = "현재 프로필을 기본값으로 초기화합니다"
|
||||||
elseif LOCALE == "esES" or LOCALE == "esMX" then
|
elseif LOCALE == "esES" or LOCALE == "esMX" then
|
||||||
L["choose"] = "Perfiles existentes"
|
L["choose"] = "Perfiles existentes"
|
||||||
L["choose_desc"] = "Puedes crear un nuevo perfil introduciendo un nombre en el recuadro o puedes seleccionar un perfil de los ya existentes."
|
L["choose_desc"] = "Puedes crear un nuevo perfil introduciendo un nombre en el recuadro o puedes seleccionar un perfil de los ya existentes."
|
||||||
@ -166,31 +170,31 @@ elseif LOCALE == "zhCN" then
|
|||||||
elseif LOCALE == "ruRU" then
|
elseif LOCALE == "ruRU" then
|
||||||
L["choose"] = "Существующие профили"
|
L["choose"] = "Существующие профили"
|
||||||
L["choose_desc"] = "Вы можете создать новый профиль, введя название в поле ввода, или выбрать один из уже существующих профилей."
|
L["choose_desc"] = "Вы можете создать новый профиль, введя название в поле ввода, или выбрать один из уже существующих профилей."
|
||||||
L["choose_sub"] = "Выбор одного из уже доступных профилей."
|
L["choose_sub"] = "Выбор одиного из уже доступных профилей"
|
||||||
L["copy"] = "Скопировать из"
|
L["copy"] = "Скопировать из"
|
||||||
L["copy_desc"] = "Копирование настроек из выбранного профиля в активный."
|
L["copy_desc"] = "Скопировать настройки из выбранного профиля в активный."
|
||||||
L["current"] = "Текущий профиль:"
|
L["current"] = "Текущий профиль:"
|
||||||
L["default"] = "По умолчанию"
|
L["default"] = "По умолчанию"
|
||||||
L["delete"] = "Удалить профиль"
|
L["delete"] = "Удалить профиль"
|
||||||
L["delete_confirm"] = "Вы уверены, что хотите удалить выбранный профиль?"
|
L["delete_confirm"] = "Вы уверены, что вы хотите удалить выбранный профиль?"
|
||||||
L["delete_desc"] = "Удаление существующего и неиспользуемого профиля из базы данных для сохранения места, и очистка файла SavedVariables."
|
L["delete_desc"] = "Удалить существующий и неиспользуемый профиль из БД для сохранения места, и очистить SavedVariables файл."
|
||||||
L["delete_sub"] = "Удаление профиля из базы данных."
|
L["delete_sub"] = "Удаление профиля из БД"
|
||||||
L["intro"] = "Изменяя активный профиль, Вы можете задать разные настройки для каждого персонажа."
|
L["intro"] = "Изменяя активный профиль, вы можете задать различные настройки модификаций для каждого персонажа."
|
||||||
L["new"] = "Новый"
|
L["new"] = "Новый"
|
||||||
L["new_sub"] = "Создание нового чистого профиля."
|
L["new_sub"] = "Создать новый чистый профиль"
|
||||||
L["profiles"] = "Профили"
|
L["profiles"] = "Профили"
|
||||||
L["profiles_sub"] = "Управление профилями"
|
L["profiles_sub"] = "Управление профилями"
|
||||||
L["reset"] = "Сбросить профиль"
|
L["reset"] = "Сброс профиля"
|
||||||
L["reset_desc"] = "Сброс текущего профиля к стандартным настройкам, если Ваша конфигурация испорчена или Вы хотите настроить все заново."
|
L["reset_desc"] = "Сбросить текущий профиль к стандартным настройкам, если ваша конфигурация испорчена или вы хотите настроить всё заново."
|
||||||
L["reset_sub"] = "Сброс текущего профиля на стандартный"
|
L["reset_sub"] = "Сброс текущего профиля на стандартный"
|
||||||
elseif LOCALE == "itIT" then
|
elseif LOCALE == "itIT" then
|
||||||
L["choose"] = "Profili Esistenti"
|
L["choose"] = "Profili Esistenti"
|
||||||
L["choose_desc"] = "Puoi creare un nuovo profilo digitando il nome della casella di testo, oppure scegliendone uno tra i profili già esistenti."
|
L["choose_desc"] = "Puoi creare un nuovo profilo digitando il nome della casella di testo, oppure scegliendone uno tra i profili già esistenti."
|
||||||
L["choose_sub"] = "Seleziona uno dei profili attualmente disponibili."
|
L["choose_sub"] = "Seleziona uno dei profili attualmente disponibili."
|
||||||
L["copy"] = "Copia Da"
|
L["copy"] = "Copia Da"
|
||||||
L["copy_desc"] = "Copia le impostazioni da un profilo esistente nel profilo attivo in questo momento."
|
L["copy_desc"] = "Copia le impostazioni da un profilo esistente, nel profilo attivo in questo momento."
|
||||||
L["current"] = "Profilo Attivo:"
|
L["current"] = "Profilo Attivo:"
|
||||||
L["default"] = "Predefinito"
|
L["default"] = "Standard"
|
||||||
L["delete"] = "Cancella un Profilo"
|
L["delete"] = "Cancella un Profilo"
|
||||||
L["delete_confirm"] = "Sei sicuro di voler cancellare il profilo selezionato?"
|
L["delete_confirm"] = "Sei sicuro di voler cancellare il profilo selezionato?"
|
||||||
L["delete_desc"] = "Cancella i profili non utilizzati dal database per risparmiare spazio e mantenere puliti i file di configurazione SavedVariables."
|
L["delete_desc"] = "Cancella i profili non utilizzati dal database per risparmiare spazio e mantenere puliti i file di configurazione SavedVariables."
|
||||||
|
@ -24,22 +24,28 @@
|
|||||||
-- f:AddChild(btn)
|
-- f:AddChild(btn)
|
||||||
-- @class file
|
-- @class file
|
||||||
-- @name AceGUI-3.0
|
-- @name AceGUI-3.0
|
||||||
-- @release $Id: AceGUI-3.0.lua 1288 2022-09-25 14:19:00Z funkehdude $
|
-- @release $Id: AceGUI-3.0.lua 1231 2020-04-14 22:20:36Z nevcairiel $
|
||||||
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 41
|
local ACEGUI_MAJOR, ACEGUI_MINOR = "AceGUI-3.0", 41
|
||||||
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
|
local AceGUI, oldminor = LibStub:NewLibrary(ACEGUI_MAJOR, ACEGUI_MINOR)
|
||||||
|
|
||||||
if not AceGUI then return end -- No upgrade needed
|
if not AceGUI then return end -- No upgrade needed
|
||||||
|
|
||||||
-- Lua APIs
|
-- Lua APIs
|
||||||
local tinsert, wipe = table.insert, table.wipe
|
local tinsert = table.insert
|
||||||
local select, pairs, next, type = select, pairs, next, type
|
local select, pairs, next, type = select, pairs, next, type
|
||||||
local error, assert = error, assert
|
local error, assert = error, assert
|
||||||
local setmetatable, rawget = setmetatable, rawget
|
local setmetatable, rawget = setmetatable, rawget
|
||||||
local math_max, math_min, math_ceil = math.max, math.min, math.ceil
|
local math_max = math.max
|
||||||
|
|
||||||
-- WoW APIs
|
-- WoW APIs
|
||||||
local UIParent = UIParent
|
local UIParent = UIParent
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: geterrorhandler, LibStub
|
||||||
|
|
||||||
|
--local con = LibStub("AceConsole-3.0",true)
|
||||||
|
|
||||||
AceGUI.WidgetRegistry = AceGUI.WidgetRegistry or {}
|
AceGUI.WidgetRegistry = AceGUI.WidgetRegistry or {}
|
||||||
AceGUI.LayoutRegistry = AceGUI.LayoutRegistry or {}
|
AceGUI.LayoutRegistry = AceGUI.LayoutRegistry or {}
|
||||||
AceGUI.WidgetBase = AceGUI.WidgetBase or {}
|
AceGUI.WidgetBase = AceGUI.WidgetBase or {}
|
||||||
@ -88,38 +94,38 @@ do
|
|||||||
AceGUI.objPools = AceGUI.objPools or {}
|
AceGUI.objPools = AceGUI.objPools or {}
|
||||||
local objPools = AceGUI.objPools
|
local objPools = AceGUI.objPools
|
||||||
--Returns a new instance, if none are available either returns a new table or calls the given contructor
|
--Returns a new instance, if none are available either returns a new table or calls the given contructor
|
||||||
function newWidget(widgetType)
|
function newWidget(type)
|
||||||
if not WidgetRegistry[widgetType] then
|
if not WidgetRegistry[type] then
|
||||||
error("Attempt to instantiate unknown widget type", 2)
|
error("Attempt to instantiate unknown widget type", 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not objPools[widgetType] then
|
if not objPools[type] then
|
||||||
objPools[widgetType] = {}
|
objPools[type] = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
local newObj = next(objPools[widgetType])
|
local newObj = next(objPools[type])
|
||||||
if not newObj then
|
if not newObj then
|
||||||
newObj = WidgetRegistry[widgetType]()
|
newObj = WidgetRegistry[type]()
|
||||||
newObj.AceGUIWidgetVersion = WidgetVersions[widgetType]
|
newObj.AceGUIWidgetVersion = WidgetVersions[type]
|
||||||
else
|
else
|
||||||
objPools[widgetType][newObj] = nil
|
objPools[type][newObj] = nil
|
||||||
-- if the widget is older then the latest, don't even try to reuse it
|
-- if the widget is older then the latest, don't even try to reuse it
|
||||||
-- just forget about it, and grab a new one.
|
-- just forget about it, and grab a new one.
|
||||||
if not newObj.AceGUIWidgetVersion or newObj.AceGUIWidgetVersion < WidgetVersions[widgetType] then
|
if not newObj.AceGUIWidgetVersion or newObj.AceGUIWidgetVersion < WidgetVersions[type] then
|
||||||
return newWidget(widgetType)
|
return newWidget(type)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return newObj
|
return newObj
|
||||||
end
|
end
|
||||||
-- Releases an instance to the Pool
|
-- Releases an instance to the Pool
|
||||||
function delWidget(obj,widgetType)
|
function delWidget(obj,type)
|
||||||
if not objPools[widgetType] then
|
if not objPools[type] then
|
||||||
objPools[widgetType] = {}
|
objPools[type] = {}
|
||||||
end
|
end
|
||||||
if objPools[widgetType][obj] then
|
if objPools[type][obj] then
|
||||||
error("Attempt to Release Widget that is already released", 2)
|
error("Attempt to Release Widget that is already released", 2)
|
||||||
end
|
end
|
||||||
objPools[widgetType][obj] = true
|
objPools[type][obj] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -135,9 +141,9 @@ end
|
|||||||
-- OnAcquire function on it, before returning.
|
-- OnAcquire function on it, before returning.
|
||||||
-- @param type The type of the widget.
|
-- @param type The type of the widget.
|
||||||
-- @return The newly created widget.
|
-- @return The newly created widget.
|
||||||
function AceGUI:Create(widgetType)
|
function AceGUI:Create(type)
|
||||||
if WidgetRegistry[widgetType] then
|
if WidgetRegistry[type] then
|
||||||
local widget = newWidget(widgetType)
|
local widget = newWidget(type)
|
||||||
|
|
||||||
if rawget(widget, "Acquire") then
|
if rawget(widget, "Acquire") then
|
||||||
widget.OnAcquire = widget.Acquire
|
widget.OnAcquire = widget.Acquire
|
||||||
@ -155,7 +161,7 @@ function AceGUI:Create(widgetType)
|
|||||||
if widget.OnAcquire then
|
if widget.OnAcquire then
|
||||||
widget:OnAcquire()
|
widget:OnAcquire()
|
||||||
else
|
else
|
||||||
error(("Widget type %s doesn't supply an OnAcquire Function"):format(widgetType))
|
error(("Widget type %s doesn't supply an OnAcquire Function"):format(type))
|
||||||
end
|
end
|
||||||
-- Set the default Layout ("List")
|
-- Set the default Layout ("List")
|
||||||
safecall(widget.SetLayout, widget, "List")
|
safecall(widget.SetLayout, widget, "List")
|
||||||
@ -583,25 +589,25 @@ AceGUI.counts = AceGUI.counts or {}
|
|||||||
-- This is used by widgets that require a named frame, e.g. when a Blizzard
|
-- This is used by widgets that require a named frame, e.g. when a Blizzard
|
||||||
-- Template requires it.
|
-- Template requires it.
|
||||||
-- @param type The widget type
|
-- @param type The widget type
|
||||||
function AceGUI:GetNextWidgetNum(widgetType)
|
function AceGUI:GetNextWidgetNum(type)
|
||||||
if not self.counts[widgetType] then
|
if not self.counts[type] then
|
||||||
self.counts[widgetType] = 0
|
self.counts[type] = 0
|
||||||
end
|
end
|
||||||
self.counts[widgetType] = self.counts[widgetType] + 1
|
self.counts[type] = self.counts[type] + 1
|
||||||
return self.counts[widgetType]
|
return self.counts[type]
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Return the number of created widgets for this type.
|
--- Return the number of created widgets for this type.
|
||||||
-- In contrast to GetNextWidgetNum, the number is not incremented.
|
-- In contrast to GetNextWidgetNum, the number is not incremented.
|
||||||
-- @param widgetType The widget type
|
-- @param type The widget type
|
||||||
function AceGUI:GetWidgetCount(widgetType)
|
function AceGUI:GetWidgetCount(type)
|
||||||
return self.counts[widgetType] or 0
|
return self.counts[type] or 0
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Return the version of the currently registered widget type.
|
--- Return the version of the currently registered widget type.
|
||||||
-- @param widgetType The widget type
|
-- @param type The widget type
|
||||||
function AceGUI:GetWidgetVersion(widgetType)
|
function AceGUI:GetWidgetVersion(type)
|
||||||
return WidgetVersions[widgetType]
|
return WidgetVersions[type]
|
||||||
end
|
end
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
@ -764,6 +770,7 @@ AceGUI:RegisterLayout("Flow",
|
|||||||
|
|
||||||
usedwidth = 0
|
usedwidth = 0
|
||||||
rowstart = frame
|
rowstart = frame
|
||||||
|
rowstartoffset = frameoffset
|
||||||
|
|
||||||
if child.DoLayout then
|
if child.DoLayout then
|
||||||
child:DoLayout()
|
child:DoLayout()
|
||||||
@ -806,8 +813,7 @@ local GetCellAlign = function (dir, tableObj, colObj, cellObj, cell, child)
|
|||||||
or colObj and (colObj["align" .. dir] or colObj.align)
|
or colObj and (colObj["align" .. dir] or colObj.align)
|
||||||
or tableObj["align" .. dir] or tableObj.align
|
or tableObj["align" .. dir] or tableObj.align
|
||||||
or "CENTERLEFT"
|
or "CENTERLEFT"
|
||||||
local val
|
local child, cell, val = child or 0, cell or 0, nil
|
||||||
child, cell = child or 0, cell or 0
|
|
||||||
|
|
||||||
if type(fn) == "string" then
|
if type(fn) == "string" then
|
||||||
fn = fn:lower()
|
fn = fn:lower()
|
||||||
@ -821,7 +827,7 @@ local GetCellAlign = function (dir, tableObj, colObj, cellObj, cell, child)
|
|||||||
val = fn
|
val = fn
|
||||||
end
|
end
|
||||||
|
|
||||||
return fn, math_max(0, math_min(val, cell))
|
return fn, max(0, min(val, cell))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Get width or height for multiple cells combined
|
-- Get width or height for multiple cells combined
|
||||||
@ -830,7 +836,7 @@ local GetCellDimension = function (dir, laneDim, from, to, space)
|
|||||||
for cell=from,to do
|
for cell=from,to do
|
||||||
dim = dim + (laneDim[cell] or 0)
|
dim = dim + (laneDim[cell] or 0)
|
||||||
end
|
end
|
||||||
return dim + math_max(0, to - from) * (space or 0)
|
return dim + max(0, to - from) * (space or 0)
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ Options
|
--[[ Options
|
||||||
@ -876,7 +882,7 @@ AceGUI:RegisterLayout("Table",
|
|||||||
repeat
|
repeat
|
||||||
n = n + 1
|
n = n + 1
|
||||||
local col = (n - 1) % #cols + 1
|
local col = (n - 1) % #cols + 1
|
||||||
local row = math_ceil(n / #cols)
|
local row = ceil(n / #cols)
|
||||||
local rowspan = rowspans[col]
|
local rowspan = rowspans[col]
|
||||||
local cell = rowspan and rowspan.child or child
|
local cell = rowspan and rowspan.child or child
|
||||||
local cellObj = cell:GetUserData("cell")
|
local cellObj = cell:GetUserData("cell")
|
||||||
@ -892,7 +898,7 @@ AceGUI:RegisterLayout("Table",
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Colspan
|
-- Colspan
|
||||||
local colspan = math_max(0, math_min((cellObj and cellObj.colspan or 1) - 1, #cols - col))
|
local colspan = max(0, min((cellObj and cellObj.colspan or 1) - 1, #cols - col))
|
||||||
n = n + colspan
|
n = n + colspan
|
||||||
|
|
||||||
-- Place the cell
|
-- Place the cell
|
||||||
@ -909,7 +915,7 @@ AceGUI:RegisterLayout("Table",
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local rows = math_ceil(n / #cols)
|
local rows = ceil(n / #cols)
|
||||||
|
|
||||||
-- Determine fixed size cols and collect weights
|
-- Determine fixed size cols and collect weights
|
||||||
local extantH, totalWeight = totalH, 0
|
local extantH, totalWeight = totalH, 0
|
||||||
@ -934,16 +940,16 @@ AceGUI:RegisterLayout("Table",
|
|||||||
f:ClearAllPoints()
|
f:ClearAllPoints()
|
||||||
local childH = f:GetWidth() or 0
|
local childH = f:GetWidth() or 0
|
||||||
|
|
||||||
laneH[col] = math_max(laneH[col], childH - GetCellDimension("H", laneH, colStart[child], col - 1, spaceH))
|
laneH[col] = max(laneH[col], childH - GetCellDimension("H", laneH, colStart[child], col - 1, spaceH))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
laneH[col] = math_max(colObj.min or colObj[1] or 0, math_min(laneH[col], colObj.max or colObj[2] or laneH[col]))
|
laneH[col] = max(colObj.min or colObj[1] or 0, min(laneH[col], colObj.max or colObj[2] or laneH[col]))
|
||||||
else
|
else
|
||||||
-- Rel./Abs. width
|
-- Rel./Abs. width
|
||||||
laneH[col] = colObj.width < 1 and colObj.width * totalH or colObj.width
|
laneH[col] = colObj.width < 1 and colObj.width * totalH or colObj.width
|
||||||
end
|
end
|
||||||
extantH = math_max(0, extantH - laneH[col])
|
extantH = max(0, extantH - laneH[col])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -982,7 +988,7 @@ AceGUI:RegisterLayout("Table",
|
|||||||
child:DoLayout()
|
child:DoLayout()
|
||||||
end
|
end
|
||||||
|
|
||||||
rowV = math_max(rowV, (f:GetHeight() or 0) - GetCellDimension("V", laneV, rowStart[child], row - 1, spaceV))
|
rowV = max(rowV, (f:GetHeight() or 0) - GetCellDimension("V", laneV, rowStart[child], row - 1, spaceV))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
BlizOptionsGroup Container
|
BlizOptionsGroup Container
|
||||||
Simple container widget for the integration of AceGUI into the Blizzard Interface Options
|
Simple container widget for the integration of AceGUI into the Blizzard Interface Options
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
local Type, Version = "BlizOptionsGroup", 26
|
local Type, Version = "BlizOptionsGroup", 21
|
||||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ local methods = {
|
|||||||
Constructor
|
Constructor
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
local function Constructor()
|
local function Constructor()
|
||||||
local frame = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
|
local frame = CreateFrame("Frame")
|
||||||
frame:Hide()
|
frame:Hide()
|
||||||
|
|
||||||
-- support functions for the Blizzard Interface Options
|
-- support functions for the Blizzard Interface Options
|
||||||
@ -108,11 +108,6 @@ local function Constructor()
|
|||||||
frame.default = default
|
frame.default = default
|
||||||
frame.refresh = refresh
|
frame.refresh = refresh
|
||||||
|
|
||||||
-- 10.0 support function aliases (cancel has been removed)
|
|
||||||
frame.OnCommit = okay
|
|
||||||
frame.OnDefault = default
|
|
||||||
frame.OnRefresh = refresh
|
|
||||||
|
|
||||||
frame:SetScript("OnHide", OnHide)
|
frame:SetScript("OnHide", OnHide)
|
||||||
frame:SetScript("OnShow", OnShow)
|
frame:SetScript("OnShow", OnShow)
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ local function Constructor()
|
|||||||
dropdown.frame:Show()
|
dropdown.frame:Show()
|
||||||
dropdown:SetLabel("")
|
dropdown:SetLabel("")
|
||||||
|
|
||||||
local border = CreateFrame("Frame", nil, frame, "BackdropTemplate")
|
local border = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
border:SetPoint("TOPLEFT", 0, -26)
|
border:SetPoint("TOPLEFT", 0, -26)
|
||||||
border:SetPoint("BOTTOMRIGHT", 0, 3)
|
border:SetPoint("BOTTOMRIGHT", 0, 3)
|
||||||
border:SetBackdrop(PaneBackdrop)
|
border:SetBackdrop(PaneBackdrop)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
Frame Container
|
Frame Container
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
local Type, Version = "Frame", 30
|
local Type, Version = "Frame", 27
|
||||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||||
|
|
||||||
@ -13,6 +13,10 @@ local wipe = table.wipe
|
|||||||
local PlaySound = PlaySound
|
local PlaySound = PlaySound
|
||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: CLOSE
|
||||||
|
|
||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
Scripts
|
Scripts
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
@ -79,7 +83,6 @@ local methods = {
|
|||||||
["OnAcquire"] = function(self)
|
["OnAcquire"] = function(self)
|
||||||
self.frame:SetParent(UIParent)
|
self.frame:SetParent(UIParent)
|
||||||
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
self.frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||||
self.frame:SetFrameLevel(100) -- Lots of room to draw under it
|
|
||||||
self:SetTitle()
|
self:SetTitle()
|
||||||
self:SetStatusText()
|
self:SetStatusText()
|
||||||
self:ApplyStatus()
|
self:ApplyStatus()
|
||||||
@ -176,21 +179,16 @@ local PaneBackdrop = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function Constructor()
|
local function Constructor()
|
||||||
local frame = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
|
local frame = CreateFrame("Frame", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
frame:Hide()
|
frame:Hide()
|
||||||
|
|
||||||
frame:EnableMouse(true)
|
frame:EnableMouse(true)
|
||||||
frame:SetMovable(true)
|
frame:SetMovable(true)
|
||||||
frame:SetResizable(true)
|
frame:SetResizable(true)
|
||||||
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
frame:SetFrameStrata("FULLSCREEN_DIALOG")
|
||||||
frame:SetFrameLevel(100) -- Lots of room to draw under it
|
|
||||||
frame:SetBackdrop(FrameBackdrop)
|
frame:SetBackdrop(FrameBackdrop)
|
||||||
frame:SetBackdropColor(0, 0, 0, 1)
|
frame:SetBackdropColor(0, 0, 0, 1)
|
||||||
if frame.SetResizeBounds then -- WoW 10.0
|
|
||||||
frame:SetResizeBounds(400, 200)
|
|
||||||
else
|
|
||||||
frame:SetMinResize(400, 200)
|
frame:SetMinResize(400, 200)
|
||||||
end
|
|
||||||
frame:SetToplevel(true)
|
frame:SetToplevel(true)
|
||||||
frame:SetScript("OnShow", Frame_OnShow)
|
frame:SetScript("OnShow", Frame_OnShow)
|
||||||
frame:SetScript("OnHide", Frame_OnClose)
|
frame:SetScript("OnHide", Frame_OnClose)
|
||||||
@ -203,7 +201,7 @@ local function Constructor()
|
|||||||
closebutton:SetWidth(100)
|
closebutton:SetWidth(100)
|
||||||
closebutton:SetText(CLOSE)
|
closebutton:SetText(CLOSE)
|
||||||
|
|
||||||
local statusbg = CreateFrame("Button", nil, frame, "BackdropTemplate")
|
local statusbg = CreateFrame("Button", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
statusbg:SetPoint("BOTTOMLEFT", 15, 15)
|
statusbg:SetPoint("BOTTOMLEFT", 15, 15)
|
||||||
statusbg:SetPoint("BOTTOMRIGHT", -132, 15)
|
statusbg:SetPoint("BOTTOMRIGHT", -132, 15)
|
||||||
statusbg:SetHeight(24)
|
statusbg:SetHeight(24)
|
||||||
@ -271,7 +269,7 @@ local function Constructor()
|
|||||||
line2:SetHeight(8)
|
line2:SetHeight(8)
|
||||||
line2:SetPoint("BOTTOMRIGHT", -8, 8)
|
line2:SetPoint("BOTTOMRIGHT", -8, 8)
|
||||||
line2:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border
|
line2:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border
|
||||||
x = 0.1 * 8/17
|
local x = 0.1 * 8/17
|
||||||
line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
|
line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
|
||||||
|
|
||||||
local sizer_s = CreateFrame("Frame", nil, frame)
|
local sizer_s = CreateFrame("Frame", nil, frame)
|
||||||
|
@ -75,7 +75,7 @@ local function Constructor()
|
|||||||
titletext:SetJustifyH("LEFT")
|
titletext:SetJustifyH("LEFT")
|
||||||
titletext:SetHeight(18)
|
titletext:SetHeight(18)
|
||||||
|
|
||||||
local border = CreateFrame("Frame", nil, frame, "BackdropTemplate")
|
local border = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
border:SetPoint("TOPLEFT", 0, -17)
|
border:SetPoint("TOPLEFT", 0, -17)
|
||||||
border:SetPoint("BOTTOMRIGHT", -1, 3)
|
border:SetPoint("BOTTOMRIGHT", -1, 3)
|
||||||
border:SetBackdrop(PaneBackdrop)
|
border:SetBackdrop(PaneBackdrop)
|
||||||
|
@ -2,18 +2,22 @@
|
|||||||
TabGroup Container
|
TabGroup Container
|
||||||
Container that uses tabs on top to switch between groups.
|
Container that uses tabs on top to switch between groups.
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
local Type, Version = "TabGroup", 38
|
local Type, Version = "TabGroup", 37
|
||||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||||
|
|
||||||
-- Lua APIs
|
-- Lua APIs
|
||||||
local pairs, ipairs, assert, type, wipe = pairs, ipairs, assert, type, table.wipe
|
local pairs, ipairs, assert, type, wipe = pairs, ipairs, assert, type, wipe
|
||||||
|
|
||||||
-- WoW APIs
|
-- WoW APIs
|
||||||
local PlaySound = PlaySound
|
local PlaySound = PlaySound
|
||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
local _G = _G
|
local _G = _G
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: PanelTemplates_TabResize, PanelTemplates_SetDisabledTabState, PanelTemplates_SelectTab, PanelTemplates_DeselectTab
|
||||||
|
|
||||||
-- local upvalue storage used by BuildTabs
|
-- local upvalue storage used by BuildTabs
|
||||||
local widths = {}
|
local widths = {}
|
||||||
local rowwidths = {}
|
local rowwidths = {}
|
||||||
@ -22,143 +26,6 @@ local rowends = {}
|
|||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
Support functions
|
Support functions
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
|
|
||||||
local function PanelTemplates_TabResize(tab, padding, absoluteSize, minWidth, maxWidth, absoluteTextSize)
|
|
||||||
local tabName = tab:GetName();
|
|
||||||
|
|
||||||
local buttonMiddle = tab.Middle or tab.middleTexture or _G[tabName.."Middle"];
|
|
||||||
local buttonMiddleDisabled = tab.MiddleDisabled or (tabName and _G[tabName.."MiddleDisabled"]);
|
|
||||||
local left = tab.Left or tab.leftTexture or _G[tabName.."Left"];
|
|
||||||
local sideWidths = 2 * left:GetWidth();
|
|
||||||
local tabText = tab.Text or _G[tab:GetName().."Text"];
|
|
||||||
local highlightTexture = tab.HighlightTexture or (tabName and _G[tabName.."HighlightTexture"]);
|
|
||||||
|
|
||||||
local width, tabWidth;
|
|
||||||
local textWidth;
|
|
||||||
if ( absoluteTextSize ) then
|
|
||||||
textWidth = absoluteTextSize;
|
|
||||||
else
|
|
||||||
tabText:SetWidth(0);
|
|
||||||
textWidth = tabText:GetWidth();
|
|
||||||
end
|
|
||||||
-- If there's an absolute size specified then use it
|
|
||||||
if ( absoluteSize ) then
|
|
||||||
if ( absoluteSize < sideWidths) then
|
|
||||||
width = 1;
|
|
||||||
tabWidth = sideWidths
|
|
||||||
else
|
|
||||||
width = absoluteSize - sideWidths;
|
|
||||||
tabWidth = absoluteSize
|
|
||||||
end
|
|
||||||
tabText:SetWidth(width);
|
|
||||||
else
|
|
||||||
-- Otherwise try to use padding
|
|
||||||
if ( padding ) then
|
|
||||||
width = textWidth + padding;
|
|
||||||
else
|
|
||||||
width = textWidth + 24;
|
|
||||||
end
|
|
||||||
-- If greater than the maxWidth then cap it
|
|
||||||
if ( maxWidth and width > maxWidth ) then
|
|
||||||
if ( padding ) then
|
|
||||||
width = maxWidth + padding;
|
|
||||||
else
|
|
||||||
width = maxWidth + 24;
|
|
||||||
end
|
|
||||||
tabText:SetWidth(width);
|
|
||||||
else
|
|
||||||
tabText:SetWidth(0);
|
|
||||||
end
|
|
||||||
if (minWidth and width < minWidth) then
|
|
||||||
width = minWidth;
|
|
||||||
end
|
|
||||||
tabWidth = width + sideWidths;
|
|
||||||
end
|
|
||||||
|
|
||||||
if ( buttonMiddle ) then
|
|
||||||
buttonMiddle:SetWidth(width);
|
|
||||||
end
|
|
||||||
if ( buttonMiddleDisabled ) then
|
|
||||||
buttonMiddleDisabled:SetWidth(width);
|
|
||||||
end
|
|
||||||
|
|
||||||
tab:SetWidth(tabWidth);
|
|
||||||
|
|
||||||
if ( highlightTexture ) then
|
|
||||||
highlightTexture:SetWidth(tabWidth);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function PanelTemplates_DeselectTab(tab)
|
|
||||||
local name = tab:GetName();
|
|
||||||
|
|
||||||
local left = tab.Left or _G[name.."Left"];
|
|
||||||
local middle = tab.Middle or _G[name.."Middle"];
|
|
||||||
local right = tab.Right or _G[name.."Right"];
|
|
||||||
left:Show();
|
|
||||||
middle:Show();
|
|
||||||
right:Show();
|
|
||||||
--tab:UnlockHighlight();
|
|
||||||
tab:Enable();
|
|
||||||
local text = tab.Text or _G[name.."Text"];
|
|
||||||
text:SetPoint("CENTER", tab, "CENTER", (tab.deselectedTextX or 0), (tab.deselectedTextY or 2));
|
|
||||||
|
|
||||||
local leftDisabled = tab.LeftDisabled or _G[name.."LeftDisabled"];
|
|
||||||
local middleDisabled = tab.MiddleDisabled or _G[name.."MiddleDisabled"];
|
|
||||||
local rightDisabled = tab.RightDisabled or _G[name.."RightDisabled"];
|
|
||||||
leftDisabled:Hide();
|
|
||||||
middleDisabled:Hide();
|
|
||||||
rightDisabled:Hide();
|
|
||||||
end
|
|
||||||
|
|
||||||
local function PanelTemplates_SelectTab(tab)
|
|
||||||
local name = tab:GetName();
|
|
||||||
|
|
||||||
local left = tab.Left or _G[name.."Left"];
|
|
||||||
local middle = tab.Middle or _G[name.."Middle"];
|
|
||||||
local right = tab.Right or _G[name.."Right"];
|
|
||||||
left:Hide();
|
|
||||||
middle:Hide();
|
|
||||||
right:Hide();
|
|
||||||
--tab:LockHighlight();
|
|
||||||
tab:Disable();
|
|
||||||
tab:SetDisabledFontObject(GameFontHighlightSmall);
|
|
||||||
local text = tab.Text or _G[name.."Text"];
|
|
||||||
text:SetPoint("CENTER", tab, "CENTER", (tab.selectedTextX or 0), (tab.selectedTextY or -3));
|
|
||||||
|
|
||||||
local leftDisabled = tab.LeftDisabled or _G[name.."LeftDisabled"];
|
|
||||||
local middleDisabled = tab.MiddleDisabled or _G[name.."MiddleDisabled"];
|
|
||||||
local rightDisabled = tab.RightDisabled or _G[name.."RightDisabled"];
|
|
||||||
leftDisabled:Show();
|
|
||||||
middleDisabled:Show();
|
|
||||||
rightDisabled:Show();
|
|
||||||
|
|
||||||
if GameTooltip:IsOwned(tab) then
|
|
||||||
GameTooltip:Hide();
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function PanelTemplates_SetDisabledTabState(tab)
|
|
||||||
local name = tab:GetName();
|
|
||||||
local left = tab.Left or _G[name.."Left"];
|
|
||||||
local middle = tab.Middle or _G[name.."Middle"];
|
|
||||||
local right = tab.Right or _G[name.."Right"];
|
|
||||||
left:Show();
|
|
||||||
middle:Show();
|
|
||||||
right:Show();
|
|
||||||
--tab:UnlockHighlight();
|
|
||||||
tab:Disable();
|
|
||||||
tab.text = tab:GetText();
|
|
||||||
-- Gray out text
|
|
||||||
tab:SetDisabledFontObject(GameFontDisableSmall);
|
|
||||||
local leftDisabled = tab.LeftDisabled or _G[name.."LeftDisabled"];
|
|
||||||
local middleDisabled = tab.MiddleDisabled or _G[name.."MiddleDisabled"];
|
|
||||||
local rightDisabled = tab.RightDisabled or _G[name.."RightDisabled"];
|
|
||||||
leftDisabled:Hide();
|
|
||||||
middleDisabled:Hide();
|
|
||||||
rightDisabled:Hide();
|
|
||||||
end
|
|
||||||
|
|
||||||
local function UpdateTabLook(frame)
|
local function UpdateTabLook(frame)
|
||||||
if frame.disabled then
|
if frame.disabled then
|
||||||
PanelTemplates_SetDisabledTabState(frame)
|
PanelTemplates_SetDisabledTabState(frame)
|
||||||
@ -236,64 +103,11 @@ local methods = {
|
|||||||
|
|
||||||
["CreateTab"] = function(self, id)
|
["CreateTab"] = function(self, id)
|
||||||
local tabname = ("AceGUITabGroup%dTab%d"):format(self.num, id)
|
local tabname = ("AceGUITabGroup%dTab%d"):format(self.num, id)
|
||||||
local tab = CreateFrame("Button", tabname, self.border)
|
local tab = CreateFrame("Button", tabname, self.border, "OptionsFrameTabButtonTemplate")
|
||||||
tab:SetSize(115, 24)
|
|
||||||
tab.deselectedTextY = -3
|
|
||||||
tab.selectedTextY = -2
|
|
||||||
|
|
||||||
tab.LeftDisabled = tab:CreateTexture(tabname .. "LeftDisabled", "BORDER")
|
|
||||||
tab.LeftDisabled:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab")
|
|
||||||
tab.LeftDisabled:SetSize(20, 24)
|
|
||||||
tab.LeftDisabled:SetPoint("BOTTOMLEFT", 0, -3)
|
|
||||||
tab.LeftDisabled:SetTexCoord(0, 0.15625, 0, 1.0)
|
|
||||||
|
|
||||||
tab.MiddleDisabled = tab:CreateTexture(tabname .. "MiddleDisabled", "BORDER")
|
|
||||||
tab.MiddleDisabled:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab")
|
|
||||||
tab.MiddleDisabled:SetSize(88, 24)
|
|
||||||
tab.MiddleDisabled:SetPoint("LEFT", tab.LeftDisabled, "RIGHT")
|
|
||||||
tab.MiddleDisabled:SetTexCoord(0.15625, 0.84375, 0, 1.0)
|
|
||||||
|
|
||||||
tab.RightDisabled = tab:CreateTexture(tabname .. "RightDisabled", "BORDER")
|
|
||||||
tab.RightDisabled:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-ActiveTab")
|
|
||||||
tab.RightDisabled:SetSize(20, 24)
|
|
||||||
tab.RightDisabled:SetPoint("LEFT", tab.MiddleDisabled, "RIGHT")
|
|
||||||
tab.RightDisabled:SetTexCoord(0.84375, 1.0, 0, 1.0)
|
|
||||||
|
|
||||||
tab.Left = tab:CreateTexture(tabname .. "Left", "BORDER")
|
|
||||||
tab.Left:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-InActiveTab")
|
|
||||||
tab.Left:SetSize(20, 24)
|
|
||||||
tab.Left:SetPoint("TOPLEFT")
|
|
||||||
tab.Left:SetTexCoord(0, 0.15625, 0, 1.0)
|
|
||||||
|
|
||||||
tab.Middle = tab:CreateTexture(tabname .. "Middle", "BORDER")
|
|
||||||
tab.Middle:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-InActiveTab")
|
|
||||||
tab.Middle:SetSize(88, 24)
|
|
||||||
tab.Middle:SetPoint("LEFT", tab.Left, "RIGHT")
|
|
||||||
tab.Middle:SetTexCoord(0.15625, 0.84375, 0, 1.0)
|
|
||||||
|
|
||||||
tab.Right = tab:CreateTexture(tabname .. "Right", "BORDER")
|
|
||||||
tab.Right:SetTexture("Interface\\OptionsFrame\\UI-OptionsFrame-InActiveTab")
|
|
||||||
tab.Right:SetSize(20, 24)
|
|
||||||
tab.Right:SetPoint("LEFT", tab.Middle, "RIGHT")
|
|
||||||
tab.Right:SetTexCoord(0.84375, 1.0, 0, 1.0)
|
|
||||||
|
|
||||||
tab.Text = tab:CreateFontString(tabname .. "Text")
|
|
||||||
tab:SetFontString(tab.Text)
|
|
||||||
|
|
||||||
tab:SetNormalFontObject(GameFontNormalSmall)
|
|
||||||
tab:SetHighlightFontObject(GameFontHighlightSmall)
|
|
||||||
tab:SetDisabledFontObject(GameFontHighlightSmall)
|
|
||||||
tab:SetHighlightTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight", "ADD")
|
|
||||||
tab.HighlightTexture = tab:GetHighlightTexture()
|
|
||||||
tab.HighlightTexture:ClearAllPoints()
|
|
||||||
tab.HighlightTexture:SetPoint("LEFT", tab, "LEFT", 10, -4)
|
|
||||||
tab.HighlightTexture:SetPoint("RIGHT", tab, "RIGHT", -10, -4)
|
|
||||||
_G[tabname .. "HighlightTexture"] = tab.HighlightTexture
|
|
||||||
|
|
||||||
tab.obj = self
|
tab.obj = self
|
||||||
tab.id = id
|
tab.id = id
|
||||||
|
|
||||||
tab.text = tab.Text -- compat
|
tab.text = _G[tabname .. "Text"]
|
||||||
tab.text:ClearAllPoints()
|
tab.text:ClearAllPoints()
|
||||||
tab.text:SetPoint("LEFT", 14, -3)
|
tab.text:SetPoint("LEFT", 14, -3)
|
||||||
tab.text:SetPoint("RIGHT", -12, -3)
|
tab.text:SetPoint("RIGHT", -12, -3)
|
||||||
@ -502,7 +316,7 @@ local function Constructor()
|
|||||||
titletext:SetHeight(18)
|
titletext:SetHeight(18)
|
||||||
titletext:SetText("")
|
titletext:SetText("")
|
||||||
|
|
||||||
local border = CreateFrame("Frame", nil, frame, "BackdropTemplate")
|
local border = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
border:SetPoint("TOPLEFT", 1, -27)
|
border:SetPoint("TOPLEFT", 1, -27)
|
||||||
border:SetPoint("BOTTOMRIGHT", -1, 3)
|
border:SetPoint("BOTTOMRIGHT", -1, 3)
|
||||||
border:SetBackdrop(PaneBackdrop)
|
border:SetBackdrop(PaneBackdrop)
|
||||||
|
@ -2,18 +2,22 @@
|
|||||||
TreeGroup Container
|
TreeGroup Container
|
||||||
Container that uses a tree control to switch between groups.
|
Container that uses a tree control to switch between groups.
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
local Type, Version = "TreeGroup", 47
|
local Type, Version = "TreeGroup", 45
|
||||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||||
|
|
||||||
-- Lua APIs
|
-- Lua APIs
|
||||||
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
|
local next, pairs, ipairs, assert, type = next, pairs, ipairs, assert, type
|
||||||
local math_min, math_max, floor = math.min, math.max, math.floor
|
local math_min, math_max, floor = math.min, math.max, floor
|
||||||
local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
|
local select, tremove, unpack, tconcat = select, table.remove, unpack, table.concat
|
||||||
|
|
||||||
-- WoW APIs
|
-- WoW APIs
|
||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: FONT_COLOR_CODE_CLOSE
|
||||||
|
|
||||||
-- Recycling functions
|
-- Recycling functions
|
||||||
local new, del
|
local new, del
|
||||||
do
|
do
|
||||||
@ -563,11 +567,7 @@ local methods = {
|
|||||||
if maxtreewidth > 100 and status.treewidth > maxtreewidth then
|
if maxtreewidth > 100 and status.treewidth > maxtreewidth then
|
||||||
self:SetTreeWidth(maxtreewidth, status.treesizable)
|
self:SetTreeWidth(maxtreewidth, status.treesizable)
|
||||||
end
|
end
|
||||||
if treeframe.SetResizeBounds then
|
|
||||||
treeframe:SetResizeBounds(100, 1, maxtreewidth, 1600)
|
|
||||||
else
|
|
||||||
treeframe:SetMaxResize(maxtreewidth, 1600)
|
treeframe:SetMaxResize(maxtreewidth, 1600)
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["OnHeightSet"] = function(self, height)
|
["OnHeightSet"] = function(self, height)
|
||||||
@ -637,7 +637,7 @@ local function Constructor()
|
|||||||
local num = AceGUI:GetNextWidgetNum(Type)
|
local num = AceGUI:GetNextWidgetNum(Type)
|
||||||
local frame = CreateFrame("Frame", nil, UIParent)
|
local frame = CreateFrame("Frame", nil, UIParent)
|
||||||
|
|
||||||
local treeframe = CreateFrame("Frame", nil, frame, "BackdropTemplate")
|
local treeframe = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
treeframe:SetPoint("TOPLEFT")
|
treeframe:SetPoint("TOPLEFT")
|
||||||
treeframe:SetPoint("BOTTOMLEFT")
|
treeframe:SetPoint("BOTTOMLEFT")
|
||||||
treeframe:SetWidth(DEFAULT_TREE_WIDTH)
|
treeframe:SetWidth(DEFAULT_TREE_WIDTH)
|
||||||
@ -646,17 +646,13 @@ local function Constructor()
|
|||||||
treeframe:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
|
treeframe:SetBackdropColor(0.1, 0.1, 0.1, 0.5)
|
||||||
treeframe:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
treeframe:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||||
treeframe:SetResizable(true)
|
treeframe:SetResizable(true)
|
||||||
if treeframe.SetResizeBounds then -- WoW 10.0
|
|
||||||
treeframe:SetResizeBounds(100, 1, 400, 1600)
|
|
||||||
else
|
|
||||||
treeframe:SetMinResize(100, 1)
|
treeframe:SetMinResize(100, 1)
|
||||||
treeframe:SetMaxResize(400, 1600)
|
treeframe:SetMaxResize(400, 1600)
|
||||||
end
|
|
||||||
treeframe:SetScript("OnUpdate", FirstFrameUpdate)
|
treeframe:SetScript("OnUpdate", FirstFrameUpdate)
|
||||||
treeframe:SetScript("OnSizeChanged", Tree_OnSizeChanged)
|
treeframe:SetScript("OnSizeChanged", Tree_OnSizeChanged)
|
||||||
treeframe:SetScript("OnMouseWheel", Tree_OnMouseWheel)
|
treeframe:SetScript("OnMouseWheel", Tree_OnMouseWheel)
|
||||||
|
|
||||||
local dragger = CreateFrame("Frame", nil, treeframe, "BackdropTemplate")
|
local dragger = CreateFrame("Frame", nil, treeframe, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
dragger:SetWidth(8)
|
dragger:SetWidth(8)
|
||||||
dragger:SetPoint("TOP", treeframe, "TOPRIGHT")
|
dragger:SetPoint("TOP", treeframe, "TOPRIGHT")
|
||||||
dragger:SetPoint("BOTTOM", treeframe, "BOTTOMRIGHT")
|
dragger:SetPoint("BOTTOM", treeframe, "BOTTOMRIGHT")
|
||||||
@ -681,7 +677,7 @@ local function Constructor()
|
|||||||
scrollbg:SetAllPoints(scrollbar)
|
scrollbg:SetAllPoints(scrollbar)
|
||||||
scrollbg:SetColorTexture(0,0,0,0.4)
|
scrollbg:SetColorTexture(0,0,0,0.4)
|
||||||
|
|
||||||
local border = CreateFrame("Frame", nil, frame, "BackdropTemplate")
|
local border = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
|
border:SetPoint("TOPLEFT", treeframe, "TOPRIGHT")
|
||||||
border:SetPoint("BOTTOMRIGHT")
|
border:SetPoint("BOTTOMRIGHT")
|
||||||
border:SetBackdrop(PaneBackdrop)
|
border:SetBackdrop(PaneBackdrop)
|
||||||
|
@ -7,6 +7,10 @@ local pairs, assert, type = pairs, assert, type
|
|||||||
local PlaySound = PlaySound
|
local PlaySound = PlaySound
|
||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: GameFontNormal
|
||||||
|
|
||||||
----------------
|
----------------
|
||||||
-- Main Frame --
|
-- Main Frame --
|
||||||
----------------
|
----------------
|
||||||
@ -17,7 +21,7 @@ local CreateFrame, UIParent = CreateFrame, UIParent
|
|||||||
]]
|
]]
|
||||||
do
|
do
|
||||||
local Type = "Window"
|
local Type = "Window"
|
||||||
local Version = 8
|
local Version = 6
|
||||||
|
|
||||||
local function frameOnShow(this)
|
local function frameOnShow(this)
|
||||||
this.obj:Fire("OnShow")
|
this.obj:Fire("OnShow")
|
||||||
@ -182,11 +186,7 @@ do
|
|||||||
|
|
||||||
frame:SetScript("OnShow",frameOnShow)
|
frame:SetScript("OnShow",frameOnShow)
|
||||||
frame:SetScript("OnHide",frameOnClose)
|
frame:SetScript("OnHide",frameOnClose)
|
||||||
if frame.SetResizeBounds then -- WoW 10.0
|
|
||||||
frame:SetResizeBounds(240,240)
|
|
||||||
else
|
|
||||||
frame:SetMinResize(240,240)
|
frame:SetMinResize(240,240)
|
||||||
end
|
|
||||||
frame:SetToplevel(true)
|
frame:SetToplevel(true)
|
||||||
|
|
||||||
local titlebg = frame:CreateTexture(nil, "BACKGROUND")
|
local titlebg = frame:CreateTexture(nil, "BACKGROUND")
|
||||||
@ -300,7 +300,7 @@ do
|
|||||||
line2:SetHeight(8)
|
line2:SetHeight(8)
|
||||||
line2:SetPoint("BOTTOMRIGHT", -8, 8)
|
line2:SetPoint("BOTTOMRIGHT", -8, 8)
|
||||||
line2:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border
|
line2:SetTexture(137057) -- Interface\\Tooltips\\UI-Tooltip-Border
|
||||||
x = 0.1 * 8/17
|
local x = 0.1 * 8/17
|
||||||
line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
|
line2:SetTexCoord(0.05 - x, 0.5, 0.05, 0.5 + x, 0.05, 0.5 - x, 0.5 + x, 0.5)
|
||||||
|
|
||||||
local sizer_s = CreateFrame("Frame",nil,frame)
|
local sizer_s = CreateFrame("Frame",nil,frame)
|
||||||
|
@ -12,6 +12,10 @@ local select, pairs = select, pairs
|
|||||||
local PlaySound = PlaySound
|
local PlaySound = PlaySound
|
||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: SetDesaturation, GameFontHighlight
|
||||||
|
|
||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
Support functions
|
Support functions
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
@ -195,14 +199,14 @@ local methods = {
|
|||||||
["SetDescription"] = function(self, desc)
|
["SetDescription"] = function(self, desc)
|
||||||
if desc then
|
if desc then
|
||||||
if not self.desc then
|
if not self.desc then
|
||||||
local f = self.frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
|
local desc = self.frame:CreateFontString(nil, "OVERLAY", "GameFontHighlightSmall")
|
||||||
f:ClearAllPoints()
|
desc:ClearAllPoints()
|
||||||
f:SetPoint("TOPLEFT", self.checkbg, "TOPRIGHT", 5, -21)
|
desc:SetPoint("TOPLEFT", self.checkbg, "TOPRIGHT", 5, -21)
|
||||||
f:SetWidth(self.frame.width - 30)
|
desc:SetWidth(self.frame.width - 30)
|
||||||
f:SetPoint("RIGHT", self.frame, "RIGHT", -30, 0)
|
desc:SetPoint("RIGHT", self.frame, "RIGHT", -30, 0)
|
||||||
f:SetJustifyH("LEFT")
|
desc:SetJustifyH("LEFT")
|
||||||
f:SetJustifyV("TOP")
|
desc:SetJustifyV("TOP")
|
||||||
self.desc = f
|
self.desc = desc
|
||||||
end
|
end
|
||||||
self.desc:Show()
|
self.desc:Show()
|
||||||
--self.text:SetFontObject(GameFontNormal)
|
--self.text:SetFontObject(GameFontNormal)
|
||||||
|
@ -11,6 +11,10 @@ local pairs = pairs
|
|||||||
-- WoW APIs
|
-- WoW APIs
|
||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: ColorPickerFrame, OpacitySliderFrame
|
||||||
|
|
||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
Support functions
|
Support functions
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1272 2022-08-29 15:56:35Z nevcairiel $ ]]--
|
--[[ $Id: AceGUIWidget-DropDown-Items.lua 1202 2019-05-15 23:11:22Z nevcairiel $ ]]--
|
||||||
|
|
||||||
local AceGUI = LibStub("AceGUI-3.0")
|
local AceGUI = LibStub("AceGUI-3.0")
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ local ItemBase = {
|
|||||||
-- NOTE: The ItemBase version is added to each item's version number
|
-- NOTE: The ItemBase version is added to each item's version number
|
||||||
-- to ensure proper updates on ItemBase changes.
|
-- to ensure proper updates on ItemBase changes.
|
||||||
-- Use at least 1000er steps.
|
-- Use at least 1000er steps.
|
||||||
version = 2000,
|
version = 1000,
|
||||||
counter = 0,
|
counter = 0,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,7 +178,7 @@ function ItemBase.Create(type)
|
|||||||
highlight:Hide()
|
highlight:Hide()
|
||||||
self.highlight = highlight
|
self.highlight = highlight
|
||||||
|
|
||||||
local check = frame:CreateTexture(nil, "OVERLAY")
|
local check = frame:CreateTexture("OVERLAY")
|
||||||
check:SetWidth(16)
|
check:SetWidth(16)
|
||||||
check:SetHeight(16)
|
check:SetHeight(16)
|
||||||
check:SetPoint("LEFT",frame,"LEFT",3,-1)
|
check:SetPoint("LEFT",frame,"LEFT",3,-1)
|
||||||
@ -186,7 +186,7 @@ function ItemBase.Create(type)
|
|||||||
check:Hide()
|
check:Hide()
|
||||||
self.check = check
|
self.check = check
|
||||||
|
|
||||||
local sub = frame:CreateTexture(nil, "OVERLAY")
|
local sub = frame:CreateTexture("OVERLAY")
|
||||||
sub:SetWidth(16)
|
sub:SetWidth(16)
|
||||||
sub:SetHeight(16)
|
sub:SetHeight(16)
|
||||||
sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
|
sub:SetPoint("RIGHT",frame,"RIGHT",-3,-1)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
--[[ $Id: AceGUIWidget-DropDown.lua 1284 2022-09-25 09:15:30Z nevcairiel $ ]]--
|
--[[ $Id: AceGUIWidget-DropDown.lua 1239 2020-09-20 10:22:02Z nevcairiel $ ]]--
|
||||||
local AceGUI = LibStub("AceGUI-3.0")
|
local AceGUI = LibStub("AceGUI-3.0")
|
||||||
|
|
||||||
-- Lua APIs
|
-- Lua APIs
|
||||||
@ -11,6 +11,10 @@ local PlaySound = PlaySound
|
|||||||
local UIParent, CreateFrame = UIParent, CreateFrame
|
local UIParent, CreateFrame = UIParent, CreateFrame
|
||||||
local _G = _G
|
local _G = _G
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: CLOSE
|
||||||
|
|
||||||
local function fixlevels(parent,...)
|
local function fixlevels(parent,...)
|
||||||
local i = 1
|
local i = 1
|
||||||
local child = select(i, ...)
|
local child = select(i, ...)
|
||||||
@ -249,7 +253,7 @@ do
|
|||||||
|
|
||||||
local function Constructor()
|
local function Constructor()
|
||||||
local count = AceGUI:GetNextWidgetNum(widgetType)
|
local count = AceGUI:GetNextWidgetNum(widgetType)
|
||||||
local frame = CreateFrame("Frame", "AceGUI30Pullout"..count, UIParent, "BackdropTemplate")
|
local frame = CreateFrame("Frame", "AceGUI30Pullout"..count, UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
local self = {}
|
local self = {}
|
||||||
self.count = count
|
self.count = count
|
||||||
self.type = widgetType
|
self.type = widgetType
|
||||||
@ -300,7 +304,7 @@ do
|
|||||||
scrollFrame.obj = self
|
scrollFrame.obj = self
|
||||||
itemFrame.obj = self
|
itemFrame.obj = self
|
||||||
|
|
||||||
local slider = CreateFrame("Slider", "AceGUI30PulloutScrollbar"..count, scrollFrame, "BackdropTemplate")
|
local slider = CreateFrame("Slider", "AceGUI30PulloutScrollbar"..count, scrollFrame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
slider:SetOrientation("VERTICAL")
|
slider:SetOrientation("VERTICAL")
|
||||||
slider:SetHitRectInsets(0, 0, -10, 0)
|
slider:SetHitRectInsets(0, 0, -10, 0)
|
||||||
slider:SetBackdrop(sliderBackdrop)
|
slider:SetBackdrop(sliderBackdrop)
|
||||||
@ -347,7 +351,7 @@ end
|
|||||||
|
|
||||||
do
|
do
|
||||||
local widgetType = "Dropdown"
|
local widgetType = "Dropdown"
|
||||||
local widgetVersion = 36
|
local widgetVersion = 35
|
||||||
|
|
||||||
--[[ Static data ]]--
|
--[[ Static data ]]--
|
||||||
|
|
||||||
@ -372,6 +376,7 @@ do
|
|||||||
|
|
||||||
local function Dropdown_TogglePullout(this)
|
local function Dropdown_TogglePullout(this)
|
||||||
local self = this.obj
|
local self = this.obj
|
||||||
|
PlaySound(856) -- SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON
|
||||||
if self.open then
|
if self.open then
|
||||||
self.open = nil
|
self.open = nil
|
||||||
self.pullout:Close()
|
self.pullout:Close()
|
||||||
|
@ -14,6 +14,10 @@ local GetCursorInfo, ClearCursor, GetSpellInfo = GetCursorInfo, ClearCursor, Get
|
|||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
local _G = _G
|
local _G = _G
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: AceGUIEditBoxInsertLink, ChatFontNormal, OKAY
|
||||||
|
|
||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
Support functions
|
Support functions
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
|
@ -13,6 +13,10 @@ local pairs = pairs
|
|||||||
local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown
|
local IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown = IsShiftKeyDown, IsControlKeyDown, IsAltKeyDown
|
||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: NOT_BOUND
|
||||||
|
|
||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
Scripts
|
Scripts
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
@ -210,7 +214,7 @@ local function Constructor()
|
|||||||
label:SetJustifyH("CENTER")
|
label:SetJustifyH("CENTER")
|
||||||
label:SetHeight(18)
|
label:SetHeight(18)
|
||||||
|
|
||||||
local msgframe = CreateFrame("Frame", nil, UIParent, "BackdropTemplate")
|
local msgframe = CreateFrame("Frame", nil, UIParent, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
msgframe:SetHeight(30)
|
msgframe:SetHeight(30)
|
||||||
msgframe:SetBackdrop(ControlBackdrop)
|
msgframe:SetBackdrop(ControlBackdrop)
|
||||||
msgframe:SetBackdropColor(0,0,0)
|
msgframe:SetBackdropColor(0,0,0)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Label Widget
|
Label Widget
|
||||||
Displays text and optionally an icon.
|
Displays text and optionally an icon.
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
local Type, Version = "Label", 28
|
local Type, Version = "Label", 27
|
||||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||||
|
|
||||||
@ -12,6 +12,10 @@ local max, select, pairs = math.max, select, pairs
|
|||||||
-- WoW APIs
|
-- WoW APIs
|
||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: GameFontHighlightSmall
|
||||||
|
|
||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
Support functions
|
Support functions
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
@ -125,16 +129,12 @@ local methods = {
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
["SetFont"] = function(self, font, height, flags)
|
["SetFont"] = function(self, font, height, flags)
|
||||||
if not self.fontObject then
|
self.label:SetFont(font, height, flags)
|
||||||
self.fontObject = CreateFont("AceGUI30LabelFont" .. AceGUI:GetNextWidgetNum(Type))
|
UpdateImageAnchor(self)
|
||||||
end
|
|
||||||
self.fontObject:SetFont(font, height, flags)
|
|
||||||
self:SetFontObject(self.fontObject)
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["SetFontObject"] = function(self, font)
|
["SetFontObject"] = function(self, font)
|
||||||
self.label:SetFontObject(font or GameFontHighlightSmall)
|
self:SetFont((font or GameFontHighlightSmall):GetFont())
|
||||||
UpdateImageAnchor(self)
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["SetImageSize"] = function(self, width, height)
|
["SetImageSize"] = function(self, width, height)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local Type, Version = "MultiLineEditBox", 32
|
local Type, Version = "MultiLineEditBox", 29
|
||||||
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
local AceGUI = LibStub and LibStub("AceGUI-3.0", true)
|
||||||
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
if not AceGUI or (AceGUI:GetWidgetVersion(Type) or 0) >= Version then return end
|
||||||
|
|
||||||
@ -10,6 +10,10 @@ local GetCursorInfo, GetSpellInfo, ClearCursor = GetCursorInfo, GetSpellInfo, Cl
|
|||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
local _G = _G
|
local _G = _G
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: ACCEPT, ChatFontNormal
|
||||||
|
|
||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
Support functions
|
Support functions
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
@ -141,14 +145,6 @@ local function OnVerticalScroll(self, offset)
|
|||||||
editBox:SetHitRectInsets(0, 0, offset, editBox:GetHeight() - offset - self:GetHeight())
|
editBox:SetHitRectInsets(0, 0, offset, editBox:GetHeight() - offset - self:GetHeight())
|
||||||
end
|
end
|
||||||
|
|
||||||
local function OnScrollRangeChanged(self, xrange, yrange)
|
|
||||||
if yrange == 0 then
|
|
||||||
self.obj.editBox:SetHitRectInsets(0, 0, 0, 0)
|
|
||||||
else
|
|
||||||
OnVerticalScroll(self, self:GetVerticalScroll())
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function OnShowFocus(frame)
|
local function OnShowFocus(frame)
|
||||||
frame.obj.editBox:SetFocus()
|
frame.obj.editBox:SetFocus()
|
||||||
frame:SetScript("OnShow", nil)
|
frame:SetScript("OnShow", nil)
|
||||||
@ -261,6 +257,8 @@ local methods = {
|
|||||||
["SetCursorPosition"] = function(self, ...)
|
["SetCursorPosition"] = function(self, ...)
|
||||||
return self.editBox:SetCursorPosition(...)
|
return self.editBox:SetCursorPosition(...)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
@ -299,7 +297,7 @@ local function Constructor()
|
|||||||
text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -5, 1)
|
text:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -5, 1)
|
||||||
text:SetJustifyV("MIDDLE")
|
text:SetJustifyV("MIDDLE")
|
||||||
|
|
||||||
local scrollBG = CreateFrame("Frame", nil, frame, "BackdropTemplate")
|
local scrollBG = CreateFrame("Frame", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
scrollBG:SetBackdrop(backdrop)
|
scrollBG:SetBackdrop(backdrop)
|
||||||
scrollBG:SetBackdropColor(0, 0, 0)
|
scrollBG:SetBackdropColor(0, 0, 0)
|
||||||
scrollBG:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
scrollBG:SetBackdropBorderColor(0.4, 0.4, 0.4)
|
||||||
@ -323,7 +321,6 @@ local function Constructor()
|
|||||||
scrollFrame:SetScript("OnReceiveDrag", OnReceiveDrag)
|
scrollFrame:SetScript("OnReceiveDrag", OnReceiveDrag)
|
||||||
scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
|
scrollFrame:SetScript("OnSizeChanged", OnSizeChanged)
|
||||||
scrollFrame:HookScript("OnVerticalScroll", OnVerticalScroll)
|
scrollFrame:HookScript("OnVerticalScroll", OnVerticalScroll)
|
||||||
scrollFrame:HookScript("OnScrollRangeChanged", OnScrollRangeChanged)
|
|
||||||
|
|
||||||
local editBox = CreateFrame("EditBox", ("%s%dEdit"):format(Type, widgetNum), scrollFrame)
|
local editBox = CreateFrame("EditBox", ("%s%dEdit"):format(Type, widgetNum), scrollFrame)
|
||||||
editBox:SetAllPoints()
|
editBox:SetAllPoints()
|
||||||
|
@ -14,6 +14,10 @@ local tonumber, pairs = tonumber, pairs
|
|||||||
local PlaySound = PlaySound
|
local PlaySound = PlaySound
|
||||||
local CreateFrame, UIParent = CreateFrame, UIParent
|
local CreateFrame, UIParent = CreateFrame, UIParent
|
||||||
|
|
||||||
|
-- Global vars/functions that we don't upvalue since they might get hooked, or upgraded
|
||||||
|
-- List them here for Mikk's FindGlobals script
|
||||||
|
-- GLOBALS: GameFontHighlightSmall
|
||||||
|
|
||||||
--[[-----------------------------------------------------------------------------
|
--[[-----------------------------------------------------------------------------
|
||||||
Support functions
|
Support functions
|
||||||
-------------------------------------------------------------------------------]]
|
-------------------------------------------------------------------------------]]
|
||||||
@ -27,13 +31,13 @@ local function UpdateText(self)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function UpdateLabels(self)
|
local function UpdateLabels(self)
|
||||||
local min_value, max_value = (self.min or 0), (self.max or 100)
|
local min, max = (self.min or 0), (self.max or 100)
|
||||||
if self.ispercent then
|
if self.ispercent then
|
||||||
self.lowtext:SetFormattedText("%s%%", (min_value * 100))
|
self.lowtext:SetFormattedText("%s%%", (min * 100))
|
||||||
self.hightext:SetFormattedText("%s%%", (max_value * 100))
|
self.hightext:SetFormattedText("%s%%", (max * 100))
|
||||||
else
|
else
|
||||||
self.lowtext:SetText(min_value)
|
self.lowtext:SetText(min)
|
||||||
self.hightext:SetText(max_value)
|
self.hightext:SetText(max)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -171,13 +175,13 @@ local methods = {
|
|||||||
self.label:SetText(text)
|
self.label:SetText(text)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
["SetSliderValues"] = function(self, min_value, max_value, step)
|
["SetSliderValues"] = function(self, min, max, step)
|
||||||
local frame = self.slider
|
local frame = self.slider
|
||||||
frame.setup = true
|
frame.setup = true
|
||||||
self.min = min_value
|
self.min = min
|
||||||
self.max = max_value
|
self.max = max
|
||||||
self.step = step
|
self.step = step
|
||||||
frame:SetMinMaxValues(min_value or 0,max_value or 100)
|
frame:SetMinMaxValues(min or 0,max or 100)
|
||||||
UpdateLabels(self)
|
UpdateLabels(self)
|
||||||
frame:SetValueStep(step or 1)
|
frame:SetValueStep(step or 1)
|
||||||
if self.value then
|
if self.value then
|
||||||
@ -221,7 +225,7 @@ local function Constructor()
|
|||||||
label:SetJustifyH("CENTER")
|
label:SetJustifyH("CENTER")
|
||||||
label:SetHeight(15)
|
label:SetHeight(15)
|
||||||
|
|
||||||
local slider = CreateFrame("Slider", nil, frame, "BackdropTemplate")
|
local slider = CreateFrame("Slider", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
slider:SetOrientation("HORIZONTAL")
|
slider:SetOrientation("HORIZONTAL")
|
||||||
slider:SetHeight(15)
|
slider:SetHeight(15)
|
||||||
slider:SetHitRectInsets(0, 0, -10, 0)
|
slider:SetHitRectInsets(0, 0, -10, 0)
|
||||||
@ -243,7 +247,7 @@ local function Constructor()
|
|||||||
local hightext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
|
local hightext = slider:CreateFontString(nil, "ARTWORK", "GameFontHighlightSmall")
|
||||||
hightext:SetPoint("TOPRIGHT", slider, "BOTTOMRIGHT", -2, 3)
|
hightext:SetPoint("TOPRIGHT", slider, "BOTTOMRIGHT", -2, 3)
|
||||||
|
|
||||||
local editbox = CreateFrame("EditBox", nil, frame, "BackdropTemplate")
|
local editbox = CreateFrame("EditBox", nil, frame, BackdropTemplateMixin and "BackdropTemplate" or nil)
|
||||||
editbox:SetAutoFocus(false)
|
editbox:SetAutoFocus(false)
|
||||||
editbox:SetFontObject(GameFontHighlightSmall)
|
editbox:SetFontObject(GameFontHighlightSmall)
|
||||||
editbox:SetPoint("TOP", slider, "BOTTOM")
|
editbox:SetPoint("TOP", slider, "BOTTOM")
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
-- make into AceHook.
|
-- make into AceHook.
|
||||||
-- @class file
|
-- @class file
|
||||||
-- @name AceHook-3.0
|
-- @name AceHook-3.0
|
||||||
-- @release $Id: AceHook-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
|
-- @release $Id: AceHook-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
|
||||||
local ACEHOOK_MAJOR, ACEHOOK_MINOR = "AceHook-3.0", 9
|
local ACEHOOK_MAJOR, ACEHOOK_MINOR = "AceHook-3.0", 8
|
||||||
local AceHook, oldminor = LibStub:NewLibrary(ACEHOOK_MAJOR, ACEHOOK_MINOR)
|
local AceHook, oldminor = LibStub:NewLibrary(ACEHOOK_MAJOR, ACEHOOK_MINOR)
|
||||||
|
|
||||||
if not AceHook then return end -- No upgrade needed
|
if not AceHook then return end -- No upgrade needed
|
||||||
@ -195,6 +195,7 @@ function hook(self, obj, method, handler, script, secure, raw, forceSecure, usag
|
|||||||
registry[self][method] = nil
|
registry[self][method] = nil
|
||||||
end
|
end
|
||||||
handlers[uid], actives[uid], scripts[uid] = nil, nil, nil
|
handlers[uid], actives[uid], scripts[uid] = nil, nil, nil
|
||||||
|
uid = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
local orig
|
local orig
|
||||||
@ -477,10 +478,10 @@ function AceHook:UnhookAll()
|
|||||||
for key, value in pairs(registry[self]) do
|
for key, value in pairs(registry[self]) do
|
||||||
if type(key) == "table" then
|
if type(key) == "table" then
|
||||||
for method in pairs(value) do
|
for method in pairs(value) do
|
||||||
AceHook.Unhook(self, key, method)
|
self:Unhook(key, method)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
AceHook.Unhook(self, key)
|
self:Unhook(key)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
-- make into AceSerializer.
|
-- make into AceSerializer.
|
||||||
-- @class file
|
-- @class file
|
||||||
-- @name AceSerializer-3.0
|
-- @name AceSerializer-3.0
|
||||||
-- @release $Id: AceSerializer-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
|
-- @release $Id: AceSerializer-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
|
||||||
local MAJOR,MINOR = "AceSerializer-3.0", 5
|
local MAJOR,MINOR = "AceSerializer-3.0", 5
|
||||||
local AceSerializer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
local AceSerializer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
||||||
|
|
||||||
@ -83,9 +83,9 @@ local function SerializeValue(v, res, nres)
|
|||||||
elseif t=="table" then -- ^T...^t = table (list of key,value pairs)
|
elseif t=="table" then -- ^T...^t = table (list of key,value pairs)
|
||||||
nres=nres+1
|
nres=nres+1
|
||||||
res[nres] = "^T"
|
res[nres] = "^T"
|
||||||
for key,value in pairs(v) do
|
for k,v in pairs(v) do
|
||||||
nres = SerializeValue(key, res, nres)
|
nres = SerializeValue(k, res, nres)
|
||||||
nres = SerializeValue(value, res, nres)
|
nres = SerializeValue(v, res, nres)
|
||||||
end
|
end
|
||||||
nres=nres+1
|
nres=nres+1
|
||||||
res[nres] = "^t"
|
res[nres] = "^t"
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
-- make into AceTimer.
|
-- make into AceTimer.
|
||||||
-- @class file
|
-- @class file
|
||||||
-- @name AceTimer-3.0
|
-- @name AceTimer-3.0
|
||||||
-- @release $Id: AceTimer-3.0.lua 1284 2022-09-25 09:15:30Z nevcairiel $
|
-- @release $Id: AceTimer-3.0.lua 1202 2019-05-15 23:11:22Z nevcairiel $
|
||||||
|
|
||||||
local MAJOR, MINOR = "AceTimer-3.0", 17 -- Bump minor on changes
|
local MAJOR, MINOR = "AceTimer-3.0", 17 -- Bump minor on changes
|
||||||
local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
local AceTimer, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
|
||||||
@ -61,11 +61,11 @@ local function new(self, loop, func, delay, ...)
|
|||||||
-- Compensate delay to get a perfect average delay, even if individual times don't match up perfectly
|
-- Compensate delay to get a perfect average delay, even if individual times don't match up perfectly
|
||||||
-- due to fps differences
|
-- due to fps differences
|
||||||
local time = GetTime()
|
local time = GetTime()
|
||||||
local ndelay = timer.delay - (time - timer.ends)
|
local delay = timer.delay - (time - timer.ends)
|
||||||
-- Ensure the delay doesn't go below the threshold
|
-- Ensure the delay doesn't go below the threshold
|
||||||
if ndelay < 0.01 then ndelay = 0.01 end
|
if delay < 0.01 then delay = 0.01 end
|
||||||
C_TimerAfter(ndelay, timer.callback)
|
C_TimerAfter(delay, timer.callback)
|
||||||
timer.ends = time + ndelay
|
timer.ends = time + delay
|
||||||
else
|
else
|
||||||
activeTimers[timer.handle or timer] = nil
|
activeTimers[timer.handle or timer] = nil
|
||||||
end
|
end
|
||||||
|
@ -1,26 +1,61 @@
|
|||||||
--[[ $Id: CallbackHandler-1.0.lua 1298 2022-12-12 15:10:10Z nevcairiel $ ]]
|
--[[ $Id: CallbackHandler-1.0.lua 3 2008-09-29 16:54:20Z nevcairiel $ ]]
|
||||||
local MAJOR, MINOR = "CallbackHandler-1.0", 8
|
local MAJOR, MINOR = "CallbackHandler-1.0", 3
|
||||||
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
|
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
|
||||||
|
|
||||||
if not CallbackHandler then return end -- No upgrade needed
|
if not CallbackHandler then return end -- No upgrade needed
|
||||||
|
|
||||||
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
|
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
|
||||||
|
|
||||||
-- Lua APIs
|
local type = type
|
||||||
local securecallfunction, error = securecallfunction, error
|
local pcall = pcall
|
||||||
local setmetatable, rawget = setmetatable, rawget
|
local pairs = pairs
|
||||||
local next, select, pairs, type, tostring = next, select, pairs, type, tostring
|
local assert = assert
|
||||||
|
local concat = table.concat
|
||||||
|
local loadstring = loadstring
|
||||||
|
local next = next
|
||||||
|
local select = select
|
||||||
|
local type = type
|
||||||
|
local xpcall = xpcall
|
||||||
|
|
||||||
|
local function errorhandler(err)
|
||||||
|
return geterrorhandler()(err)
|
||||||
|
end
|
||||||
|
|
||||||
local function Dispatch(handlers, ...)
|
local function CreateDispatcher(argCount)
|
||||||
local index, method = next(handlers)
|
local code = [[
|
||||||
|
local next, xpcall, eh = ...
|
||||||
|
|
||||||
|
local method, ARGS
|
||||||
|
local function call() method(ARGS) end
|
||||||
|
|
||||||
|
local function dispatch(handlers, ...)
|
||||||
|
local index
|
||||||
|
index, method = next(handlers)
|
||||||
if not method then return end
|
if not method then return end
|
||||||
|
local OLD_ARGS = ARGS
|
||||||
|
ARGS = ...
|
||||||
repeat
|
repeat
|
||||||
securecallfunction(method, ...)
|
xpcall(call, eh)
|
||||||
index, method = next(handlers, index)
|
index, method = next(handlers, index)
|
||||||
until not method
|
until not method
|
||||||
|
ARGS = OLD_ARGS
|
||||||
|
end
|
||||||
|
|
||||||
|
return dispatch
|
||||||
|
]]
|
||||||
|
|
||||||
|
local ARGS, OLD_ARGS = {}, {}
|
||||||
|
for i = 1, argCount do ARGS[i], OLD_ARGS[i] = "arg"..i, "old_arg"..i end
|
||||||
|
code = code:gsub("OLD_ARGS", concat(OLD_ARGS, ", ")):gsub("ARGS", concat(ARGS, ", "))
|
||||||
|
return assert(loadstring(code, "safecall Dispatcher["..argCount.."]"))(next, xpcall, errorhandler)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local Dispatchers = setmetatable({}, {__index=function(self, argCount)
|
||||||
|
local dispatcher = CreateDispatcher(argCount)
|
||||||
|
rawset(self, argCount, dispatcher)
|
||||||
|
return dispatcher
|
||||||
|
end})
|
||||||
|
|
||||||
--------------------------------------------------------------------------
|
--------------------------------------------------------------------------
|
||||||
-- CallbackHandler:New
|
-- CallbackHandler:New
|
||||||
--
|
--
|
||||||
@ -29,7 +64,9 @@ end
|
|||||||
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
|
-- UnregisterName - name of the callback unregistration API, default "UnregisterCallback"
|
||||||
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
|
-- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
|
||||||
|
|
||||||
function CallbackHandler.New(_self, target, RegisterName, UnregisterName, UnregisterAllName)
|
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName, OnUsed, OnUnused)
|
||||||
|
-- TODO: Remove this after beta has gone out
|
||||||
|
assert(not OnUsed and not OnUnused, "ACE-80: OnUsed/OnUnused are deprecated. Callbacks are now done to registry.OnUsed and registry.OnUnused")
|
||||||
|
|
||||||
RegisterName = RegisterName or "RegisterCallback"
|
RegisterName = RegisterName or "RegisterCallback"
|
||||||
UnregisterName = UnregisterName or "UnregisterCallback"
|
UnregisterName = UnregisterName or "UnregisterCallback"
|
||||||
@ -51,19 +88,19 @@ function CallbackHandler.New(_self, target, RegisterName, UnregisterName, Unregi
|
|||||||
local oldrecurse = registry.recurse
|
local oldrecurse = registry.recurse
|
||||||
registry.recurse = oldrecurse + 1
|
registry.recurse = oldrecurse + 1
|
||||||
|
|
||||||
Dispatch(events[eventname], eventname, ...)
|
Dispatchers[select('#', ...) + 1](events[eventname], eventname, ...)
|
||||||
|
|
||||||
registry.recurse = oldrecurse
|
registry.recurse = oldrecurse
|
||||||
|
|
||||||
if registry.insertQueue and oldrecurse==0 then
|
if registry.insertQueue and oldrecurse==0 then
|
||||||
-- Something in one of our callbacks wanted to register more callbacks; they got queued
|
-- Something in one of our callbacks wanted to register more callbacks; they got queued
|
||||||
for event,callbacks in pairs(registry.insertQueue) do
|
for eventname,callbacks in pairs(registry.insertQueue) do
|
||||||
local first = not rawget(events, event) or not next(events[event]) -- test for empty before. not test for one member after. that one member may have been overwritten.
|
local first = not rawget(events, eventname) or not next(events[eventname]) -- test for empty before. not test for one member after. that one member may have been overwritten.
|
||||||
for object,func in pairs(callbacks) do
|
for self,func in pairs(callbacks) do
|
||||||
events[event][object] = func
|
events[eventname][self] = func
|
||||||
-- fire OnUsed callback?
|
-- fire OnUsed callback?
|
||||||
if first and registry.OnUsed then
|
if first and registry.OnUsed then
|
||||||
registry.OnUsed(registry, target, event)
|
registry.OnUsed(registry, target, eventname)
|
||||||
first = nil
|
first = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -109,9 +146,9 @@ function CallbackHandler.New(_self, target, RegisterName, UnregisterName, Unregi
|
|||||||
regfunc = function(...) self[method](self,...) end
|
regfunc = function(...) self[method](self,...) end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- function ref with self=object or self="addonId" or self=thread
|
-- function ref with self=object or self="addonId"
|
||||||
if type(self)~="table" and type(self)~="string" and type(self)~="thread" then
|
if type(self)~="table" and type(self)~="string" then
|
||||||
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string or thread expected.", 2)
|
error("Usage: "..RegisterName.."(self or \"addonId\", eventname, method): 'self or addonId': table or string expected.", 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
|
if select("#",...)>=1 then -- this is not the same as testing for arg==nil!
|
||||||
|
427
Libs/DRData-1.0/DRData-1.0.lua
Normal file
427
Libs/DRData-1.0/DRData-1.0.lua
Normal file
@ -0,0 +1,427 @@
|
|||||||
|
local major = "DRData-1.0"
|
||||||
|
local minor = tonumber(string.match("$Revision: 793$", "(%d+)") or 1)
|
||||||
|
|
||||||
|
assert(LibStub, string.format("%s requires LibStub.", major))
|
||||||
|
|
||||||
|
local Data = LibStub:NewLibrary(major, minor)
|
||||||
|
if( not Data ) then return end
|
||||||
|
|
||||||
|
if( IS_WRATH_BUILD == nil ) then IS_WRATH_BUILD = (select(4, GetBuildInfo()) >= 30000) end
|
||||||
|
|
||||||
|
-- How long before DR resets
|
||||||
|
Data.RESET_TIME = 18
|
||||||
|
|
||||||
|
-- List of spellID -> DR category
|
||||||
|
Data.spells = {
|
||||||
|
--[[ DISORIENTS ]]--
|
||||||
|
-- Maim
|
||||||
|
[22570] = "disorient",
|
||||||
|
|
||||||
|
-- Sap
|
||||||
|
[6770] = "disorient",
|
||||||
|
[2070] = "disorient",
|
||||||
|
[11297] = "disorient",
|
||||||
|
|
||||||
|
-- Gouge (Remove all except 1776 come WoTLK)
|
||||||
|
[1776] = "disorient",
|
||||||
|
[1777] = "disorient",
|
||||||
|
[8629] = "disorient",
|
||||||
|
[11285] = "disorient",
|
||||||
|
[11286] = "disorient",
|
||||||
|
[38764] = "disorient",
|
||||||
|
|
||||||
|
-- Polymorph
|
||||||
|
[118] = "disorient",
|
||||||
|
[12824] = "disorient",
|
||||||
|
[12825] = "disorient",
|
||||||
|
[28272] = "disorient",
|
||||||
|
[28271] = "disorient",
|
||||||
|
[12826] = "disorient",
|
||||||
|
|
||||||
|
--[[ FEARS ]]--
|
||||||
|
-- Fear (Warlock)
|
||||||
|
[5782] = "fear",
|
||||||
|
[6213] = "fear",
|
||||||
|
[6215] = "fear",
|
||||||
|
|
||||||
|
-- Seduction (Pet)
|
||||||
|
[6358] = "fear",
|
||||||
|
|
||||||
|
-- Howl of Terror
|
||||||
|
[5484] = "fear",
|
||||||
|
[17928] = "fear",
|
||||||
|
|
||||||
|
-- Psychic scream
|
||||||
|
[8122] = "fear",
|
||||||
|
[8124] = "fear",
|
||||||
|
[10888] = "fear",
|
||||||
|
[10890] = "fear",
|
||||||
|
|
||||||
|
-- Scare Beast
|
||||||
|
[1513] = "fear",
|
||||||
|
[14326] = "fear",
|
||||||
|
[14327] = "fear",
|
||||||
|
|
||||||
|
-- Turn Evil
|
||||||
|
[10326] = "fear",
|
||||||
|
|
||||||
|
-- Intimidating Shout
|
||||||
|
[5246] = "fear",
|
||||||
|
|
||||||
|
--[[ CONTROL STUNS ]]--
|
||||||
|
-- Hammer of Justice
|
||||||
|
[853] = "ctrlstun",
|
||||||
|
[5588] = "ctrlstun",
|
||||||
|
[5589] = "ctrlstun",
|
||||||
|
[10308] = "ctrlstun",
|
||||||
|
|
||||||
|
-- Bash
|
||||||
|
[5211] = "ctrlstun",
|
||||||
|
[6798] = "ctrlstun",
|
||||||
|
[8983] = "ctrlstun",
|
||||||
|
|
||||||
|
-- Pounce
|
||||||
|
[9005] = "ctrlstun",
|
||||||
|
[9823] = "ctrlstun",
|
||||||
|
[9827] = "ctrlstun",
|
||||||
|
[27006] = "ctrlstun",
|
||||||
|
|
||||||
|
-- Intimidation
|
||||||
|
[19577] = "ctrlstun",
|
||||||
|
|
||||||
|
-- Charge
|
||||||
|
[7922] = "ctrlstun",
|
||||||
|
|
||||||
|
-- Cheap Shot
|
||||||
|
[1833] = "ctrlstun",
|
||||||
|
|
||||||
|
-- War Stomp
|
||||||
|
[20549] = "ctrlstun",
|
||||||
|
|
||||||
|
-- Intercept
|
||||||
|
[20253] = "ctrlstun",
|
||||||
|
[20614] = "ctrlstun",
|
||||||
|
[20615] = "ctrlstun",
|
||||||
|
[25273] = "ctrlstun",
|
||||||
|
[25274] = "ctrlstun",
|
||||||
|
|
||||||
|
-- Concussion Blow
|
||||||
|
[12809] = "ctrlstun",
|
||||||
|
|
||||||
|
-- Shadowfury
|
||||||
|
[30283] = "ctrlstun",
|
||||||
|
[30413] = "ctrlstun",
|
||||||
|
[30414] = "ctrlstun",
|
||||||
|
|
||||||
|
-- Unstable Affliction (Silence)
|
||||||
|
[43523] = "ua",
|
||||||
|
[31117] = "ua",
|
||||||
|
|
||||||
|
-- Impact
|
||||||
|
[12355] = "rndstun",
|
||||||
|
|
||||||
|
--[[ RANDOM STUNS ]]--
|
||||||
|
-- Stoneclaw Stun
|
||||||
|
[39796] = "rndstun",
|
||||||
|
|
||||||
|
-- Starfire Stun
|
||||||
|
[16922] = "rndstun",
|
||||||
|
|
||||||
|
-- Mace Stun
|
||||||
|
[5530] = "rndstun",
|
||||||
|
|
||||||
|
-- Stormherald/Deep Thunder
|
||||||
|
[34510] = "rndstun",
|
||||||
|
|
||||||
|
-- Seal of Justice
|
||||||
|
[20170] = "rndstun",
|
||||||
|
|
||||||
|
-- Blackout
|
||||||
|
[15269] = "rndstun",
|
||||||
|
|
||||||
|
-- Revenge Stun
|
||||||
|
[12798] = "rndstun",
|
||||||
|
|
||||||
|
--[[ CYCLONE ]]--
|
||||||
|
-- Blind
|
||||||
|
[2094] = "cyclone",
|
||||||
|
|
||||||
|
-- Cyclone
|
||||||
|
[33786] = "cyclone",
|
||||||
|
|
||||||
|
--[[ ROOTS ]]--
|
||||||
|
-- Freeze (Water Elemental)
|
||||||
|
[33395] = "root",
|
||||||
|
|
||||||
|
-- Frost Nova
|
||||||
|
[122] = "root",
|
||||||
|
[865] = "root",
|
||||||
|
[6131] = "root",
|
||||||
|
[10230] = "root",
|
||||||
|
[27088] = "root",
|
||||||
|
|
||||||
|
-- Entangling Roots
|
||||||
|
[339] = "root",
|
||||||
|
[1062] = "root",
|
||||||
|
[5195] = "root",
|
||||||
|
[5196] = "root",
|
||||||
|
[9852] = "root",
|
||||||
|
[9853] = "root",
|
||||||
|
[26989] = "root",
|
||||||
|
|
||||||
|
--[[ RANDOM ROOTS ]]--
|
||||||
|
-- Improved Hamstring
|
||||||
|
[23694] = "rndroot",
|
||||||
|
|
||||||
|
-- Frostbite
|
||||||
|
[12494] = "rndroot",
|
||||||
|
|
||||||
|
--[[ SLEEPS ]]--
|
||||||
|
-- Hibernate
|
||||||
|
[2637] = "sleep",
|
||||||
|
[18657] = "sleep",
|
||||||
|
[18658] = "sleep",
|
||||||
|
|
||||||
|
-- Wyvern Sting
|
||||||
|
[19386] = "sleep",
|
||||||
|
[24132] = "sleep",
|
||||||
|
[24133] = "sleep",
|
||||||
|
[27068] = "sleep",
|
||||||
|
|
||||||
|
--[[ MISC ]]--
|
||||||
|
-- Chastise (Maybe this shares DR with Imp HS?)
|
||||||
|
[44041] = "root",
|
||||||
|
[44043] = "root",
|
||||||
|
[44044] = "root",
|
||||||
|
[44045] = "root",
|
||||||
|
[44046] = "root",
|
||||||
|
[44047] = "root",
|
||||||
|
|
||||||
|
-- Dragon's Breath
|
||||||
|
[31661] = "dragonsbreath", -- Dragon's Breath
|
||||||
|
[33041] = "dragonsbreath", -- Dragon's Breath
|
||||||
|
[33042] = "dragonsbreath", -- Dragon's Breath
|
||||||
|
[33043] = "dragonsbreath", -- Dragon's Breath
|
||||||
|
-- Repentance
|
||||||
|
[20066] = "repentance",
|
||||||
|
|
||||||
|
-- Scatter Shot
|
||||||
|
[19503] = "scatters",
|
||||||
|
|
||||||
|
-- Freezing Trap
|
||||||
|
[3355] = "freezetrap",
|
||||||
|
[14308] = "freezetrap",
|
||||||
|
[14309] = "freezetrap",
|
||||||
|
|
||||||
|
-- Improved Conc Shot
|
||||||
|
[19410] = "impconc",
|
||||||
|
[22915] = "impconc",
|
||||||
|
[28445] = "impconc",
|
||||||
|
|
||||||
|
-- Death Coil
|
||||||
|
[6789] = "dc",
|
||||||
|
[17925] = "dc",
|
||||||
|
[17926] = "dc",
|
||||||
|
[27223] = "dc",
|
||||||
|
|
||||||
|
-- Kidney Shot
|
||||||
|
[408] = "ks",
|
||||||
|
[8643] = "ks",
|
||||||
|
|
||||||
|
-- Mind Control
|
||||||
|
[605] = "charm",
|
||||||
|
[10911] = "charm",
|
||||||
|
[10912] = "charm",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Add WoTLK spells
|
||||||
|
if( IS_WRATH_BUILD ) then
|
||||||
|
-- Death Coil
|
||||||
|
Data.spells[47859] = "dc"
|
||||||
|
Data.spells[47860] = "dc"
|
||||||
|
|
||||||
|
-- Wyvern Sting
|
||||||
|
Data.spells[49011] = "sleep"
|
||||||
|
Data.spells[49012] = "sleep"
|
||||||
|
|
||||||
|
-- Entangling Roots
|
||||||
|
Data.spells[53308] = "root"
|
||||||
|
|
||||||
|
-- Frost Nova
|
||||||
|
Data.spells[42917] = "root"
|
||||||
|
|
||||||
|
-- Intercept (Remove all except this one come WoTLK)
|
||||||
|
Data.spells[20252] = "ctrlstun"
|
||||||
|
|
||||||
|
-- Pounce
|
||||||
|
Data.spells[49803] = "ctrlstun"
|
||||||
|
|
||||||
|
-- Polymorph
|
||||||
|
Data.spells[61305] = "disorient"
|
||||||
|
Data.spells[61025] = "disorient"
|
||||||
|
|
||||||
|
-- Sap
|
||||||
|
Data.spells[51724] = "disorient"
|
||||||
|
|
||||||
|
-- Maim
|
||||||
|
Data.spells[49802] = "disorient"
|
||||||
|
|
||||||
|
-- Hex (Guessing)
|
||||||
|
Data.spells[51514] = "disorient"
|
||||||
|
end
|
||||||
|
|
||||||
|
-- DR Category names
|
||||||
|
Data.typeNames = {
|
||||||
|
["disorient"] = "Disorients",
|
||||||
|
["fear"] = "Fears",
|
||||||
|
["ctrlstun"] = "Controlled Stuns",
|
||||||
|
["rndstun"] = "Random Stuns",
|
||||||
|
["cyclone"] = "Cyclone/Blind",
|
||||||
|
["ks"] = "Kidney Shot",
|
||||||
|
["chastise"] = "Chastise",
|
||||||
|
["scatters"] = "Scatter Shot",
|
||||||
|
["freezetrap"] = "Freeze Trap",
|
||||||
|
["rndroot"] = "Random Roots",
|
||||||
|
["dc"] = "Death Coil",
|
||||||
|
["sleep"] = "Sleep",
|
||||||
|
["root"] = "Controlled Roots",
|
||||||
|
["impconc"] = "Imp Concussive Shot",
|
||||||
|
["charm"] = "Charms",
|
||||||
|
["repentance"] = "Repentance",
|
||||||
|
["dragonsbreath"] = "Dragon's Breath",
|
||||||
|
["ua"] = "Unstable Affliction Silence",
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Categories that have DR in PvE as well as PvP
|
||||||
|
Data.pveDRs = {
|
||||||
|
["ks"] = true,
|
||||||
|
["ctrlstun"] = true,
|
||||||
|
["rndstun"] = true,
|
||||||
|
["cyclone"] = true,
|
||||||
|
}
|
||||||
|
|
||||||
|
-- List of DRs
|
||||||
|
Data.categories = {}
|
||||||
|
for _, cat in pairs(Data.spells) do
|
||||||
|
Data.categories[cat] = true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Public APIs
|
||||||
|
-- Category name in something usable
|
||||||
|
function Data:GetCategoryName(cat)
|
||||||
|
return cat and Data.typeNames[cat] or nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Spell list
|
||||||
|
function Data:GetSpells()
|
||||||
|
return Data.spells
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Seconds before DR resets
|
||||||
|
function Data:GetResetTime()
|
||||||
|
return Data.RESET_TIME
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Get the category of the spellID
|
||||||
|
function Data:GetSpellCategory(spellID)
|
||||||
|
return spellID and Data.spells[spellID] or nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Does this category DR in PvE?
|
||||||
|
function Data:IsPVE(cat)
|
||||||
|
return cat and Data.pveDRs[cat] or nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- List of categories
|
||||||
|
function Data:GetCategories()
|
||||||
|
return Data.categories
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Next DR, if it's 1.0, next is 0.50, if it's 0.50 next is 0.25 and such
|
||||||
|
function Data:NextDR(diminished)
|
||||||
|
if( diminished == 1.0 ) then
|
||||||
|
return 0.50
|
||||||
|
elseif( diminished == 0.50 ) then
|
||||||
|
return 0.25
|
||||||
|
end
|
||||||
|
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
|
--[[ EXAMPLES ]]--
|
||||||
|
--[[
|
||||||
|
This is how you would track DR easily, you're welcome to do whatever you want with the below 4 functions.
|
||||||
|
|
||||||
|
Does not include tracking for PvE, you'd need to hack that in yourself but it's not (too) hard.
|
||||||
|
]]
|
||||||
|
|
||||||
|
--[[
|
||||||
|
local trackedPlayers = {}
|
||||||
|
local function debuffGained(spellID, destName, destGUID, isEnemy)
|
||||||
|
if( not trackedPlayers[destGUID] ) then
|
||||||
|
trackedPlayers[destGUID] = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
-- See if we should reset it back to undiminished
|
||||||
|
local drCat = DRData:GetSpellCae
|
||||||
|
local tracked = trackedPlayers[destGUID][drCat]
|
||||||
|
if( tracked and tracked.reset <= GetTime() ) then
|
||||||
|
tracked.diminished = 1.0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function debuffFaded(spellID, destName, destGUID, isEnemy)
|
||||||
|
local drCat = DRData:GetSpellCategory(spellID)
|
||||||
|
if( not trackedPlayers[destGUID] ) then
|
||||||
|
trackedPlayers[destGUID] = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
if( not trackedPlayers[destGUID][drCat] ) then
|
||||||
|
trackedPlayers[destGUID][drCat] = { reset = 0, diminished = 1.0 }
|
||||||
|
end
|
||||||
|
|
||||||
|
local time = GetTime()
|
||||||
|
local tracked = trackedPlayers[destGUID][drCat]
|
||||||
|
|
||||||
|
tracked.reset = time + DRData:GetResetTime()
|
||||||
|
tracked.diminished = nextDR(tracked.diminished)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function resetDR(destGUID)
|
||||||
|
-- Reset the tracked DRs for this person
|
||||||
|
if( trackedPlayers[destGUID] ) then
|
||||||
|
for cat in pairs(trackedPlayers[destGUID]) do
|
||||||
|
trackedPlayers[destGUID][cat].reset = 0
|
||||||
|
trackedPlayers[destGUID][cat].diminished = 1.0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local COMBATLOG_OBJECT_TYPE_PLAYER = COMBATLOG_OBJECT_TYPE_PLAYER
|
||||||
|
local COMBATLOG_OBJECT_REACTION_HOSTILE = COMBATLOG_OBJECT_REACTION_HOSTILE
|
||||||
|
local COMBATLOG_OBJECT_CONTROL_PLAYER = COMBATLOG_OBJECT_CONTROL_PLAYER
|
||||||
|
|
||||||
|
local eventRegistered = {["SPELL_AURA_APPLIED"] = true, ["SPELL_AURA_REMOVED"] = true, ["PARTY_KILL"] = true, ["UNIT_DIED"] = true}
|
||||||
|
local function COMBAT_LOG_EVENT_UNFILTERED(self, event, timestamp, eventType, sourceGUID, sourceName, sourceFlags, destGUID, destName, destFlags, spellID, spellName, spellSchool, auraType)
|
||||||
|
if( not eventRegistered[eventType] or ( bit.band(destFlags, COMBATLOG_OBJECT_TYPE_PLAYER) ~= COMBATLOG_OBJECT_TYPE_PLAYER and bit.band(destFlags, COMBATLOG_OBJECT_CONTROL_PLAYER) ~= COMBATLOG_OBJECT_CONTROL_PLAYER ) ) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Enemy gained a debuff
|
||||||
|
if( eventType == "SPELL_AURA_APPLIED" ) then
|
||||||
|
if( auraType == "DEBUFF" and Data.Spells[spellID] ) then
|
||||||
|
debuffGained(spellID, destName, destGUID, (bit.band(destFlags, COMBATLOG_OBJECT_REACTION_HOSTILE) == COMBATLOG_OBJECT_REACTION_HOSTILE))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Buff or debuff faded from an enemy
|
||||||
|
elseif( eventType == "SPELL_AURA_REMOVED" ) then
|
||||||
|
if( auraType == "DEBUFF" and Data.Spells[spellID] ) then
|
||||||
|
debuffFaded(spellID, destName, destGUID, (bit.band(destFlags, COMBATLOG_OBJECT_REACTION_HOSTILE) == COMBATLOG_OBJECT_REACTION_HOSTILE))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Don't use UNIT_DIED inside arenas due to accuracy issues, outside of arenas we don't care too much
|
||||||
|
elseif( ( eventType == "UNIT_DIED" and select(2, IsInInstance()) ~= "arena" ) or eventType == "PARTY_KILL" ) then
|
||||||
|
resetDR(destGUID)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
]]
|
8
Libs/DRData-1.0/DRData-1.0.toc
Normal file
8
Libs/DRData-1.0/DRData-1.0.toc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
## Interface: 20400
|
||||||
|
## Title: Lib: Diminishing Returns Data-1.0
|
||||||
|
## Notes: DB of spellIDs -> DR category
|
||||||
|
## Author: Mayen
|
||||||
|
|
||||||
|
LibStub-1.0\LibStub-1.0.xml
|
||||||
|
|
||||||
|
DRData-1.0.xml
|
@ -1,4 +1,4 @@
|
|||||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
|
||||||
..\FrameXML\UI.xsd">
|
..\FrameXML\UI.xsd">
|
||||||
<Script file = "LibCustomGlow-1.0.lua"/>
|
<Script file="DRData-1.0.lua"/>
|
||||||
</Ui>
|
</Ui>
|
@ -1,394 +0,0 @@
|
|||||||
--[[
|
|
||||||
Name: DRList-1.0
|
|
||||||
Description: Diminishing returns categorization. Fork of outdated DRData-1.0.
|
|
||||||
Website: https://github.com/wardz/DRList-1.0/
|
|
||||||
Documentation: https://wardz.github.io/DRList-1.0/
|
|
||||||
Dependencies: LibStub
|
|
||||||
License: MIT
|
|
||||||
]]
|
|
||||||
|
|
||||||
--- DRList-1.0
|
|
||||||
-- @module DRList-1.0
|
|
||||||
local MAJOR, MINOR = "DRList-1.0", 54 -- Don't forget to change this in Spells.lua aswell!
|
|
||||||
local Lib = assert(LibStub, MAJOR .. " requires LibStub."):NewLibrary(MAJOR, MINOR)
|
|
||||||
if not Lib then return end -- already loaded
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- *** LOCALIZATIONS ARE AUTOMATICALLY GENERATED ***
|
|
||||||
-- Please see Curseforge localization page if you'd like to help translate.
|
|
||||||
-- https://www.curseforge.com/wow/addons/drlist-1-0/localization
|
|
||||||
local L = {}
|
|
||||||
Lib.L = L
|
|
||||||
L["DISARMS"] = "Disarms"
|
|
||||||
L["DISORIENTS"] = "Disorients"
|
|
||||||
L["INCAPACITATES"] = "Incapacitates"
|
|
||||||
L["KNOCKBACKS"] = "Knockbacks"
|
|
||||||
L["ROOTS"] = "Roots"
|
|
||||||
L["SILENCES"] = "Silences"
|
|
||||||
L["STUNS"] = "Stuns"
|
|
||||||
L["TAUNTS"] = "Taunts"
|
|
||||||
L["FEARS"] = "Fears"
|
|
||||||
L["RANDOM_ROOTS"] = "Random roots"
|
|
||||||
L["RANDOM_STUNS"] = "Random stuns"
|
|
||||||
L["OPENER_STUN"] = "Opener stuns"
|
|
||||||
L["HORROR"] = "Horrors"
|
|
||||||
L["SCATTERS"] = "Scatters"
|
|
||||||
L["SLEEPS"] = GetSpellInfo(1090) or "Sleep"
|
|
||||||
L["MIND_CONTROL"] = GetSpellInfo(605) or "Mind Control"
|
|
||||||
L["FROST_SHOCK"] = GetSpellInfo(15089) or "Frost Shock"
|
|
||||||
L["KIDNEY_SHOT"] = GetSpellInfo(408) or "Kidney Shot"
|
|
||||||
L["DEATH_COIL"] = GetSpellInfo(28412) or "Death Coil"
|
|
||||||
L["UNSTABLE_AFFLICTION"] = GetSpellInfo(31117) or "Unstable Affliction"
|
|
||||||
L["CHASTISE"] = GetSpellInfo(44041) or "Chastise"
|
|
||||||
L["COUNTERATTACK"] = GetSpellInfo(19306) or "Counterattack"
|
|
||||||
L["CYCLONE"] = GetSpellInfo(33786) or "Cyclone"
|
|
||||||
L["BANISH"] = GetSpellInfo(710) or "Banish"
|
|
||||||
L["CHARGE"] = GetSpellInfo(100) or "Charge"
|
|
||||||
|
|
||||||
-- luacheck: push ignore 542
|
|
||||||
local locale = GetLocale()
|
|
||||||
if locale == "deDE" then
|
|
||||||
L["FEARS"] = "Furchteffekte"
|
|
||||||
L["KNOCKBACKS"] = "Rückstoßeffekte"
|
|
||||||
L["ROOTS"] = "Bewegungsunfähigkeitseffekte"
|
|
||||||
L["SILENCES"] = "Stilleeffekte"
|
|
||||||
L["STUNS"] = "Betäubungseffekte"
|
|
||||||
L["TAUNTS"] = "Spotteffekte"
|
|
||||||
elseif locale == "frFR" then
|
|
||||||
L["FEARS"] = "Peurs"
|
|
||||||
L["KNOCKBACKS"] = "Projections"
|
|
||||||
L["ROOTS"] = "Immobilisations"
|
|
||||||
L["SILENCES"] = "Silences"
|
|
||||||
L["STUNS"] = "Etourdissements"
|
|
||||||
L["TAUNTS"] = "Provocations"
|
|
||||||
elseif locale == "itIT" then
|
|
||||||
--@localization(locale="itIT", namespace="Categories", format="lua_additive_table", handle-unlocalized="ignore")@
|
|
||||||
elseif locale == "koKR" then
|
|
||||||
L["DISORIENTS"] = "방향 감각 상실"
|
|
||||||
L["INCAPACITATES"] = "행동 불가"
|
|
||||||
L["KNOCKBACKS"] = "밀쳐내기"
|
|
||||||
L["ROOTS"] = "이동 불가"
|
|
||||||
L["SILENCES"] = "침묵"
|
|
||||||
L["STUNS"] = "기절"
|
|
||||||
elseif locale == "ptBR" then
|
|
||||||
--@localization(locale="ptBR", namespace="Categories", format="lua_additive_table", handle-unlocalized="ignore")@
|
|
||||||
elseif locale == "ruRU" then
|
|
||||||
L["DISARMS"] = "Разоружение"
|
|
||||||
L["DISORIENTS"] = "Дезориентация"
|
|
||||||
L["FEARS"] = "Опасения"
|
|
||||||
L["INCAPACITATES"] = "Паралич"
|
|
||||||
L["KNOCKBACKS"] = "Отбрасывание"
|
|
||||||
L["RANDOM_ROOTS"] = "Случайные корни"
|
|
||||||
L["RANDOM_STUNS"] = "Случайные оглушения"
|
|
||||||
L["ROOTS"] = "Сковывание"
|
|
||||||
L["SILENCES"] = "Немота"
|
|
||||||
L["STUNS"] = "Оглушение"
|
|
||||||
L["TAUNTS"] = "Насмешки"
|
|
||||||
elseif locale == "esES" or locale == "esMX" then
|
|
||||||
L["DISARMS"] = "Desarmar"
|
|
||||||
L["DISORIENTS"] = "Desorientar"
|
|
||||||
L["FEARS"] = "Miedos"
|
|
||||||
L["INCAPACITATES"] = "Incapacitar"
|
|
||||||
L["KNOCKBACKS"] = "Derribos"
|
|
||||||
L["RANDOM_ROOTS"] = "Raíces aleatorias"
|
|
||||||
L["RANDOM_STUNS"] = "Aturdir aleatorio"
|
|
||||||
L["ROOTS"] = "Raíces"
|
|
||||||
L["SILENCES"] = "Silencios"
|
|
||||||
L["STUNS"] = "Aturdimientos"
|
|
||||||
L["TAUNTS"] = "Provocaciones"
|
|
||||||
elseif locale == "zhCN" then
|
|
||||||
L["DISARMS"] = "缴械"
|
|
||||||
L["DISORIENTS"] = "迷惑"
|
|
||||||
L["FEARS"] = "恐惧"
|
|
||||||
L["INCAPACITATES"] = "瘫痪"
|
|
||||||
L["KNOCKBACKS"] = "击退"
|
|
||||||
L["RANDOM_ROOTS"] = "随机定身"
|
|
||||||
L["RANDOM_STUNS"] = "随机眩晕"
|
|
||||||
L["ROOTS"] = "定身"
|
|
||||||
L["SILENCES"] = "沉默"
|
|
||||||
L["STUNS"] = "昏迷"
|
|
||||||
L["TAUNTS"] = "嘲讽"
|
|
||||||
elseif locale == "zhTW" then
|
|
||||||
L["DISARMS"] = "繳械"
|
|
||||||
L["DISORIENTS"] = "迷惑"
|
|
||||||
L["FEARS"] = "恐懼"
|
|
||||||
L["INCAPACITATES"] = "癱瘓"
|
|
||||||
L["KNOCKBACKS"] = "擊退"
|
|
||||||
L["RANDOM_ROOTS"] = "隨機定身"
|
|
||||||
L["RANDOM_STUNS"] = "隨機昏迷"
|
|
||||||
L["ROOTS"] = "定身"
|
|
||||||
L["SILENCES"] = "沉默"
|
|
||||||
L["STUNS"] = "昏迷"
|
|
||||||
L["TAUNTS"] = "嘲諷"
|
|
||||||
end
|
|
||||||
-- luacheck: pop
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
-- Check what game version we're running
|
|
||||||
Lib.gameExpansion = ({
|
|
||||||
[WOW_PROJECT_MAINLINE] = "retail",
|
|
||||||
[WOW_PROJECT_CLASSIC] = "classic",
|
|
||||||
[WOW_PROJECT_BURNING_CRUSADE_CLASSIC or 5] = "tbc",
|
|
||||||
[WOW_PROJECT_WRATH_CLASSIC or 11] = "wotlk",
|
|
||||||
})[WOW_PROJECT_ID]
|
|
||||||
|
|
||||||
-- How long it takes for a DR to expire, in seconds.
|
|
||||||
Lib.resetTimes = {
|
|
||||||
retail = {
|
|
||||||
["default"] = 18.5, -- static 18 sec + 0.5 latency
|
|
||||||
["npc"] = 21, -- Against mobs it seems to last slightly longer, depending on server load
|
|
||||||
["knockback"] = 10.5, -- Knockbacks are immediately immune and only DRs for 10s
|
|
||||||
},
|
|
||||||
|
|
||||||
classic = {
|
|
||||||
["default"] = 20, -- dynamic between 15 and 20s
|
|
||||||
["npc"] = 21,
|
|
||||||
},
|
|
||||||
|
|
||||||
tbc = {
|
|
||||||
["default"] = 20, -- dynamic between 15 and 20s
|
|
||||||
["npc"] = 21,
|
|
||||||
},
|
|
||||||
|
|
||||||
wotlk = {
|
|
||||||
["default"] = 20, -- dynamic between 15 and 20s
|
|
||||||
["npc"] = 21,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- List of all DR categories, english -> localized.
|
|
||||||
Lib.categoryNames = {
|
|
||||||
retail = {
|
|
||||||
["disorient"] = L.DISORIENTS,
|
|
||||||
["incapacitate"] = L.INCAPACITATES,
|
|
||||||
["silence"] = L.SILENCES,
|
|
||||||
["stun"] = L.STUNS,
|
|
||||||
["root"] = L.ROOTS,
|
|
||||||
["disarm"] = L.DISARMS,
|
|
||||||
["taunt"] = L.TAUNTS,
|
|
||||||
["knockback"] = L.KNOCKBACKS,
|
|
||||||
},
|
|
||||||
|
|
||||||
classic = {
|
|
||||||
["incapacitate"] = L.INCAPACITATES,
|
|
||||||
["stun"] = L.STUNS, -- controlled stun
|
|
||||||
["root"] = L.ROOTS, -- controlled root
|
|
||||||
["random_stun"] = L.RANDOM_STUNS, -- random proc stun, usually short (<3s)
|
|
||||||
["random_root"] = L.RANDOM_ROOTS,
|
|
||||||
["fear"] = L.FEARS,
|
|
||||||
["mind_control"] = L.MIND_CONTROL,
|
|
||||||
["frost_shock"] = L.FROST_SHOCK,
|
|
||||||
["kidney_shot"] = L.KIDNEY_SHOT,
|
|
||||||
},
|
|
||||||
|
|
||||||
tbc = {
|
|
||||||
["disorient"] = L.DISORIENTS,
|
|
||||||
["incapacitate"] = L.INCAPACITATES,
|
|
||||||
["stun"] = L.STUNS,
|
|
||||||
["random_stun"] = L.RANDOM_STUNS,
|
|
||||||
["random_root"] = L.RANDOM_ROOTS,
|
|
||||||
["root"] = L.ROOTS,
|
|
||||||
["disarm"] = L.DISARMS,
|
|
||||||
["fear"] = L.FEARS,
|
|
||||||
["scatter"] = L.SCATTERS,
|
|
||||||
["mind_control"] = L.MIND_CONTROL,
|
|
||||||
["kidney_shot"] = L.KIDNEY_SHOT,
|
|
||||||
["death_coil"] = L.DEATH_COIL,
|
|
||||||
["unstable_affliction"] = L.UNSTABLE_AFFLICTION,
|
|
||||||
["chastise"] = L.CHASTISE,
|
|
||||||
["counterattack"] = L.COUNTERATTACK,
|
|
||||||
},
|
|
||||||
|
|
||||||
wotlk = {
|
|
||||||
["incapacitate"] = L.INCAPACITATES,
|
|
||||||
["stun"] = L.STUNS,
|
|
||||||
["random_stun"] = L.RANDOM_STUNS,
|
|
||||||
["random_root"] = L.RANDOM_ROOTS,
|
|
||||||
["root"] = L.ROOTS,
|
|
||||||
["disarm"] = L.DISARMS,
|
|
||||||
["fear"] = L.FEARS,
|
|
||||||
["scatter"] = L.SCATTERS,
|
|
||||||
["silence"] = L.SILENCES,
|
|
||||||
["horror"] = L.HORROR,
|
|
||||||
["mind_control"] = L.MIND_CONTROL,
|
|
||||||
["cyclone"] = L.CYCLONE,
|
|
||||||
["charge"] = L.CHARGE,
|
|
||||||
["opener_stun"] = L.OPENER_STUN,
|
|
||||||
["counterattack"] = L.COUNTERATTACK,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Categories that have DR against normal mobs.
|
|
||||||
-- Note that for retail some special mobs have DR on all categories,
|
|
||||||
-- see UnitClassification() and UnitIsQuestBoss().
|
|
||||||
Lib.categoriesPvE = {
|
|
||||||
retail = {
|
|
||||||
["taunt"] = L.TAUNTS,
|
|
||||||
["stun"] = L.STUNS,
|
|
||||||
},
|
|
||||||
|
|
||||||
classic = {
|
|
||||||
["stun"] = L.STUNS,
|
|
||||||
["kidney_shot"] = L.KIDNEY_SHOT,
|
|
||||||
},
|
|
||||||
|
|
||||||
tbc = {
|
|
||||||
["stun"] = L.STUNS,
|
|
||||||
["random_stun"] = L.RANDOM_STUNS,
|
|
||||||
["kidney_shot"] = L.KIDNEY_SHOT,
|
|
||||||
},
|
|
||||||
|
|
||||||
wotlk = {
|
|
||||||
--["taunt"] = L.TAUNTS,
|
|
||||||
["stun"] = L.STUNS,
|
|
||||||
["random_stun"] = L.RANDOM_STUNS,
|
|
||||||
["opener_stun"] = L.OPENER_STUN,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Successives diminished durations
|
|
||||||
Lib.diminishedDurations = {
|
|
||||||
retail = {
|
|
||||||
-- Decreases by 50%, immune at the 4th application
|
|
||||||
["default"] = { 0.50, 0.25 },
|
|
||||||
-- Decreases by 35%, immune at the 5th application
|
|
||||||
["taunt"] = { 0.65, 0.42, 0.27 },
|
|
||||||
-- Immediately immune
|
|
||||||
["knockback"] = {},
|
|
||||||
},
|
|
||||||
|
|
||||||
classic = {
|
|
||||||
["default"] = { 0.50, 0.25 },
|
|
||||||
},
|
|
||||||
|
|
||||||
tbc = {
|
|
||||||
["default"] = { 0.50, 0.25 },
|
|
||||||
},
|
|
||||||
|
|
||||||
wotlk = {
|
|
||||||
["default"] = { 0.50, 0.25 },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
-- Public API
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
--- Get table of all spells that DRs.
|
|
||||||
-- Key is the spellID, and value is the unlocalized DR category.
|
|
||||||
-- For Classic the key is the localized spell name instead, and value
|
|
||||||
-- is a table containing both the DR category and spell ID. (Classic has no spellID payload in the combat log)
|
|
||||||
-- @see IterateSpellsByCategory
|
|
||||||
-- @treturn ?table {number=string}|table {string=table}
|
|
||||||
function Lib:GetSpells()
|
|
||||||
return Lib.spellList
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Get table of all DR categories.
|
|
||||||
-- Key is unlocalized name used for API functions, value is localized name used for UI.
|
|
||||||
-- @treturn table {string=string}
|
|
||||||
function Lib:GetCategories()
|
|
||||||
return Lib.categoryNames[Lib.gameExpansion]
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Get table of all categories that DRs in PvE.
|
|
||||||
-- Key is unlocalized name used for API functions, value is localized name used for UI.
|
|
||||||
-- Note that for retail some special mobs have DR on all categories,
|
|
||||||
-- see UnitClassification() and UnitIsQuestBoss().
|
|
||||||
-- Tip: you can combine :GetPvECategories() and :IterateSpellsByCategory() to get spellIDs only for PvE aswell.
|
|
||||||
-- @treturn table {string=string}
|
|
||||||
function Lib:GetPvECategories()
|
|
||||||
return Lib.categoriesPvE[Lib.gameExpansion]
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Get constant for how long a DR lasts for a given category.
|
|
||||||
-- @tparam[opt="default"] string category Unlocalized category name, or "npc" for PvE timer.
|
|
||||||
-- @treturn number
|
|
||||||
function Lib:GetResetTime(category)
|
|
||||||
return Lib.resetTimes[Lib.gameExpansion][category or "default"] or Lib.resetTimes[Lib.gameExpansion].default
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Get unlocalized DR category by spell ID.
|
|
||||||
-- For Classic (vanilla) you should pass in the spell name instead of ID.
|
|
||||||
-- For Classic you also get an optional second return value
|
|
||||||
-- which is the hardcoded spell ID of the spell name you passed in.
|
|
||||||
-- You should use this ID to query additional info from Blizzard API if needed, as
|
|
||||||
-- spell names only works for the player if they have the spell in their current spellbook.
|
|
||||||
-- @tparam number spellID
|
|
||||||
-- @treturn[1] string|nil The category name.
|
|
||||||
-- @treturn[2] number|nil The spell ID. (Classic only)
|
|
||||||
function Lib:GetCategoryBySpellID(spellID)
|
|
||||||
if Lib.gameExpansion == "classic" then
|
|
||||||
-- special case for classic as CLEU doesn't provide spellIDs
|
|
||||||
local data = Lib.spellList[spellID]
|
|
||||||
if not data then return end
|
|
||||||
return data.category, data.spellID
|
|
||||||
end
|
|
||||||
|
|
||||||
return Lib.spellList[spellID]
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Get localized category from unlocalized category name, case sensitive.
|
|
||||||
-- @tparam string category Unlocalized category name
|
|
||||||
-- @treturn ?string|nil The localized category name.
|
|
||||||
function Lib:GetCategoryLocalization(category)
|
|
||||||
return Lib.categoryNames[Lib.gameExpansion][category]
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Check if a category has DR against mobs.
|
|
||||||
-- Note that for retail some special mobs have DR on all categories, you need to check for this yourself;
|
|
||||||
-- see UnitClassification() and UnitIsQuestBoss().
|
|
||||||
-- @tparam string category Unlocalized category name
|
|
||||||
-- @treturn bool
|
|
||||||
function Lib:IsPvECategory(category)
|
|
||||||
return Lib.categoriesPvE[Lib.gameExpansion][category] and true or false -- make sure bool is always returned here
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Get next successive diminished duration
|
|
||||||
-- @tparam number diminished How many times the DR has been applied so far
|
|
||||||
-- @tparam[opt="default"] string category Unlocalized category name
|
|
||||||
-- @usage local reduction = DRList:GetNextDR(1) -- returns 0.50, half duration on debuff
|
|
||||||
-- @treturn number DR percentage in decimals. Returns 0 if max DR is reached or arguments are invalid.
|
|
||||||
function Lib:GetNextDR(diminished, category)
|
|
||||||
local durations = Lib.diminishedDurations[Lib.gameExpansion][category or "default"]
|
|
||||||
if not durations and Lib.categoryNames[Lib.gameExpansion][category] then
|
|
||||||
-- Redirect to default when "stun", "root" etc is passed
|
|
||||||
durations = Lib.diminishedDurations[Lib.gameExpansion]["default"]
|
|
||||||
end
|
|
||||||
|
|
||||||
return durations and durations[diminished] or 0
|
|
||||||
end
|
|
||||||
|
|
||||||
do
|
|
||||||
local next = _G.next
|
|
||||||
|
|
||||||
local function CategoryIterator(category, index)
|
|
||||||
local spellList, newCat = Lib.spellList
|
|
||||||
repeat
|
|
||||||
index, newCat = next(spellList, index)
|
|
||||||
if index then
|
|
||||||
if newCat == category or newCat.category == category then
|
|
||||||
return index, category
|
|
||||||
end
|
|
||||||
end
|
|
||||||
until not index
|
|
||||||
end
|
|
||||||
|
|
||||||
--- Iterate through the spells of a given category.
|
|
||||||
-- @tparam string category Unlocalized category name
|
|
||||||
-- @usage for spellID in DRList:IterateSpellsByCategory("root") do print(spellID) end
|
|
||||||
-- @return Iterator function
|
|
||||||
function Lib:IterateSpellsByCategory(category)
|
|
||||||
assert(Lib.categoryNames[Lib.gameExpansion][category], "invalid category")
|
|
||||||
return CategoryIterator, category
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- keep same API as DRData-1.0 for easier transitions
|
|
||||||
Lib.GetCategoryName = Lib.GetCategoryLocalization
|
|
||||||
Lib.IsPVE = Lib.IsPvECategory
|
|
||||||
Lib.NextDR = Lib.GetNextDR
|
|
||||||
Lib.GetSpellCategory = Lib.GetCategoryBySpellID
|
|
||||||
Lib.RESET_TIME = Lib.resetTimes[Lib.gameExpansion].default
|
|
||||||
Lib.pveDR = Lib.categoriesPvE
|
|
||||||
Lib.IterateSpells = function(cat) if cat then return Lib.IterateSpellsByCategory(cat) else return next, Lib.spellList end end
|
|
@ -1,25 +0,0 @@
|
|||||||
## Interface: 100105
|
|
||||||
## Interface-Classic: 11403
|
|
||||||
## Interface-BCC: 20504
|
|
||||||
## Interface-Wrath: 30402
|
|
||||||
## IconTexture: Interface\Icons\Spell_nature_heavypolymorph1
|
|
||||||
## Title: Lib: DRList-1.0
|
|
||||||
## Version: @project-version@
|
|
||||||
## X-Category: Library
|
|
||||||
## X-License: MIT
|
|
||||||
## X-Curse-Project-ID: 315757
|
|
||||||
## X-Wago-ID: 9rN4BxKD
|
|
||||||
|
|
||||||
#@no-lib-strip@
|
|
||||||
libs\LibStub\LibStub.lua
|
|
||||||
#@end-no-lib-strip@
|
|
||||||
|
|
||||||
DRList-1.0.xml
|
|
||||||
|
|
||||||
#@do-not-package@
|
|
||||||
tests\engine.lua
|
|
||||||
tests\test-retail.lua
|
|
||||||
tests\test-classic.lua
|
|
||||||
tests\test-tbc.lua
|
|
||||||
tests\test-wotlk.lua
|
|
||||||
#@end-do-not-package@
|
|
@ -1,4 +0,0 @@
|
|||||||
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
|
|
||||||
<Script file="DRList-1.0.lua"/>
|
|
||||||
<Script file="Spells.lua"/>
|
|
||||||
</Ui>
|
|
@ -1,734 +0,0 @@
|
|||||||
local MAJOR, MINOR = "DRList-1.0", 54 -- Don't forget to change this in DRList-1.0.lua aswell!
|
|
||||||
local Lib = LibStub(MAJOR)
|
|
||||||
if Lib.spellListVersion and Lib.spellListVersion >= MINOR then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
Lib.spellListVersion = MINOR
|
|
||||||
|
|
||||||
if Lib.gameExpansion == "retail" then
|
|
||||||
|
|
||||||
-- SpellID list for mainline aka retail WoW
|
|
||||||
Lib.spellList = {
|
|
||||||
[207167] = "disorient", -- Blinding Sleet
|
|
||||||
[207685] = "disorient", -- Sigil of Misery
|
|
||||||
[33786] = "disorient", -- Cyclone
|
|
||||||
[360806] = "disorient", -- Sleep Walk
|
|
||||||
[1513] = "disorient", -- Scare Beast
|
|
||||||
[31661] = "disorient", -- Dragon's Breath
|
|
||||||
[198909] = "disorient", -- Song of Chi-ji
|
|
||||||
[202274] = "disorient", -- Hot Trub
|
|
||||||
[105421] = "disorient", -- Blinding Light
|
|
||||||
[10326] = "disorient", -- Turn Evil
|
|
||||||
[205364] = "disorient", -- Dominate Mind
|
|
||||||
[605] = "disorient", -- Mind Control
|
|
||||||
[8122] = "disorient", -- Psychic Scream
|
|
||||||
[226943] = "disorient", -- Mind Bomb
|
|
||||||
[2094] = "disorient", -- Blind
|
|
||||||
[118699] = "disorient", -- Fear
|
|
||||||
[130616] = "disorient", -- Fear (Horrify)
|
|
||||||
[5484] = "disorient", -- Howl of Terror
|
|
||||||
[261589] = "disorient", -- Seduction (Grimoire of Sacrifice)
|
|
||||||
[6358] = "disorient", -- Seduction (Succubus)
|
|
||||||
[5246] = "disorient", -- Intimidating Shout 1
|
|
||||||
[316593] = "disorient", -- Intimidating Shout 2 (TODO: not sure which one is correct in 9.0.1)
|
|
||||||
[316595] = "disorient", -- Intimidating Shout 3
|
|
||||||
[331866] = "disorient", -- Agent of Chaos (Venthyr Covenant)
|
|
||||||
|
|
||||||
[217832] = "incapacitate", -- Imprison
|
|
||||||
[221527] = "incapacitate", -- Imprison (Honor talent)
|
|
||||||
[2637] = "incapacitate", -- Hibernate
|
|
||||||
[99] = "incapacitate", -- Incapacitating Roar
|
|
||||||
[378441] = "incapacitate", -- Time Stop
|
|
||||||
[3355] = "incapacitate", -- Freezing Trap
|
|
||||||
[203337] = "incapacitate", -- Freezing Trap (Honor talent)
|
|
||||||
[213691] = "incapacitate", -- Scatter Shot
|
|
||||||
[383121] = "incapacitate", -- Mass Polymorph
|
|
||||||
[118] = "incapacitate", -- Polymorph
|
|
||||||
[28271] = "incapacitate", -- Polymorph (Turtle)
|
|
||||||
[28272] = "incapacitate", -- Polymorph (Pig)
|
|
||||||
[61025] = "incapacitate", -- Polymorph (Snake)
|
|
||||||
[61305] = "incapacitate", -- Polymorph (Black Cat)
|
|
||||||
[61780] = "incapacitate", -- Polymorph (Turkey)
|
|
||||||
[61721] = "incapacitate", -- Polymorph (Rabbit)
|
|
||||||
[126819] = "incapacitate", -- Polymorph (Porcupine)
|
|
||||||
[161353] = "incapacitate", -- Polymorph (Polar Bear Cub)
|
|
||||||
[161354] = "incapacitate", -- Polymorph (Monkey)
|
|
||||||
[161355] = "incapacitate", -- Polymorph (Penguin)
|
|
||||||
[161372] = "incapacitate", -- Polymorph (Peacock)
|
|
||||||
[277787] = "incapacitate", -- Polymorph (Baby Direhorn)
|
|
||||||
[277792] = "incapacitate", -- Polymorph (Bumblebee)
|
|
||||||
[321395] = "incapacitate", -- Polymorph (Mawrat)
|
|
||||||
[391622] = "incapacitate", -- Polymorph (Duck)
|
|
||||||
[82691] = "incapacitate", -- Ring of Frost
|
|
||||||
[115078] = "incapacitate", -- Paralysis
|
|
||||||
[357768] = "incapacitate", -- Paralysis 2 (Perpetual Paralysis?)
|
|
||||||
[20066] = "incapacitate", -- Repentance
|
|
||||||
[9484] = "incapacitate", -- Shackle Undead
|
|
||||||
[200196] = "incapacitate", -- Holy Word: Chastise
|
|
||||||
[1776] = "incapacitate", -- Gouge
|
|
||||||
[6770] = "incapacitate", -- Sap
|
|
||||||
[51514] = "incapacitate", -- Hex
|
|
||||||
[196942] = "incapacitate", -- Hex (Voodoo Totem)
|
|
||||||
[210873] = "incapacitate", -- Hex (Raptor)
|
|
||||||
[211004] = "incapacitate", -- Hex (Spider)
|
|
||||||
[211010] = "incapacitate", -- Hex (Snake)
|
|
||||||
[211015] = "incapacitate", -- Hex (Cockroach)
|
|
||||||
[269352] = "incapacitate", -- Hex (Skeletal Hatchling)
|
|
||||||
[309328] = "incapacitate", -- Hex (Living Honey)
|
|
||||||
[277778] = "incapacitate", -- Hex (Zandalari Tendonripper)
|
|
||||||
[277784] = "incapacitate", -- Hex (Wicker Mongrel)
|
|
||||||
[197214] = "incapacitate", -- Sundering
|
|
||||||
[710] = "incapacitate", -- Banish
|
|
||||||
[6789] = "incapacitate", -- Mortal Coil
|
|
||||||
[107079] = "incapacitate", -- Quaking Palm (Pandaren racial)
|
|
||||||
|
|
||||||
[47476] = "silence", -- Strangulate
|
|
||||||
[204490] = "silence", -- Sigil of Silence
|
|
||||||
-- [78675] = "silence", -- Solar Beam (has no DR)
|
|
||||||
[410065] = "silence", -- Reactive Resin
|
|
||||||
[202933] = "silence", -- Spider Sting
|
|
||||||
[356727] = "silence", -- Spider Venom
|
|
||||||
[354831] = "silence", -- Wailing Arrow 1
|
|
||||||
[355596] = "silence", -- Wailing Arrow 2
|
|
||||||
[217824] = "silence", -- Shield of Virtue
|
|
||||||
[15487] = "silence", -- Silence
|
|
||||||
[1330] = "silence", -- Garrote
|
|
||||||
[196364] = "silence", -- Unstable Affliction Silence Effect
|
|
||||||
|
|
||||||
[210141] = "stun", -- Zombie Explosion
|
|
||||||
[334693] = "stun", -- Absolute Zero (Breath of Sindragosa)
|
|
||||||
[108194] = "stun", -- Asphyxiate (Unholy)
|
|
||||||
[221562] = "stun", -- Asphyxiate (Blood)
|
|
||||||
[91800] = "stun", -- Gnaw (Ghoul)
|
|
||||||
[91797] = "stun", -- Monstrous Blow (Mutated Ghoul)
|
|
||||||
[287254] = "stun", -- Dead of Winter
|
|
||||||
[179057] = "stun", -- Chaos Nova
|
|
||||||
[205630] = "stun", -- Illidan's Grasp (Primary effect)
|
|
||||||
[208618] = "stun", -- Illidan's Grasp (Secondary effect)
|
|
||||||
[211881] = "stun", -- Fel Eruption
|
|
||||||
[200166] = "stun", -- Metamorphosis (PvE stun effect)
|
|
||||||
[203123] = "stun", -- Maim
|
|
||||||
[163505] = "stun", -- Rake (Prowl)
|
|
||||||
[5211] = "stun", -- Mighty Bash
|
|
||||||
[202244] = "stun", -- Overrun
|
|
||||||
[325321] = "stun", -- Wild Hunt's Charge
|
|
||||||
[372245] = "stun", -- Terror of the Skies
|
|
||||||
[117526] = "stun", -- Binding Shot
|
|
||||||
[357021] = "stun", -- Consecutive Concussion
|
|
||||||
[24394] = "stun", -- Intimidation
|
|
||||||
[389831] = "stun", -- Snowdrift
|
|
||||||
[119381] = "stun", -- Leg Sweep
|
|
||||||
[202346] = "stun", -- Double Barrel
|
|
||||||
[385149] = "stun", -- Exorcism
|
|
||||||
[853] = "stun", -- Hammer of Justice
|
|
||||||
[255941] = "stun", -- Wake of Ashes
|
|
||||||
[64044] = "stun", -- Psychic Horror
|
|
||||||
[200200] = "stun", -- Holy Word: Chastise Censure
|
|
||||||
[1833] = "stun", -- Cheap Shot
|
|
||||||
[408] = "stun", -- Kidney Shot
|
|
||||||
[118905] = "stun", -- Static Charge (Capacitor Totem)
|
|
||||||
[118345] = "stun", -- Pulverize (Primal Earth Elemental)
|
|
||||||
[305485] = "stun", -- Lightning Lasso
|
|
||||||
[89766] = "stun", -- Axe Toss
|
|
||||||
[171017] = "stun", -- Meteor Strike (Infernal)
|
|
||||||
[171018] = "stun", -- Meteor Strike (Abyssal)
|
|
||||||
[30283] = "stun", -- Shadowfury
|
|
||||||
[385954] = "stun", -- Shield Charge
|
|
||||||
[46968] = "stun", -- Shockwave
|
|
||||||
[132168] = "stun", -- Shockwave (Protection)
|
|
||||||
[145047] = "stun", -- Shockwave (Proving Grounds PvE)
|
|
||||||
[132169] = "stun", -- Storm Bolt
|
|
||||||
[199085] = "stun", -- Warpath
|
|
||||||
[20549] = "stun", -- War Stomp (Tauren)
|
|
||||||
[255723] = "stun", -- Bull Rush (Highmountain Tauren)
|
|
||||||
[287712] = "stun", -- Haymaker (Kul Tiran)
|
|
||||||
[332423] = "stun", -- Sparkling Driftglobe Core (Kyrian Covenant)
|
|
||||||
-- TODO: Inferal Awakening?
|
|
||||||
|
|
||||||
[204085] = "root", -- Deathchill (Chains of Ice)
|
|
||||||
[233395] = "root", -- Deathchill (Remorseless Winter)
|
|
||||||
[339] = "root", -- Entangling Roots
|
|
||||||
[235963] = "root", -- Entangling Roots (Earthen Grasp)
|
|
||||||
[170855] = "root", -- Entangling Roots (Nature's Grasp)
|
|
||||||
[102359] = "root", -- Mass Entanglement
|
|
||||||
[355689] = "root", -- Landslide
|
|
||||||
[393456] = "root", -- Entrapment (Tar Trap)
|
|
||||||
[162480] = "root", -- Steel Trap
|
|
||||||
[273909] = "root", -- Steelclaw Trap
|
|
||||||
-- [190927] = "root_harpoon", -- Harpoon (TODO: confirm)
|
|
||||||
[212638] = "root", -- Tracker's Net
|
|
||||||
[201158] = "root", -- Super Sticky Tar
|
|
||||||
[122] = "root", -- Frost Nova
|
|
||||||
[33395] = "root", -- Freeze
|
|
||||||
[386770] = "root", -- Freezing Cold
|
|
||||||
[198121] = "root", -- Frostbite
|
|
||||||
[114404] = "root", -- Void Tendril's Grasp
|
|
||||||
[342375] = "root", -- Tormenting Backlash (Torghast PvE)
|
|
||||||
[233582] = "root", -- Entrenched in Flame
|
|
||||||
[116706] = "root", -- Disable
|
|
||||||
[324382] = "root", -- Clash
|
|
||||||
[64695] = "root", -- Earthgrab (Totem effect)
|
|
||||||
-- [356738] = "root", -- Earth Unleashed (doesn't seem to DR)
|
|
||||||
[285515] = "root", -- Surge of Power
|
|
||||||
[199042] = "root", -- Thunderstruck (Protection PvP Talent)
|
|
||||||
--[356356] = "root", -- Warbringer TODO: has DR?
|
|
||||||
[39965] = "root", -- Frost Grenade (Item)
|
|
||||||
[75148] = "root", -- Embersilk Net (Item)
|
|
||||||
[55536] = "root", -- Frostweave Net (Item)
|
|
||||||
[268966] = "root", -- Hooked Deep Sea Net (Item)
|
|
||||||
|
|
||||||
[209749] = "disarm", -- Faerie Swarm (Balance Honor Talent)
|
|
||||||
[407032] = "disarm", -- Sticky Tar Bomb 1
|
|
||||||
[407031] = "disarm", -- Sticky Tar Bomb 2
|
|
||||||
[207777] = "disarm", -- Dismantle
|
|
||||||
[233759] = "disarm", -- Grapple Weapon
|
|
||||||
[236077] = "disarm", -- Disarm
|
|
||||||
|
|
||||||
[56222] = "taunt", -- Dark Command
|
|
||||||
[51399] = "taunt", -- Death Grip (Taunt Effect)
|
|
||||||
[185245] = "taunt", -- Torment
|
|
||||||
[6795] = "taunt", -- Growl (Druid)
|
|
||||||
[2649] = "taunt", -- Growl (Hunter Pet) (TODO: confirm)
|
|
||||||
[20736] = "taunt", -- Distracting Shot
|
|
||||||
[116189] = "taunt", -- Provoke
|
|
||||||
[118635] = "taunt", -- Provoke (Black Ox Statue)
|
|
||||||
[196727] = "taunt", -- Provoke (Niuzao)
|
|
||||||
[204079] = "taunt", -- Final Stand
|
|
||||||
[62124] = "taunt", -- Hand of Reckoning
|
|
||||||
[17735] = "taunt", -- Suffering (Voidwalker) (TODO: confirm)
|
|
||||||
[355] = "taunt", -- Taunt
|
|
||||||
|
|
||||||
-- Experimental
|
|
||||||
[108199] = "knockback", -- Gorefiend's Grasp
|
|
||||||
[202249] = "knockback", -- Overrun
|
|
||||||
[61391] = "knockback", -- Typhoon
|
|
||||||
[102793] = "knockback", -- Ursol's Vortex
|
|
||||||
[186387] = "knockback", -- Bursting Shot
|
|
||||||
[236777] = "knockback", -- Hi-Explosive Trap
|
|
||||||
[157981] = "knockback", -- Blast Wave
|
|
||||||
[237371] = "knockback", -- Ring of Peace
|
|
||||||
[204263] = "knockback", -- Shining Force
|
|
||||||
[51490] = "knockback", -- Thunderstorm
|
|
||||||
-- [287712] = "knockback", -- Haywire (Kul'Tiran Racial)
|
|
||||||
}
|
|
||||||
|
|
||||||
elseif Lib.gameExpansion == "tbc" then
|
|
||||||
|
|
||||||
-- SpellID list for The Burning Crusade
|
|
||||||
-- spellID for every rank is used over spell name to avoid name collisions, and faster lookups
|
|
||||||
Lib.spellList = {
|
|
||||||
[2637] = "incapacitate", -- Hibernate (Rank 1)
|
|
||||||
[18657] = "incapacitate", -- Hibernate (Rank 2)
|
|
||||||
[18658] = "incapacitate", -- Hibernate (Rank 3)
|
|
||||||
[22570] = "incapacitate", -- Maim
|
|
||||||
[3355] = "incapacitate", -- Freezing Trap Effect (Rank 1)
|
|
||||||
[14308] = "incapacitate", -- Freezing Trap Effect (Rank 2)
|
|
||||||
[14309] = "incapacitate", -- Freezing Trap Effect (Rank 3)
|
|
||||||
[19386] = "incapacitate", -- Wyvern Sting (Rank 1)
|
|
||||||
[24132] = "incapacitate", -- Wyvern Sting (Rank 2)
|
|
||||||
[24133] = "incapacitate", -- Wyvern Sting (Rank 3)
|
|
||||||
[27068] = "incapacitate", -- Wyvern Sting (Rank 4)
|
|
||||||
[118] = "incapacitate", -- Polymorph (Rank 1)
|
|
||||||
[12824] = "incapacitate", -- Polymorph (Rank 2)
|
|
||||||
[12825] = "incapacitate", -- Polymorph (Rank 3)
|
|
||||||
[12826] = "incapacitate", -- Polymorph (Rank 4)
|
|
||||||
[28271] = "incapacitate", -- Polymorph: Turtle
|
|
||||||
[28272] = "incapacitate", -- Polymorph: Pig
|
|
||||||
[20066] = "incapacitate", -- Repentance
|
|
||||||
[6770] = "incapacitate", -- Sap (Rank 1)
|
|
||||||
[2070] = "incapacitate", -- Sap (Rank 2)
|
|
||||||
[11297] = "incapacitate", -- Sap (Rank 3)
|
|
||||||
[1776] = "incapacitate", -- Gouge (Rank 1)
|
|
||||||
[1777] = "incapacitate", -- Gouge (Rank 2)
|
|
||||||
[8629] = "incapacitate", -- Gouge (Rank 3)
|
|
||||||
[11285] = "incapacitate", -- Gouge (Rank 4)
|
|
||||||
[11286] = "incapacitate", -- Gouge (Rank 5)
|
|
||||||
[38764] = "incapacitate", -- Gouge (Rank 6)
|
|
||||||
[710] = "incapacitate", -- Banish (Rank 1)
|
|
||||||
[18647] = "incapacitate", -- Banish (Rank 2)
|
|
||||||
[13327] = "incapacitate", -- Reckless Charge (Rocket Helmet)
|
|
||||||
[4064] = "incapacitate", -- Rough Copper Bomb
|
|
||||||
[4065] = "incapacitate", -- Large Copper Bomb
|
|
||||||
[4066] = "incapacitate", -- Small Bronze Bomb
|
|
||||||
[4067] = "incapacitate", -- Big Bronze Bomb
|
|
||||||
[4068] = "incapacitate", -- Iron Grenade
|
|
||||||
[12421] = "incapacitate", -- Mithril Frag Bomb
|
|
||||||
[4069] = "incapacitate", -- Big Iron Bomb
|
|
||||||
[12562] = "incapacitate", -- The Big One
|
|
||||||
[12543] = "incapacitate", -- Hi-Explosive Bomb
|
|
||||||
[19769] = "incapacitate", -- Thorium Grenade
|
|
||||||
[19784] = "incapacitate", -- Dark Iron Bomb
|
|
||||||
[30216] = "incapacitate", -- Fel Iron Bomb
|
|
||||||
[30461] = "incapacitate", -- The Bigger One
|
|
||||||
[30217] = "incapacitate", -- Adamantite Grenade
|
|
||||||
|
|
||||||
[33786] = "disorient", -- Cyclone
|
|
||||||
[2094] = "disorient", -- Blind
|
|
||||||
|
|
||||||
[5211] = "stun", -- Bash (Rank 1)
|
|
||||||
[6798] = "stun", -- Bash (Rank 2)
|
|
||||||
[8983] = "stun", -- Bash (Rank 3)
|
|
||||||
[9005] = "stun", -- Pounce (Rank 1)
|
|
||||||
[9823] = "stun", -- Pounce (Rank 2)
|
|
||||||
[9827] = "stun", -- Pounce (Rank 3)
|
|
||||||
[27006] = "stun", -- Pounce (Rank 4)
|
|
||||||
[24394] = "stun", -- Intimidation
|
|
||||||
[853] = "stun", -- Hammer of Justice (Rank 1)
|
|
||||||
[5588] = "stun", -- Hammer of Justice (Rank 2)
|
|
||||||
[5589] = "stun", -- Hammer of Justice (Rank 3)
|
|
||||||
[10308] = "stun", -- Hammer of Justice (Rank 4)
|
|
||||||
[1833] = "stun", -- Cheap Shot
|
|
||||||
[30283] = "stun", -- Shadowfury (Rank 1)
|
|
||||||
[30413] = "stun", -- Shadowfury (Rank 2)
|
|
||||||
[30414] = "stun", -- Shadowfury (Rank 3)
|
|
||||||
[12809] = "stun", -- Concussion Blow
|
|
||||||
[7922] = "stun", -- Charge Stun
|
|
||||||
[20253] = "stun", -- Intercept Stun (Rank 1)
|
|
||||||
[20614] = "stun", -- Intercept Stun (Rank 2)
|
|
||||||
[20615] = "stun", -- Intercept Stun (Rank 3)
|
|
||||||
[25273] = "stun", -- Intercept Stun (Rank 4)
|
|
||||||
[25274] = "stun", -- Intercept Stun (Rank 5)
|
|
||||||
[20549] = "stun", -- War Stomp (Racial)
|
|
||||||
[13237] = "stun", -- Goblin Mortar
|
|
||||||
[835] = "stun", -- Tidal Charm
|
|
||||||
|
|
||||||
[16922] = "random_stun", -- Celestial Focus (Starfire Stun)
|
|
||||||
[19410] = "random_stun", -- Improved Concussive Shot
|
|
||||||
[12355] = "random_stun", -- Impact
|
|
||||||
[20170] = "random_stun", -- Seal of Justice Stun
|
|
||||||
[15269] = "random_stun", -- Blackout
|
|
||||||
[18093] = "random_stun", -- Pyroclasm
|
|
||||||
[39796] = "random_stun", -- Stoneclaw Stun
|
|
||||||
[12798] = "random_stun", -- Revenge Stun
|
|
||||||
[5530] = "random_stun", -- Mace Stun Effect (Mace Specialization)
|
|
||||||
[15283] = "random_stun", -- Stunning Blow (Weapon Proc)
|
|
||||||
[56] = "random_stun", -- Stun (Weapon Proc)
|
|
||||||
[34510] = "random_stun", -- Stormherald/Deep Thunder (Weapon Proc)
|
|
||||||
|
|
||||||
[10326] = "fear", -- Turn Evil (Might be PvE only until wotlk, adding just incase)
|
|
||||||
[8122] = "fear", -- Psychic Scream (Rank 1)
|
|
||||||
[8124] = "fear", -- Psychic Scream (Rank 2)
|
|
||||||
[10888] = "fear", -- Psychic Scream (Rank 3)
|
|
||||||
[10890] = "fear", -- Psychic Scream (Rank 4)
|
|
||||||
[5782] = "fear", -- Fear (Rank 1)
|
|
||||||
[6213] = "fear", -- Fear (Rank 2)
|
|
||||||
[6215] = "fear", -- Fear (Rank 3)
|
|
||||||
[6358] = "fear", -- Seduction (Succubus)
|
|
||||||
[5484] = "fear", -- Howl of Terror (Rank 1)
|
|
||||||
[17928] = "fear", -- Howl of Terror (Rank 2)
|
|
||||||
[1513] = "fear", -- Scare Beast (Rank 1)
|
|
||||||
[14326] = "fear", -- Scare Beast (Rank 2)
|
|
||||||
[14327] = "fear", -- Scare Beast (Rank 3)
|
|
||||||
[5246] = "fear", -- Intimidating Shout
|
|
||||||
[5134] = "fear", -- Flash Bomb Fear (Item)
|
|
||||||
|
|
||||||
[339] = "root", -- Entangling Roots (Rank 1)
|
|
||||||
[1062] = "root", -- Entangling Roots (Rank 2)
|
|
||||||
[5195] = "root", -- Entangling Roots (Rank 3)
|
|
||||||
[5196] = "root", -- Entangling Roots (Rank 4)
|
|
||||||
[9852] = "root", -- Entangling Roots (Rank 5)
|
|
||||||
[9853] = "root", -- Entangling Roots (Rank 6)
|
|
||||||
[26989] = "root", -- Entangling Roots (Rank 7)
|
|
||||||
[19975] = "root", -- Nature's Grasp (Rank 1)
|
|
||||||
[19974] = "root", -- Nature's Grasp (Rank 2)
|
|
||||||
[19973] = "root", -- Nature's Grasp (Rank 3)
|
|
||||||
[19972] = "root", -- Nature's Grasp (Rank 4)
|
|
||||||
[19971] = "root", -- Nature's Grasp (Rank 5)
|
|
||||||
[19970] = "root", -- Nature's Grasp (Rank 6)
|
|
||||||
[27010] = "root", -- Nature's Grasp (Rank 7)
|
|
||||||
[122] = "root", -- Frost Nova (Rank 1)
|
|
||||||
[865] = "root", -- Frost Nova (Rank 2)
|
|
||||||
[6131] = "root", -- Frost Nova (Rank 3)
|
|
||||||
[10230] = "root", -- Frost Nova (Rank 4)
|
|
||||||
[27088] = "root", -- Frost Nova (Rank 5)
|
|
||||||
[33395] = "root", -- Freeze (Water Elemental)
|
|
||||||
[39965] = "root", -- Frost Grenade (Item)
|
|
||||||
|
|
||||||
[605] = "mind_control", -- Mind Control (Rank 1)
|
|
||||||
[10911] = "mind_control", -- Mind Control (Rank 2)
|
|
||||||
[10912] = "mind_control", -- Mind Control (Rank 3)
|
|
||||||
[13181] = "mind_control", -- Gnomish Mind Control Cap
|
|
||||||
|
|
||||||
[14251] = "disarm", -- Riposte
|
|
||||||
[34097] = "disarm", -- Riposte 2 (TODO: Check which ID is the correct one)
|
|
||||||
[676] = "disarm", -- Disarm
|
|
||||||
|
|
||||||
[12494] = "random_root", -- Frostbite
|
|
||||||
[23694] = "random_root", -- Improved Hamstring
|
|
||||||
[19229] = "random_root", -- Improved Wing Clip
|
|
||||||
[19185] = "random_root", -- Entrapment
|
|
||||||
|
|
||||||
[19503] = "scatter", -- Scatter Shot
|
|
||||||
[31661] = "scatter", -- Dragon's Breath (Rank 1)
|
|
||||||
[33041] = "scatter", -- Dragon's Breath (Rank 2)
|
|
||||||
[33042] = "scatter", -- Dragon's Breath (Rank 3)
|
|
||||||
[33043] = "scatter", -- Dragon's Breath (Rank 4)
|
|
||||||
|
|
||||||
-- Spells that DR with itself only
|
|
||||||
[408] = "kidney_shot", -- Kidney Shot (Rank 1)
|
|
||||||
[8643] = "kidney_shot", -- Kidney Shot (Rank 2)
|
|
||||||
[43523] = "unstable_affliction", -- Unstable Affliction 1
|
|
||||||
[31117] = "unstable_affliction", -- Unstable Affliction 2
|
|
||||||
[6789] = "death_coil", -- Death Coil (Rank 1)
|
|
||||||
[17925] = "death_coil", -- Death Coil (Rank 2)
|
|
||||||
[17926] = "death_coil", -- Death Coil (Rank 3)
|
|
||||||
[27223] = "death_coil", -- Death Coil (Rank 4)
|
|
||||||
[44041] = "chastise", -- Chastise (Rank 1)
|
|
||||||
[44043] = "chastise", -- Chastise (Rank 2)
|
|
||||||
[44044] = "chastise", -- Chastise (Rank 3)
|
|
||||||
[44045] = "chastise", -- Chastise (Rank 4)
|
|
||||||
[44046] = "chastise", -- Chastise (Rank 5)
|
|
||||||
[44047] = "chastise", -- Chastise (Rank 6)
|
|
||||||
[19306] = "counterattack", -- Counterattack (Rank 1)
|
|
||||||
[20909] = "counterattack", -- Counterattack (Rank 2)
|
|
||||||
[20910] = "counterattack", -- Counterattack (Rank 3)
|
|
||||||
[27067] = "counterattack", -- Counterattack (Rank 4)
|
|
||||||
}
|
|
||||||
|
|
||||||
elseif Lib.gameExpansion == "wotlk" then
|
|
||||||
|
|
||||||
-- SpellID list for Wrath of the Lich King.
|
|
||||||
-- spellID for every rank is used over spell name to avoid name collisions, and faster lookups
|
|
||||||
Lib.spellList = {
|
|
||||||
[49203] = "incapacitate", -- Hungering Cold
|
|
||||||
[2637] = "incapacitate", -- Hibernate (Rank 1)
|
|
||||||
[18657] = "incapacitate", -- Hibernate (Rank 2)
|
|
||||||
[18658] = "incapacitate", -- Hibernate (Rank 3)
|
|
||||||
[60210] = "incapacitate", -- Freezing Arrow Effect (Rank 1)
|
|
||||||
[3355] = "incapacitate", -- Freezing Trap Effect (Rank 1)
|
|
||||||
[14308] = "incapacitate", -- Freezing Trap Effect (Rank 2)
|
|
||||||
[14309] = "incapacitate", -- Freezing Trap Effect (Rank 3)
|
|
||||||
[19386] = "incapacitate", -- Wyvern Sting (Rank 1)
|
|
||||||
[24132] = "incapacitate", -- Wyvern Sting (Rank 2)
|
|
||||||
[24133] = "incapacitate", -- Wyvern Sting (Rank 3)
|
|
||||||
[27068] = "incapacitate", -- Wyvern Sting (Rank 4)
|
|
||||||
[49011] = "incapacitate", -- Wyvern Sting (Rank 5)
|
|
||||||
[49012] = "incapacitate", -- Wyvern Sting (Rank 6)
|
|
||||||
[118] = "incapacitate", -- Polymorph (Rank 1)
|
|
||||||
[12824] = "incapacitate", -- Polymorph (Rank 2)
|
|
||||||
[12825] = "incapacitate", -- Polymorph (Rank 3)
|
|
||||||
[12826] = "incapacitate", -- Polymorph (Rank 4)
|
|
||||||
[28271] = "incapacitate", -- Polymorph: Turtle
|
|
||||||
[28272] = "incapacitate", -- Polymorph: Pig
|
|
||||||
[61721] = "incapacitate", -- Polymorph: Rabbit
|
|
||||||
[61780] = "incapacitate", -- Polymorph: Turkey
|
|
||||||
[61305] = "incapacitate", -- Polymorph: Black Cat
|
|
||||||
[20066] = "incapacitate", -- Repentance
|
|
||||||
[1776] = "incapacitate", -- Gouge
|
|
||||||
[6770] = "incapacitate", -- Sap (Rank 1)
|
|
||||||
[2070] = "incapacitate", -- Sap (Rank 2)
|
|
||||||
[11297] = "incapacitate", -- Sap (Rank 3)
|
|
||||||
[51724] = "incapacitate", -- Sap (Rank 4)
|
|
||||||
[710] = "incapacitate", -- Banish (Rank 1)
|
|
||||||
[18647] = "incapacitate", -- Banish (Rank 2)
|
|
||||||
[9484] = "incapacitate", -- Shackle Undead (Rank 1)
|
|
||||||
[9485] = "incapacitate", -- Shackle Undead (Rank 2)
|
|
||||||
[10955] = "incapacitate", -- Shackle Undead (Rank 3)
|
|
||||||
[51514] = "incapacitate", -- Hex
|
|
||||||
[13327] = "incapacitate", -- Reckless Charge (Rocket Helmet)
|
|
||||||
[4064] = "incapacitate", -- Rough Copper Bomb
|
|
||||||
[4065] = "incapacitate", -- Large Copper Bomb
|
|
||||||
[4066] = "incapacitate", -- Small Bronze Bomb
|
|
||||||
[4067] = "incapacitate", -- Big Bronze Bomb
|
|
||||||
[4068] = "incapacitate", -- Iron Grenade
|
|
||||||
[12421] = "incapacitate", -- Mithril Frag Bomb
|
|
||||||
[4069] = "incapacitate", -- Big Iron Bomb
|
|
||||||
[12562] = "incapacitate", -- The Big One
|
|
||||||
[12543] = "incapacitate", -- Hi-Explosive Bomb
|
|
||||||
[19769] = "incapacitate", -- Thorium Grenade
|
|
||||||
[19784] = "incapacitate", -- Dark Iron Bomb
|
|
||||||
[30216] = "incapacitate", -- Fel Iron Bomb
|
|
||||||
[30461] = "incapacitate", -- The Bigger One
|
|
||||||
[30217] = "incapacitate", -- Adamantite Grenade
|
|
||||||
[67769] = "incapacitate", -- Cobalt Frag Bomb
|
|
||||||
[67890] = "incapacitate", -- Cobalt Frag Bomb (Frag Belt)
|
|
||||||
[54466] = "incapacitate", -- Saronite Grenade
|
|
||||||
|
|
||||||
[47481] = "stun", -- Gnaw (Ghoul Pet)
|
|
||||||
[5211] = "stun", -- Bash (Rank 1)
|
|
||||||
[6798] = "stun", -- Bash (Rank 2)
|
|
||||||
[8983] = "stun", -- Bash (Rank 3)
|
|
||||||
[22570] = "stun", -- Maim (Rank 1)
|
|
||||||
[49802] = "stun", -- Maim (Rank 2)
|
|
||||||
[24394] = "stun", -- Intimidation
|
|
||||||
[50519] = "stun", -- Sonic Blast (Pet Rank 1)
|
|
||||||
[53564] = "stun", -- Sonic Blast (Pet Rank 2)
|
|
||||||
[53565] = "stun", -- Sonic Blast (Pet Rank 3)
|
|
||||||
[53566] = "stun", -- Sonic Blast (Pet Rank 4)
|
|
||||||
[53567] = "stun", -- Sonic Blast (Pet Rank 5)
|
|
||||||
[53568] = "stun", -- Sonic Blast (Pet Rank 6)
|
|
||||||
[50518] = "stun", -- Ravage (Pet Rank 1)
|
|
||||||
[53558] = "stun", -- Ravage (Pet Rank 2)
|
|
||||||
[53559] = "stun", -- Ravage (Pet Rank 3)
|
|
||||||
[53560] = "stun", -- Ravage (Pet Rank 4)
|
|
||||||
[53561] = "stun", -- Ravage (Pet Rank 5)
|
|
||||||
[53562] = "stun", -- Ravage (Pet Rank 6)
|
|
||||||
[44572] = "stun", -- Deep Freeze
|
|
||||||
[853] = "stun", -- Hammer of Justice (Rank 1)
|
|
||||||
[5588] = "stun", -- Hammer of Justice (Rank 2)
|
|
||||||
[5589] = "stun", -- Hammer of Justice (Rank 3)
|
|
||||||
[10308] = "stun", -- Hammer of Justice (Rank 4)
|
|
||||||
[2812] = "stun", -- Holy Wrath (Rank 1)
|
|
||||||
[10318] = "stun", -- Holy Wrath (Rank 2)
|
|
||||||
[27139] = "stun", -- Holy Wrath (Rank 3)
|
|
||||||
[48816] = "stun", -- Holy Wrath (Rank 4)
|
|
||||||
[48817] = "stun", -- Holy Wrath (Rank 5)
|
|
||||||
[408] = "stun", -- Kidney Shot (Rank 1)
|
|
||||||
[8643] = "stun", -- Kidney Shot (Rank 2)
|
|
||||||
[58861] = "stun", -- Bash (Spirit Wolves)
|
|
||||||
[30283] = "stun", -- Shadowfury (Rank 1)
|
|
||||||
[30413] = "stun", -- Shadowfury (Rank 2)
|
|
||||||
[30414] = "stun", -- Shadowfury (Rank 3)
|
|
||||||
[47846] = "stun", -- Shadowfury (Rank 4)
|
|
||||||
[47847] = "stun", -- Shadowfury (Rank 5)
|
|
||||||
[12809] = "stun", -- Concussion Blow
|
|
||||||
[60995] = "stun", -- Demon Charge
|
|
||||||
[30153] = "stun", -- Intercept (Felguard Rank 1)
|
|
||||||
[30195] = "stun", -- Intercept (Felguard Rank 2)
|
|
||||||
[30197] = "stun", -- Intercept (Felguard Rank 3)
|
|
||||||
[47995] = "stun", -- Intercept (Felguard Rank 4)
|
|
||||||
[20253] = "stun", -- Intercept Stun (Rank 1)
|
|
||||||
[20614] = "stun", -- Intercept Stun (Rank 2)
|
|
||||||
[20615] = "stun", -- Intercept Stun (Rank 3)
|
|
||||||
[25273] = "stun", -- Intercept Stun (Rank 4)
|
|
||||||
[25274] = "stun", -- Intercept Stun (Rank 5)
|
|
||||||
[46968] = "stun", -- Shockwave
|
|
||||||
[20549] = "stun", -- War Stomp (Racial)
|
|
||||||
|
|
||||||
[16922] = "random_stun", -- Celestial Focus (Starfire Stun)
|
|
||||||
[28445] = "random_stun", -- Improved Concussive Shot
|
|
||||||
[12355] = "random_stun", -- Impact
|
|
||||||
[20170] = "random_stun", -- Seal of Justice Stun
|
|
||||||
[39796] = "random_stun", -- Stoneclaw Stun
|
|
||||||
[12798] = "random_stun", -- Revenge Stun
|
|
||||||
[5530] = "random_stun", -- Mace Stun Effect (Mace Specialization)
|
|
||||||
[15283] = "random_stun", -- Stunning Blow (Weapon Proc)
|
|
||||||
[56] = "random_stun", -- Stun (Weapon Proc)
|
|
||||||
[34510] = "random_stun", -- Stormherald/Deep Thunder (Weapon Proc)
|
|
||||||
|
|
||||||
[1513] = "fear", -- Scare Beast (Rank 1)
|
|
||||||
[14326] = "fear", -- Scare Beast (Rank 2)
|
|
||||||
[14327] = "fear", -- Scare Beast (Rank 3)
|
|
||||||
[10326] = "fear", -- Turn Evil
|
|
||||||
[8122] = "fear", -- Psychic Scream (Rank 1)
|
|
||||||
[8124] = "fear", -- Psychic Scream (Rank 2)
|
|
||||||
[10888] = "fear", -- Psychic Scream (Rank 3)
|
|
||||||
[10890] = "fear", -- Psychic Scream (Rank 4)
|
|
||||||
[2094] = "fear", -- Blind
|
|
||||||
[5782] = "fear", -- Fear (Rank 1)
|
|
||||||
[6213] = "fear", -- Fear (Rank 2)
|
|
||||||
[6215] = "fear", -- Fear (Rank 3)
|
|
||||||
[6358] = "fear", -- Seduction (Succubus)
|
|
||||||
[5484] = "fear", -- Howl of Terror (Rank 1)
|
|
||||||
[17928] = "fear", -- Howl of Terror (Rank 2)
|
|
||||||
[5246] = "fear", -- Intimidating Shout
|
|
||||||
[5134] = "fear", -- Flash Bomb Fear (Item)
|
|
||||||
|
|
||||||
[339] = "root", -- Entangling Roots (Rank 1)
|
|
||||||
[1062] = "root", -- Entangling Roots (Rank 2)
|
|
||||||
[5195] = "root", -- Entangling Roots (Rank 3)
|
|
||||||
[5196] = "root", -- Entangling Roots (Rank 4)
|
|
||||||
[9852] = "root", -- Entangling Roots (Rank 5)
|
|
||||||
[9853] = "root", -- Entangling Roots (Rank 6)
|
|
||||||
[26989] = "root", -- Entangling Roots (Rank 7)
|
|
||||||
[53308] = "root", -- Entangling Roots (Rank 8)
|
|
||||||
[65857] = "root", -- Entangling Roots (Rank 8) (TODO: Not sure which ID is correct)
|
|
||||||
[19975] = "root", -- Nature's Grasp (Rank 1)
|
|
||||||
[19974] = "root", -- Nature's Grasp (Rank 2)
|
|
||||||
[19973] = "root", -- Nature's Grasp (Rank 3)
|
|
||||||
[19972] = "root", -- Nature's Grasp (Rank 4)
|
|
||||||
[19971] = "root", -- Nature's Grasp (Rank 5)
|
|
||||||
[19970] = "root", -- Nature's Grasp (Rank 6)
|
|
||||||
[27010] = "root", -- Nature's Grasp (Rank 7)
|
|
||||||
[53313] = "root", -- Nature's Grasp (Rank 8)
|
|
||||||
[66070] = "root", -- Nature's Grasp (Rank 8) (TODO: Not sure which ID is correct)
|
|
||||||
[50245] = "root", -- Pin (Rank 1)
|
|
||||||
[53544] = "root", -- Pin (Rank 2)
|
|
||||||
[53545] = "root", -- Pin (Rank 3)
|
|
||||||
[53546] = "root", -- Pin (Rank 4)
|
|
||||||
[53547] = "root", -- Pin (Rank 5)
|
|
||||||
[53548] = "root", -- Pin (Rank 6)
|
|
||||||
[33395] = "root", -- Freeze (Water Elemental)
|
|
||||||
[122] = "root", -- Frost Nova (Rank 1)
|
|
||||||
[865] = "root", -- Frost Nova (Rank 2)
|
|
||||||
[6131] = "root", -- Frost Nova (Rank 3)
|
|
||||||
[10230] = "root", -- Frost Nova (Rank 4)
|
|
||||||
[27088] = "root", -- Frost Nova (Rank 5)
|
|
||||||
[42917] = "root", -- Frost Nova (Rank 6)
|
|
||||||
[64695] = "root", -- Earthgrab
|
|
||||||
[39965] = "root", -- Frost Grenade (Item)
|
|
||||||
[63685] = "root", -- Freeze (Frost Shock)
|
|
||||||
[55536] = "root", -- Frostweave Net (Item)
|
|
||||||
|
|
||||||
[12494] = "random_root", -- Frostbite
|
|
||||||
[55080] = "random_root", -- Shattered Barrier
|
|
||||||
[58373] = "random_root", -- Glyph of Hamstring
|
|
||||||
[23694] = "random_root", -- Improved Hamstring
|
|
||||||
[47168] = "random_root", -- Improved Wing Clip
|
|
||||||
[19185] = "random_root", -- Entrapment
|
|
||||||
|
|
||||||
[53359] = "disarm", -- Chimera Shot (Scorpid)
|
|
||||||
[50541] = "disarm", -- Snatch (Rank 1)
|
|
||||||
[53537] = "disarm", -- Snatch (Rank 2)
|
|
||||||
[53538] = "disarm", -- Snatch (Rank 3)
|
|
||||||
[53540] = "disarm", -- Snatch (Rank 4)
|
|
||||||
[53542] = "disarm", -- Snatch (Rank 5)
|
|
||||||
[53543] = "disarm", -- Snatch (Rank 6)
|
|
||||||
[64346] = "disarm", -- Fiery Payback
|
|
||||||
[64058] = "disarm", -- Psychic Horror Disarm Effect
|
|
||||||
[51722] = "disarm", -- Dismantle
|
|
||||||
[676] = "disarm", -- Disarm
|
|
||||||
|
|
||||||
[47476] = "silence", -- Strangulate
|
|
||||||
[34490] = "silence", -- Silencing Shot
|
|
||||||
[35334] = "silence", -- Nether Shock 1 -- TODO: verify
|
|
||||||
[44957] = "silence", -- Nether Shock 2 -- TODO: verify
|
|
||||||
[18469] = "silence", -- Silenced - Improved Counterspell (Rank 1)
|
|
||||||
[55021] = "silence", -- Silenced - Improved Counterspell (Rank 2)
|
|
||||||
[63529] = "silence", -- Silenced - Shield of the Templar
|
|
||||||
[15487] = "silence", -- Silence
|
|
||||||
[1330] = "silence", -- Garrote - Silence
|
|
||||||
[18425] = "silence", -- Silenced - Improved Kick
|
|
||||||
[24259] = "silence", -- Spell Lock
|
|
||||||
[43523] = "silence", -- Unstable Affliction 1
|
|
||||||
[31117] = "silence", -- Unstable Affliction 2
|
|
||||||
[18498] = "silence", -- Silenced - Gag Order (Shield Slam)
|
|
||||||
[74347] = "silence", -- Silenced - Gag Order (Heroic Throw?)
|
|
||||||
[50613] = "silence", -- Arcane Torrent (Racial, Runic Power)
|
|
||||||
[28730] = "silence", -- Arcane Torrent (Racial, Mana)
|
|
||||||
[25046] = "silence", -- Arcane Torrent (Racial, Energy)
|
|
||||||
|
|
||||||
[64044] = "horror", -- Psychic Horror
|
|
||||||
[6789] = "horror", -- Death Coil (Rank 1)
|
|
||||||
[17925] = "horror", -- Death Coil (Rank 2)
|
|
||||||
[17926] = "horror", -- Death Coil (Rank 3)
|
|
||||||
[27223] = "horror", -- Death Coil (Rank 4)
|
|
||||||
[47859] = "horror", -- Death Coil (Rank 5)
|
|
||||||
[47860] = "horror", -- Death Coil (Rank 6)
|
|
||||||
|
|
||||||
[1833] = "opener_stun", -- Cheap Shot
|
|
||||||
[9005] = "opener_stun", -- Pounce (Rank 1)
|
|
||||||
[9823] = "opener_stun", -- Pounce (Rank 2)
|
|
||||||
[9827] = "opener_stun", -- Pounce (Rank 3)
|
|
||||||
[27006] = "opener_stun", -- Pounce (Rank 4)
|
|
||||||
[49803] = "opener_stun", -- Pounce (Rank 5)
|
|
||||||
|
|
||||||
[31661] = "scatter", -- Dragon's Breath (Rank 1)
|
|
||||||
[33041] = "scatter", -- Dragon's Breath (Rank 2)
|
|
||||||
[33042] = "scatter", -- Dragon's Breath (Rank 3)
|
|
||||||
[33043] = "scatter", -- Dragon's Breath (Rank 4)
|
|
||||||
[42949] = "scatter", -- Dragon's Breath (Rank 5)
|
|
||||||
[42950] = "scatter", -- Dragon's Breath (Rank 6)
|
|
||||||
[19503] = "scatter", -- Scatter Shot
|
|
||||||
|
|
||||||
-- Spells that DR with itself only
|
|
||||||
[33786] = "cyclone", -- Cyclone
|
|
||||||
[605] = "mind_control", -- Mind Control
|
|
||||||
[13181] = "mind_control", -- Gnomish Mind Control Cap
|
|
||||||
[67799] = "mind_control", -- Mind Amplification Dish
|
|
||||||
[7922] = "charge", -- Charge Stun
|
|
||||||
[19306] = "counterattack", -- Counterattack 1
|
|
||||||
[20909] = "counterattack", -- Counterattack 2
|
|
||||||
[20910] = "counterattack", -- Counterattack 3
|
|
||||||
[27067] = "counterattack", -- Counterattack 4
|
|
||||||
[48998] = "counterattack", -- Counterattack 5
|
|
||||||
[48999] = "counterattack", -- Counterattack 6
|
|
||||||
}
|
|
||||||
|
|
||||||
elseif Lib.gameExpansion == "classic" then
|
|
||||||
|
|
||||||
-- SpellID list for Classic Era (vanilla)
|
|
||||||
-- In Classic the spell ID payload is gone from the combat log, so we need the key here to be
|
|
||||||
-- spell name instead. We also provide spell ID in the table value so it's possible to retrieve
|
|
||||||
-- for example spell icon using GetSpellTexture(spellID) later on. (These functions only accept
|
|
||||||
-- spell names if the player has the spell in their spell book)
|
|
||||||
local GetSpellInfo = _G.GetSpellInfo -- upvalue
|
|
||||||
Lib.spellList = {
|
|
||||||
-- Controlled roots
|
|
||||||
[GetSpellInfo(339)] = { category = "root", spellID = 339 }, -- Entangling Roots
|
|
||||||
[GetSpellInfo(19306)] = { category = "root", spellID = 19306 }, -- Counterattack
|
|
||||||
[GetSpellInfo(122)] = { category = "root", spellID = 122 }, -- Frost Nova
|
|
||||||
-- [GetSpellInfo(13099)] = { category = "root", spellID = 13099 }, -- Net-o-Matic
|
|
||||||
-- [GetSpellInfo(8312)] = { category = "root", spellID = 8312 }, -- Trap
|
|
||||||
|
|
||||||
-- Controlled stuns
|
|
||||||
[GetSpellInfo(5211)] = { category = "stun", spellID = 5211 }, -- Bash
|
|
||||||
[GetSpellInfo(24394)] = { category = "stun", spellID = 24394 }, -- Intimidation
|
|
||||||
[GetSpellInfo(853)] = { category = "stun", spellID = 853 }, -- Hammer of Justice
|
|
||||||
[GetSpellInfo(9005)] = { category = "stun", spellID = 9005 }, -- Pounce
|
|
||||||
[GetSpellInfo(1833)] = { category = "stun", spellID = 1833 }, -- Cheap Shot
|
|
||||||
[GetSpellInfo(12809)] = { category = "stun", spellID = 12809 }, -- Concussion Blow
|
|
||||||
[GetSpellInfo(20253)] = { category = "stun", spellID = 20253 }, -- Intercept Stun
|
|
||||||
[GetSpellInfo(7922)] = { category = "stun", spellID = 7922 }, -- Charge Stun
|
|
||||||
[GetSpellInfo(20549)] = { category = "stun", spellID = 20549 }, -- War Stomp (Racial)
|
|
||||||
[GetSpellInfo(4068)] = { category = "stun", spellID = 4068 }, -- Iron Grenade
|
|
||||||
[GetSpellInfo(19769)] = { category = "stun", spellID = 19769 }, -- Thorium Grenade
|
|
||||||
[GetSpellInfo(13808)] = { category = "stun", spellID = 13808 }, -- M73 Frag Grenade
|
|
||||||
[GetSpellInfo(4069)] = { category = "stun", spellID = 4069 }, -- Big Iron Bomb
|
|
||||||
[GetSpellInfo(12543)] = { category = "stun", spellID = 12543 }, -- Hi-Explosive Bomb
|
|
||||||
[GetSpellInfo(4064)] = { category = "stun", spellID = 4064 }, -- Rough Copper Bomb
|
|
||||||
[GetSpellInfo(12421)] = { category = "stun", spellID = 12421 }, -- Mithril Frag Bomb
|
|
||||||
[GetSpellInfo(19784)] = { category = "stun", spellID = 19784 }, -- Dark Iron Bomb
|
|
||||||
[GetSpellInfo(4067)] = { category = "stun", spellID = 4067 }, -- Big Bronze Bomb
|
|
||||||
[GetSpellInfo(4066)] = { category = "stun", spellID = 4066 }, -- Small Bronze Bomb
|
|
||||||
[GetSpellInfo(4065)] = { category = "stun", spellID = 4065 }, -- Large Copper Bomb
|
|
||||||
[GetSpellInfo(13237)] = { category = "stun", spellID = 13237 }, -- Goblin Mortar
|
|
||||||
[GetSpellInfo(835)] = { category = "stun", spellID = 835 }, -- Tidal Charm
|
|
||||||
[GetSpellInfo(12562)] = { category = "stun", spellID = 12562 }, -- The Big One
|
|
||||||
|
|
||||||
-- Incapacitates
|
|
||||||
[GetSpellInfo(2637)] = { category = "incapacitate", spellID = 2637 }, -- Hibernate
|
|
||||||
[GetSpellInfo(3355)] = { category = "incapacitate", spellID = 3355 }, -- Freezing Trap
|
|
||||||
[GetSpellInfo(19503)] = { category = "incapacitate", spellID = 19503 }, -- Scatter Shot
|
|
||||||
[GetSpellInfo(19386)] = { category = "incapacitate", spellID = 19386 }, -- Wyvern Sting
|
|
||||||
[GetSpellInfo(28271)] = { category = "incapacitate", spellID = 28271 }, -- Polymorph: Turtle
|
|
||||||
[GetSpellInfo(28272)] = { category = "incapacitate", spellID = 28272 }, -- Polymorph: Pig
|
|
||||||
[GetSpellInfo(118)] = { category = "incapacitate", spellID = 118 }, -- Polymorph
|
|
||||||
[GetSpellInfo(20066)] = { category = "incapacitate", spellID = 20066 }, -- Repentance
|
|
||||||
[GetSpellInfo(1776)] = { category = "incapacitate", spellID = 1776 }, -- Gouge
|
|
||||||
[GetSpellInfo(6770)] = { category = "incapacitate", spellID = 6770 }, -- Sap
|
|
||||||
[GetSpellInfo(1090)] = { category = "incapacitate", spellID = 1090 }, -- Sleep
|
|
||||||
[GetSpellInfo(13327)] = { category = "incapacitate", spellID = 13327 }, -- Reckless Charge (Rocket Helmet)
|
|
||||||
[GetSpellInfo(26108)] = { category = "incapacitate", spellID = 26108 }, -- Glimpse of Madness
|
|
||||||
|
|
||||||
-- Fears
|
|
||||||
[GetSpellInfo(1513)] = { category = "fear", spellID = 1513 }, -- Scare Beast
|
|
||||||
[GetSpellInfo(8122)] = { category = "fear", spellID = 8122 }, -- Psychic Scream
|
|
||||||
[GetSpellInfo(5782)] = { category = "fear", spellID = 5782 }, -- Fear
|
|
||||||
[GetSpellInfo(5484)] = { category = "fear", spellID = 5484 }, -- Howl of Terror
|
|
||||||
[GetSpellInfo(6358)] = { category = "fear", spellID = 6358 }, -- Seduction
|
|
||||||
[GetSpellInfo(5246)] = { category = "fear", spellID = 5246 }, -- Intimidating Shout
|
|
||||||
[GetSpellInfo(5134)] = { category = "fear", spellID = 5134 }, -- Flash Bomb Fear
|
|
||||||
|
|
||||||
-- Random/short roots
|
|
||||||
[GetSpellInfo(19229)] = { category = "random_root", spellID = 19229 }, -- Improved Wing Clip
|
|
||||||
-- [GetSpellInfo(27868)] = { category = "random_root", spellID = 12494 }, -- Frostbite
|
|
||||||
[GetSpellInfo(23694)] = { category = "random_root", spellID = 23694 }, -- Improved Hamstring
|
|
||||||
[GetSpellInfo(27868)] = { category = "random_root", spellID = 27868 }, -- Freeze (Item proc and set bonus)
|
|
||||||
|
|
||||||
-- Random/short stuns
|
|
||||||
[GetSpellInfo(16922)] = { category = "random_stun", spellID = 16922 }, -- Improved Starfire
|
|
||||||
[GetSpellInfo(19410)] = { category = "random_stun", spellID = 19410 }, -- Improved Concussive Shot
|
|
||||||
[GetSpellInfo(12355)] = { category = "random_stun", spellID = 12355 }, -- Impact
|
|
||||||
[GetSpellInfo(20170)] = { category = "random_stun", spellID = 20170 }, -- Seal of Justice Stun
|
|
||||||
[GetSpellInfo(15269)] = { category = "random_stun", spellID = 15269 }, -- Blackout
|
|
||||||
[GetSpellInfo(18093)] = { category = "random_stun", spellID = 18093 }, -- Pyroclasm
|
|
||||||
[GetSpellInfo(12798)] = { category = "random_stun", spellID = 12798 }, -- Revenge Stun
|
|
||||||
[GetSpellInfo(5530)] = { category = "random_stun", spellID = 5530 }, -- Mace Stun Effect (Mace Specialization)
|
|
||||||
[GetSpellInfo(15283)] = { category = "random_stun", spellID = 15283 }, -- Stunning Blow (Weapon Proc)
|
|
||||||
[GetSpellInfo(56)] = { category = "random_stun", spellID = 56 }, -- Stun (Weapon Proc)
|
|
||||||
[GetSpellInfo(21152)] = { category = "random_stun", spellID = 21152 }, -- Earthshaker (Weapon Proc)
|
|
||||||
|
|
||||||
-- Spells that DRs with itself only
|
|
||||||
[GetSpellInfo(408)] = { category = "kidney_shot", spellID = 408 }, -- Kidney Shot
|
|
||||||
[GetSpellInfo(605)] = { category = "mind_control", spellID = 605 }, -- Mind Control
|
|
||||||
[GetSpellInfo(13181)] = { category = "mind_control", spellID = 13181 }, -- Gnomish Mind Control Cap
|
|
||||||
[GetSpellInfo(8056)] = { category = "frost_shock", spellID = 8056 }, -- Frost Shock
|
|
||||||
}
|
|
||||||
else
|
|
||||||
print("DRList-1.0: Unsupported game expansion loaded.") -- luacheck: ignore
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Alias for DRData-1.0
|
|
||||||
Lib.spells = Lib.spellList
|
|
@ -6,23 +6,24 @@ local Buff = LibClassAuras.Buff
|
|||||||
-------------
|
-------------
|
||||||
-- PRIEST
|
-- PRIEST
|
||||||
-------------
|
-------------
|
||||||
Buff({ 1243, 1244, 1245, 2791, 10937, 10938, 25389, 48161 }, { buffType = "magic" }, "PRIEST") -- Power Word: Fortitude
|
Buff({ 1243, 1244, 1245, 2791, 10937, 10938, 25389 }, { buffType = "magic" }, "PRIEST") -- Power Word: Fortitude
|
||||||
Buff({ 21562, 21564, 25392, 48162 }, { buffType = "magic" }, "PRIEST") -- Prayer of Fortitude
|
Buff({ 21562, 21564, 25392 }, { buffType = "magic" }, "PRIEST") -- Prayer of Fortitude
|
||||||
Buff({ 17, 592, 600, 3747, 6065, 6066, 10898, 10899, 10900, 10901, 25217, 25218, 48065, 48066 }, { buffType = "magic" }, "PRIEST") -- Power Word: Shield
|
Buff({ 17, 592, 600, 3747, 6065, 6066, 10898, 10899, 10900, 10901, 25217, 25218 }, { buffType = "magic" }, "PRIEST") -- Power Word: Shield
|
||||||
Buff({ 588, 7128, 602, 1006, 10951, 10952, 25431, 48040, 48168 }, { buffType = "magic" }, "PRIEST") -- Inner Fire
|
Buff({ 588, 7128, 602, 1006, 10951, 10952, 25431 }, { buffType = "magic" }, "PRIEST") -- Inner Fire
|
||||||
Buff({ 2651 }, { buffType = "magic" }, "PRIEST") -- Elune's Grace
|
Buff({ 2651 }, { buffType = "magic" }, "PRIEST") -- Elune's Grace
|
||||||
Buff({ 6346 }, { buffType = "magic" }, "PRIEST") -- Fear Ward
|
Buff({ 6346 }, { buffType = "magic" }, "PRIEST") -- Fear Ward
|
||||||
Buff({ 14752, 14818, 14819, 27841, 25312, 48073 }, { buffType = "magic" }, "PRIEST") -- Divine Spirit
|
Buff({ 14752, 14818, 14819, 27841, 25312 }, { buffType = "magic" }, "PRIEST") -- Divine Spirit
|
||||||
Buff({ 27681, 32999, 48074 }, { buffType = "magic" }, "PRIEST") -- Prayer of Spirit
|
Buff({ 27681, 32999 }, { buffType = "magic" }, "PRIEST") -- Prayer of Spirit
|
||||||
Buff({ 1706 }, { buffType = "magic" }, "PRIEST") -- Levitate
|
Buff({ 1706 }, { buffType = "magic" }, "PRIEST") -- Levitate
|
||||||
Buff({ 139, 6074, 6075, 6076, 6077, 6078, 10927, 10928, 10929, 25315, 25221, 25222, 48067, 48068 }, { buffType = "magic" }, "PRIEST") -- Renew
|
Buff({ 139, 6074, 6075, 6076, 6077, 6078, 10927, 10928, 10929, 25315, 25221, 25222 }, { buffType = "magic" }, "PRIEST") -- Renew
|
||||||
Buff({ 552 }, { buffType = "magic" }, "PRIEST") -- Abolish Disease
|
Buff({ 552 }, { buffType = "magic" }, "PRIEST") -- Abolish Disease
|
||||||
Buff({ 33076, 48112, 48113 }, { buffType = "magic" }, "PRIEST") -- Prayer of Mending
|
Buff({ 33076 }, { buffType = "magic" }, "PRIEST") -- Prayer of Mending
|
||||||
Buff({ 586, 9578, 9579, 9592, 10941, 10942, 25429 }, { buffType = "magic" }, "PRIEST") -- Fade
|
Buff({ 586, 9578, 9579, 9592, 10941, 10942, 25429 }, { buffType = "magic" }, "PRIEST") -- Fade
|
||||||
Buff({ 2652, 19261, 19262, 19264, 19265, 19266, 25461 }, { buffType = "magic" }, "PRIEST") -- Touch of Weakness
|
Buff({ 2652, 19261, 19262, 19264, 19265, 19266, 25461 }, { buffType = "magic" }, "PRIEST") -- Touch of Weakness
|
||||||
Buff({ 18137, 19308, 19310, 19311, 19312, 25477 }, { buffType = "magic" }, "PRIEST") -- Shadowguard
|
Buff({ 18137, 19308, 19310, 19311, 19312, 25477 }, { buffType = "magic" }, "PRIEST") -- Shadowguard
|
||||||
Buff({ 976, 10957, 10958, 16874, 25433 }, { buffType = "magic" }, "PRIEST") -- Shadow Protection
|
Buff({ 976, 10957, 10958, 16874, 25433 }, { buffType = "magic" }, "PRIEST") -- Shadow Protection
|
||||||
Buff({ 27683, 39374 }, { buffType = "magic" }, "PRIEST") -- Prayer of Shadow Protection
|
Buff({ 27683, 39374 }, { buffType = "magic" }, "PRIEST") -- Prayer of Shadow Protection
|
||||||
|
Buff({ 15473 }, { buffType = "form" }, "PRIEST") -- Shadowform
|
||||||
--talents
|
--talents
|
||||||
Buff({ 14893, 15357, 15359 }, { buffType = "magic" }, "PRIEST") -- Inspiration
|
Buff({ 14893, 15357, 15359 }, { buffType = "magic" }, "PRIEST") -- Inspiration
|
||||||
Buff({ 27813, 27817, 27818 }, { buffType = "magic" }, "PRIEST") -- Blessed Recovery
|
Buff({ 27813, 27817, 27818 }, { buffType = "magic" }, "PRIEST") -- Blessed Recovery
|
||||||
@ -31,189 +32,68 @@ Buff({ 14751 }, { buffType = "magic" }, "PRIEST") -- Inner Focus
|
|||||||
Buff({ 10060 }, { buffType = "magic" }, "PRIEST") -- Power Infusion
|
Buff({ 10060 }, { buffType = "magic" }, "PRIEST") -- Power Infusion
|
||||||
Buff({ 33206 }, { buffType = "magic" }, "PRIEST") -- Pain Suppression
|
Buff({ 33206 }, { buffType = "magic" }, "PRIEST") -- Pain Suppression
|
||||||
Buff({ 34754 }, { buffType = "magic" }, "PRIEST") -- Clearcasting
|
Buff({ 34754 }, { buffType = "magic" }, "PRIEST") -- Clearcasting
|
||||||
Buff({ 15473 }, { buffType = "form" }, "PRIEST") -- Shadowform
|
|
||||||
Buff({ 47788 }, { buffType = "magic" }, "PRIEST") -- Guardian's Spirit
|
|
||||||
Buff({ 47585 }, { buffType = "magic" }, "PRIEST") -- Dispersion
|
|
||||||
Buff({ 65081 }, { buffType = "magic" }, "PRIEST") -- Body and Soul
|
|
||||||
Buff({ 33151 }, { buffType = "magic" }, "PRIEST") -- Surge of Light
|
|
||||||
Buff({ 47753 }, { buffType = "magic" }, "PRIEST") -- Divine Aegis
|
|
||||||
Buff({ 47930 }, { buffType = "magic" }, "PRIEST") -- Grace
|
|
||||||
Buff({ 63734 }, { buffType = "magic" }, "PRIEST") -- Serendipity
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
-- DRUID
|
-- DRUID
|
||||||
---------------
|
---------------
|
||||||
Buff({ 467, 782, 1075, 8914, 9756, 9910, 26992, 53307 }, { buffType = "magic"}, "DRUID") -- Thorns
|
Buff({ 467, 782, 1075, 8914, 9756, 9910, 26992 }, { buffType = "magic"}, "DRUID") -- Thorns
|
||||||
Buff({ 5487 }, { buffType = "form"}, "DRUID") -- Bear Form
|
Buff({ 5487 }, { buffType = "form"}, "DRUID") -- Bear Form
|
||||||
Buff({ 783 }, { buffType = "form"}, "DRUID") -- Travel Form
|
Buff({ 783 }, { buffType = "form"}, "DRUID") -- Travel Form
|
||||||
Buff({ 9634 }, { buffType = "form"}, "DRUID") -- Dire Bear Form
|
Buff({ 9634 }, { buffType = "form"}, "DRUID") -- Dire Bear Form
|
||||||
Buff({ 768 }, { buffType = "form"}, "DRUID") -- Cat Form
|
Buff({ 768 }, { buffType = "form"}, "DRUID") -- Cat Form
|
||||||
Buff({ 22812 }, { buffType = "magic"}, "DRUID") -- Barkskin
|
Buff({ 22812 }, { buffType = "magic"}, "DRUID") -- Barkskin
|
||||||
Buff({ 5229 }, { buffType = "enrage"}, "DRUID") -- Enrage
|
Buff({ 5229 }, { buffType = "physical"}, "DRUID") -- Enrage
|
||||||
Buff({ 5217, 6793, 9845, 9846, 50212, 50213 }, { buffType = "physical"}, "DRUID") -- Tiger's Fury
|
Buff({ 5217, 6793, 9845, 9846 }, { buffType = "physical"}, "DRUID") -- Tiger's Fury
|
||||||
Buff({ 1850, 9821, 33357 }, { buffType = "physical"}, "DRUID") -- Dash
|
Buff({ 1850, 9821, 33357 }, { buffType = "physical"}, "DRUID") -- Dash
|
||||||
Buff({ 22842 }, { buffType = "physical"}, "DRUID") -- Frenzied Regeneration
|
Buff({ 22842, 22895, 22896, 26999 }, { buffType = "physical"}, "DRUID") -- Frenzied Regeneration
|
||||||
Buff({ 1126, 5232, 6756, 5234, 8907, 9884, 9885, 26990, 48469 }, { buffType = "magic"}, "DRUID") -- Mark of the Wild
|
Buff({ 1126, 5232, 6756, 5234, 8907, 9884, 9885, 26990 }, { buffType = "magic"}, "DRUID") -- Mark of the Wild
|
||||||
Buff({ 21849, 21850, 26991, 48470 }, { buffType = "magic"}, "DRUID") -- Gift of the Wild
|
Buff({ 21849, 21850, 26991 }, { buffType = "magic"}, "DRUID") -- Gift of the Wild
|
||||||
Buff({ 774, 1058, 1430, 2090, 2091, 3627, 8910, 9839, 9840, 9841, 25299, 26981, 26982, 48442, 48443 }, { buffType = "magic"}, "DRUID") -- Regrowth
|
Buff({ 774, 1058, 1430, 2090, 2091, 3627, 8910, 9839, 9840, 9841, 25299, 26981, 26982 }, { buffType = "magic"}, "DRUID") -- Regrowth
|
||||||
Buff({ 8936, 8938, 8939, 8940, 8941, 9750, 9856, 9857, 9858, 26980, 48440, 48441 }, { buffType = "magic"}, "DRUID") -- Rejuvenation
|
Buff({ 8936, 8938, 8939, 8940, 8941, 9750, 9856, 9857, 9858, 26980 }, { buffType = "magic"}, "DRUID") -- Rejuvenation
|
||||||
Buff({ 2893 }, { buffType = "magic"}, "DRUID") -- Abolish Poison
|
Buff({ 2893 }, { buffType = "magic"}, "DRUID") -- Abolish Poison
|
||||||
Buff({ 33763, 48450, 48451}, { buffType = "magic"}, "DRUID") -- Lifebloom
|
Buff({ 33763 }, { buffType = "magic"}, "DRUID") -- Lifebloom
|
||||||
--Talents
|
--Talents
|
||||||
Buff({ 24858 }, { buffType = "form"}, "DRUID") -- Moonkin Form
|
Buff({ 24858 }, { buffType = "form"}, "DRUID") -- Moonkin Form
|
||||||
Buff({ 24907 }, { buffType = "aura"}, "DRUID") -- Moonkin Aura
|
Buff({ 24907 }, { buffType = "aura"}, "DRUID") -- Moonkin Aura
|
||||||
Buff({ 33891 }, { buffType = "form"}, "DRUID") -- Tree of Life
|
Buff({ 33891 }, { buffType = "form"}, "DRUID") -- Tree of Life
|
||||||
Buff({ 16864, 16870 }, { buffType = "magic"}, "DRUID") -- Omen of Clarity
|
Buff({ 16864 }, { buffType = "magic"}, "DRUID") -- Omen of Clarity
|
||||||
Buff({ 16689, 16810, 16811, 16812, 16813, 17329, 27009, 53312 }, { buffType = "magic"}, "DRUID") -- Nature's Grasp
|
Buff({ 16689, 16810, 16811, 16812, 16813, 17329, 27009 }, { buffType = "magic"}, "DRUID") -- Nature's Grasp
|
||||||
Buff({ 45281, 45282, 45283 }, { buffType = "magic"}, "DRUID") -- Natural Perfection
|
Buff({ 45281, 45282, 45283 }, { buffType = "magic"}, "DRUID") -- Natural Perfection
|
||||||
Buff({ 17116 }, { buffType = "magic"}, "DRUID") -- Nature's Swiftness
|
Buff({ 16188 }, { buffType = "magic"}, "DRUID") -- Nature's Swiftness
|
||||||
Buff({ 17007 }, { buffType = "aura"}, "DRUID") -- Leader of the Pack
|
Buff({ 17007 }, { buffType = "aura"}, "DRUID") -- Leader of the Pack
|
||||||
Buff({ 48518 }, { buffType = "physical"}, "DRUID") -- Eclipse (Lunar)
|
|
||||||
Buff({ 48517 }, { buffType = "physical"}, "DRUID") -- Eclipse (Solar)
|
|
||||||
Buff({ 16886 }, { buffType = "magic"}, "DRUID") -- Nature's Grace
|
|
||||||
Buff({ 48503, 48504 }, { buffType = "magic"}, "DRUID") -- Living Seed
|
|
||||||
Buff({ 50334 }, { buffType = "physical"}, "DRUID") -- Berserk
|
|
||||||
Buff({ 52610, 62071 }, { buffType = "enrage"}, "DRUID") -- Savage Roar
|
|
||||||
Buff({ 48391 }, { buffType = "enrage"}, "DRUID") -- Owlkin Frenzy
|
|
||||||
|
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
-- WARRIOR -- TODO
|
-- WARRIOR
|
||||||
-------------
|
-------------
|
||||||
Buff({ 29838 }, { buffType = "physical"}, "WARRIOR") -- Second Wind
|
--Buff({ 29703 }, { buffType = "physical"}, "WARRIOR") -- Dazed
|
||||||
Buff({ 12292 }, { buffType = "enrage"}, "WARRIOR") -- Death Wish
|
|
||||||
Buff({ 6673 }, { buffType = "physical"}, "WARRIOR") -- Battle Shout
|
|
||||||
Buff({ 469 }, { buffType = "physical"}, "WARRIOR") -- Commanding Shout
|
|
||||||
Buff({ 12328 }, { buffType = "physical"}, "WARRIOR") -- Sweeping Strikes
|
|
||||||
Buff({ 29801, 30032 }, { buffType = "aura"}, "WARRIOR") -- Rampage
|
|
||||||
Buff({ 2687 }, { buffType = "enrage"}, "WARRIOR") -- Blood Rage
|
|
||||||
Buff({ 20230 }, { buffType = "physical"}, "WARRIOR") -- Retaliation
|
|
||||||
Buff({ 871 }, { buffType = "physical"}, "WARRIOR") -- Shield Wall
|
|
||||||
Buff({ 18499 }, { buffType = "enrage"}, "WARRIOR") -- Berserker Rage
|
|
||||||
Buff({ 23885 }, { buffType = "enrage"}, "WARRIOR") -- Bloodthirst
|
|
||||||
Buff({ 3411 }, { buffType = "physical"}, "WARRIOR") -- Intervene
|
|
||||||
Buff({ 50622 }, { buffType = "physical"}, "WARRIOR") -- Bladestorm (whirlwind)
|
|
||||||
Buff({ 52437 }, { buffType = "physical"}, "WARRIOR") -- Sudden Death
|
|
||||||
Buff({ 57522 }, { buffType = "physical"}, "WARRIOR") -- Wrecking Crew
|
|
||||||
Buff({ 46916 }, { buffType = "physical"}, "WARRIOR") -- Slam!
|
|
||||||
Buff({ 50720 }, { buffType = "physical"}, "WARRIOR") -- Vigilance
|
|
||||||
Buff({ 55694 }, { buffType = "enrage"}, "WARRIOR") -- Enraged Regeneration
|
|
||||||
Buff({ 1719 }, { buffType = "enrage"}, "WARRIOR") -- Recklessness
|
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
-- ROGUE -- TODO
|
-- ROGUE
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Buff({ 2983 }, { buffType = "physical" }, "ROGUE") -- Sprint
|
Buff({ 2983 }, { buffType = "physical" }, "ROGUE") -- Sprint
|
||||||
Buff({ 5277 }, { buffType = "physical" }, "ROGUE") -- Evasion
|
Buff({ 5277 }, { buffType = "physical" }, "ROGUE") -- Evasion
|
||||||
Buff({ 31224 }, { buffType = "physical" }, "ROGUE") -- Cloak of Shadows
|
|
||||||
Buff({ 14278 }, { buffType = "physical" }, "ROGUE") -- Ghostly Strike
|
|
||||||
Buff({ 51713 }, { buffType = "physical" }, "ROGUE") -- Shadow Dance
|
|
||||||
Buff({ 31665 }, { buffType = "physical" }, "ROGUE") -- Master of Subtlety
|
|
||||||
Buff({ 51690 }, { buffType = "physical" }, "ROGUE") -- Killing Spree
|
|
||||||
Buff({ 63848 }, { buffType = "enrage" }, "ROGUE") -- Hunger For Blood
|
|
||||||
Buff({ 57934 }, { buffType = "physical" }, "ROGUE") -- Tricks of the Trade
|
|
||||||
|
|
||||||
|
|
||||||
------------
|
------------
|
||||||
-- WARLOCK --TODO
|
-- WARLOCK
|
||||||
------------
|
------------
|
||||||
Buff({ 19028 }, { buffType = "aura"}, "WARLOCK") -- Soul Link
|
Buff({ 19028 }, { buffType = "immune"}, "WARLOCK") -- Soul Link
|
||||||
Buff({ 687, 696 }, { buffType = "aura"}, "WARLOCK") -- Demon Skin
|
Buff({ 23759 }, { buffType = "immune"}, "WARLOCK") -- Master Demonologist
|
||||||
Buff({ 706, 1086, 11733, 11734, 11735, 27260, 47793, 47889 }, { buffType = "aura"}, "WARLOCK") -- Demon Armor
|
|
||||||
Buff({ 28176, 28189, 47892, 47893 }, { buffType = "aura"}, "WARLOCK") -- Fel Armor
|
|
||||||
Buff({ 23759 }, { buffType = "aura"}, "WARLOCK") -- Master Demonologist
|
|
||||||
Buff({ 34936 }, { buffType = "magic"}, "WARLOCK") -- Backlash
|
|
||||||
Buff({ 5697 }, { buffType = "magic"}, "WARLOCK") -- Unending Breath
|
|
||||||
Buff({ 132 }, { buffType = "magic"}, "WARLOCK") -- Detect Invisibility
|
|
||||||
Buff({ 1949, 11683, 11684, 27213, 47823 }, { buffType = "aura"}, "WARLOCK") -- Hellfire
|
|
||||||
Buff({ 6229, 11739, 11740, 28610, 47890, 47891 }, { buffType = "magic"}, "WARLOCK") -- Shadow Ward
|
|
||||||
Buff({ 19480, 20435, 41002 }, { buffType = "aura"}, "WARLOCK") -- Paranoia
|
|
||||||
Buff({ 7812, 19438, 19440, 19441, 19442, 19443, 27273, 47985, 47986 }, { buffType = "magic"}, "WARLOCK") -- Sacrifice
|
|
||||||
Buff({ 2947, 8316, 8317, 11770, 11771, 27269, 47983 }, { buffType = "magic"}, "WARLOCK") -- Fire Shield
|
|
||||||
Buff({ 48018 }, { buffType = "magic"}, "WARLOCK") -- Demonic Circle: Summon
|
|
||||||
Buff({ 59672 }, { buffType = "physical"}, "WARLOCK") -- Metamorphosis
|
|
||||||
Buff({ 54277 }, { buffType = "physical"}, "WARLOCK") -- Backdraft
|
|
||||||
Buff({ 47283 }, { buffType = "magic"}, "WARLOCK") -- Empowered Imp
|
|
||||||
Buff({ 64371 }, { buffType = "magic"}, "WARLOCK") -- Eradication
|
|
||||||
Buff({ 18093, 63243, 63244 } ,{ buffType = "physical" }, "WARLOCK") -- Pyroclasm
|
|
||||||
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
-- SHAMAN
|
-- SHAMAN
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Buff({ 8178 } ,{ buffType = "magic" }, "SHAMAN") -- Grounding Totem Effect
|
Buff({ 8178 } ,{ buffType = "magic" }, "SHAMAN") -- Grounding Totem Effect
|
||||||
Buff({ 30823 } ,{ buffType = "magic" }, "SHAMAN") -- Shamanistic Rage
|
|
||||||
Buff({ 32182 } ,{ buffType = "magic" }, "SHAMAN") -- Heroism
|
|
||||||
Buff({ 2825 } ,{ buffType = "magic" }, "SHAMAN") -- Bloodlust
|
|
||||||
Buff({ 974, 32593, 32594, 49283, 49284 } ,{ buffType = "magic" }, "SHAMAN") -- Earth Shield
|
|
||||||
Buff({ 24398, 33736, 57960 } ,{ buffType = "magic" }, "SHAMAN") -- Water Shield
|
|
||||||
Buff({ 324, 25472, 49280, 49281 } ,{ buffType = "magic" }, "SHAMAN") -- Lightning Shield
|
|
||||||
Buff({ 16188 } ,{ buffType = "magic" }, "SHAMAN") -- Nature's Swiftness
|
|
||||||
Buff({ 16166 } ,{ buffType = "magic" }, "SHAMAN") -- Elemental Mastery
|
|
||||||
Buff({ 51470 } ,{ buffType = "aura" }, "SHAMAN") -- Elemental Oath
|
|
||||||
Buff({ 30809 } ,{ buffType = "aura" }, "SHAMAN") -- Unleashed Rage
|
|
||||||
Buff({ 52179 } ,{ buffType = "magic" }, "SHAMAN") -- Astral Shift
|
|
||||||
Buff({ 61295, 61299, 61300, 61301 } ,{ buffType = "magic" }, "SHAMAN") -- Riptide
|
|
||||||
Buff({ 53390 } ,{ buffType = "magic" }, "SHAMAN") -- Tidal Waves
|
|
||||||
Buff({ 52000, 51999, 51998, 51997, 51990, 51945 } ,{ buffType = "magic" }, "SHAMAN") -- Earthliving proc
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
-- PALADIN --TODO
|
-- PALADIN
|
||||||
--------------
|
--------------
|
||||||
--Blessings
|
|
||||||
Buff( { 1022, 5599, 10278 }, { buffType = "magic"}, "PALADIN") -- Blessing/Hand of Protection
|
|
||||||
Buff( { 6940 }, { buffType = "magic"}, "PALADIN") -- Blessing/Hand of Sacrifice
|
|
||||||
Buff( { 1044, 66115 }, { buffType = "magic"}, "PALADIN") -- Blessing/Hand of Freedom
|
|
||||||
Buff( { 19740, 19834, 19835, 19836, 19837, 19838, 25291, 27140, 48931, 48932 }, { buffType = "magic"}, "PALADIN") -- Blessing of Might
|
|
||||||
Buff( { 19742, 19850, 19852, 19853, 19854, 25290, 27142, 48935, 48936 }, { buffType = "magic"}, "PALADIN") -- Blessing of Wisdom
|
|
||||||
Buff( { 20217 }, { buffType = "magic"}, "PALADIN") -- Blessing of Kings
|
|
||||||
Buff( { 19977 }, { buffType = "magic"}, "PALADIN") -- Blessing of Light
|
|
||||||
Buff( { 1038 }, { buffType = "magic"}, "PALADIN") -- Blessing/Hand of Salvation
|
|
||||||
Buff( { 20911 }, { buffType = "magic"}, "PALADIN") -- Blessing of Sanctuary
|
|
||||||
Buff( { 25898 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Kings
|
|
||||||
Buff( { 25890 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Light
|
|
||||||
Buff( { 25782, 27141, 48933, 48934 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Might
|
|
||||||
Buff( { 25895 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Salvation
|
|
||||||
Buff( { 25899 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Sanctuary
|
|
||||||
Buff( { 25894, 48937 }, { buffType = "magic"}, "PALADIN") -- Greater Blessing of Wisdom
|
|
||||||
Buff( { 642 }, { buffType = "immune"}, "PALADIN") -- Divine Shield
|
|
||||||
Buff( { 31884 }, { buffType = "magic"}, "PALADIN") -- Avenging Wrath
|
|
||||||
--Auras
|
|
||||||
Buff( { 465, 10290, 643, 10291, 1032, 10292, 10293, 27149, 48941, 48942 }, { buffType = "aura"}, "PALADIN") -- Devotion Aura
|
|
||||||
Buff( { 7294 }, { buffType = "aura"}, "PALADIN") -- Retribution Aura
|
|
||||||
Buff( { 19746 }, { buffType = "aura"}, "PALADIN") -- Concentration Aura
|
|
||||||
Buff( { 19876 }, { buffType = "aura"}, "PALADIN") -- Shadow Resistance Aura
|
|
||||||
Buff( { 20218 }, { buffType = "aura"}, "PALADIN") -- Sanctity Aura
|
|
||||||
Buff( { 19888 }, { buffType = "aura"}, "PALADIN") -- Frost Resistance Aura
|
|
||||||
Buff( { 19891 }, { buffType = "aura"}, "PALADIN") -- Fire Resistance Aura
|
|
||||||
Buff( { 32223 }, { buffType = "aura"}, "PALADIN") -- Crusader Aura
|
|
||||||
--Seals
|
|
||||||
Buff( { 20154, 21084, 20287, 20288, 20289, 20290, 20291, 20292, 20293, 27155 }, { buffType = "magic"}, "PALADIN") -- Seal of Righteousness
|
|
||||||
Buff( { 31892 }, { buffType = "magic"}, "PALADIN") -- Seal of Blood
|
|
||||||
Buff( { 20375 }, { buffType = "magic"}, "PALADIN") -- Seal of Command
|
|
||||||
Buff( { 20164 }, { buffType = "magic"}, "PALADIN") -- Seal of Justice
|
|
||||||
Buff( { 20165 }, { buffType = "magic"}, "PALADIN") -- Seal of Light
|
|
||||||
Buff( { 15277 }, { buffType = "magic"}, "PALADIN") -- Seal of Reckoning
|
|
||||||
Buff( { 31801 }, { buffType = "magic"}, "PALADIN") -- Seal of Vengeance
|
|
||||||
Buff( { 20166 }, { buffType = "magic"}, "PALADIN") -- Seal of Wisdom
|
|
||||||
Buff( { 21082 }, { buffType = "magic"}, "PALADIN") -- Seal of the Crusade
|
|
||||||
Buff( { 53563 }, { buffType = "magic"}, "PALADIN") -- Beacon of Light
|
|
||||||
Buff( { 54149 }, { buffType = "magic"}, "PALADIN") -- Infusion of Light
|
|
||||||
Buff( { 59578 }, { buffType = "magic"}, "PALADIN") -- The Art of War
|
|
||||||
Buff( { 20925, 20927, 20928, 27179, 48951, 48952 }, { buffType = "magic"}, "PALADIN") -- Holy Shield
|
|
||||||
Buff( { 53601 }, { buffType = "magic"}, "PALADIN") -- Sacred Shield
|
|
||||||
Buff( { 54428 }, { buffType = "magic"}, "PALADIN") -- Divine Plea
|
|
||||||
Buff( { 31821 }, { buffType = "magic"}, "PALADIN") -- Aura Mastery
|
|
||||||
Buff( { 31842 }, { buffType = "magic"}, "PALADIN") -- Divine Illumination
|
|
||||||
Buff( { 20216 }, { buffType = "magic"}, "PALADIN") -- Divine Favor
|
|
||||||
Buff( { 25780 }, { buffType = "magic"}, "PALADIN") -- Righteous Fury
|
|
||||||
|
|
||||||
|
|
||||||
|
--Buff( { 25771 }, { buffType = "immune"}, "PALADIN") -- Forbearance
|
||||||
|
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
@ -221,12 +101,7 @@ Buff( { 25780 }, { buffType = "magic"}, "PALADIN") -- Righteous Fury
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
Buff( { 5384 }, { buffType = "physical"}, "HUNTER") -- Feign Death
|
Buff( { 5384 }, { buffType = "physical"}, "HUNTER") -- Feign Death
|
||||||
Buff( { 19263 }, { buffType = "physical"}, "HUNTER") -- Deterrence
|
--local FEIGN_DEATH = GetSpellInfo(5384) -- Localized name for Feign Death
|
||||||
Buff( { 3045 }, { buffType = "physical"}, "HUNTER") -- Rapid Fire
|
|
||||||
Buff( { 64420 }, { buffType = "physical"}, "HUNTER") -- Sniper Training
|
|
||||||
Buff( { 34835 }, { buffType = "physical"}, "HUNTER") -- Master Tactician
|
|
||||||
Buff( { 54216 }, { buffType = "physical"}, "HUNTER") -- Master's Call
|
|
||||||
Buff( { 34471 }, { buffType = "physical"}, "HUNTER") -- The Beast Within
|
|
||||||
|
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
@ -234,50 +109,20 @@ Buff( { 34471 }, { buffType = "physical"}, "HUNTER") -- The Beast Within
|
|||||||
-------------
|
-------------
|
||||||
|
|
||||||
Buff({ 66 }, { buffType = "magic"}, "MAGE") -- Invisibility
|
Buff({ 66 }, { buffType = "magic"}, "MAGE") -- Invisibility
|
||||||
Buff({ 1459, 1460, 1461, 10156, 10157, 27126, 42995 }, { buffType = "magic"}, "MAGE") -- Arcane Intellect
|
Buff({ 1459 }, { buffType = "magic"}, "MAGE") -- Arcane Intellect
|
||||||
Buff({ 130 }, { buffType = "magic"}, "MAGE") -- Slow Fall
|
Buff({ 130 }, { buffType = "magic"}, "MAGE") -- Slow Fall
|
||||||
Buff({ 604, 8450, 8451, 10173, 10174, 33944, 43015 }, { buffType = "magic"}, "MAGE") -- Dampen Magic
|
Buff({ 604 }, { buffType = "magic"}, "MAGE") -- Dampen Magic
|
||||||
Buff({ 1008, 8455, 10169, 10170, 27130, 33946, 43017, }, { buffType = "magic"}, "MAGE") -- Amplify Magic
|
Buff({ 1008 }, { buffType = "magic"}, "MAGE") -- Amplify Magic
|
||||||
Buff({ 1463, 8494, 8495, 10191, 10192, 10193, 27131, 43019, 43020 }, { buffType = "magic"}, "MAGE") -- Mana Shield
|
Buff({ 1463 }, { buffType = "magic"}, "MAGE") -- Mana Shield
|
||||||
Buff({ 6117, 22782, 22783, 27125, 43023, 43024 }, { buffType = "form"}, "MAGE") -- Mage Armor
|
Buff({ 6117 }, { buffType = "form"}, "MAGE") -- Mage Armor
|
||||||
Buff({ 31643 }, { buffType = "magic"}, "MAGE") -- Blazing Speed
|
Buff({ 31643 }, { buffType = "magic"}, "MAGE") -- Blazing Speed
|
||||||
Buff({ 543, 8457, 8458, 10223, 10225, 27128, 43010 }, { buffType = "magic"}, "MAGE") -- Fire Ward
|
Buff({ 543 }, { buffType = "magic"}, "MAGE") -- Fire Ward
|
||||||
Buff({ 11129 }, { buffType = "magic"}, "MAGE") -- Combustion
|
Buff({ 11129 }, { buffType = "magic"}, "MAGE") -- Combustion
|
||||||
Buff({ 30482, 43045, 43046 }, { buffType = "form"}, "MAGE") -- Molten Armor
|
Buff({ 30482 }, { buffType = "form"}, "MAGE") -- Molten Armor
|
||||||
Buff({ 168, 7300, 7301 }, { buffType = "form"}, "MAGE") -- Frost Armor
|
Buff({ 168 }, { buffType = "form"}, "MAGE") -- Frost Armor
|
||||||
Buff({ 7302, 7320, 10219, 10220, 27124, 43008 }, { buffType = "form"}, "MAGE") -- Ice Armor
|
Buff({ 7302 }, { buffType = "form"}, "MAGE") -- Ice Armor
|
||||||
Buff({ 45438 }, { buffType = "immune"}, "MAGE") -- Ice Block
|
Buff({ 45438 }, { buffType = "immune"}, "MAGE") -- Ice Block
|
||||||
Buff({ 6143, 32796, 8462, 28609, 10177, 43012, 8461 }, { buffType = "magic"}, "MAGE") -- Frost Ward
|
Buff({ 6143 }, { buffType = "magic"}, "MAGE") -- Frost Ward
|
||||||
--talents
|
--talents
|
||||||
Buff({ 11426, 13031, 13032, 13033, 27134, 33405, 43038, 43039 }, { buffType = "magic"}, "MAGE") -- Ice Barrier
|
Buff({ 11426 }, { buffType = "magic"}, "MAGE") -- Ice Barrier
|
||||||
Buff({ 12472 }, { buffType = "magic"}, "MAGE") -- Icy Veins
|
Buff({ 12472 }, { buffType = "magic"}, "MAGE") -- Icy Veins
|
||||||
Buff({ 74396 }, { buffType = "magic"}, "MAGE") -- Fingers of Frost
|
|
||||||
Buff({ 57761 }, { buffType = "magic"}, "MAGE") -- FireBall!
|
|
||||||
Buff({ 44413 }, { buffType = "magic"}, "MAGE") -- Incanter's Absorption
|
|
||||||
Buff({ 48108 }, { buffType = "magic"}, "MAGE") -- Hot Streak
|
|
||||||
Buff({ 54741 }, { buffType = "magic"}, "MAGE") -- Hot Streak
|
|
||||||
Buff({ 61316 }, { buffType = "magic"}, "MAGE") -- Dalaran Brilliance
|
|
||||||
Buff({ 44401 }, { buffType = "magic"}, "MAGE") -- Missile Barrage
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-------------
|
|
||||||
-- DEATHKNIGHT
|
|
||||||
-------------
|
|
||||||
|
|
||||||
Buff({ 48707 }, { buffType = "physical"}, "DEATHKNIGHT") -- Anti-Magic Shell
|
|
||||||
Buff({ 48792 }, { buffType = "physical"}, "DEATHKNIGHT") -- Icebound Fortitude
|
|
||||||
Buff({ 49039 }, { buffType = "physical"}, "DEATHKNIGHT") -- Lichborne
|
|
||||||
Buff({ 50461 }, { buffType = "physical"}, "DEATHKNIGHT") -- Anti-Magic Zone
|
|
||||||
Buff({ 57330, 57623 }, { buffType = "physical"}, "DEATHKNIGHT") -- Horn of Winter
|
|
||||||
Buff({ 49222 }, { buffType = "physical"}, "DEATHKNIGHT") -- Bone Shield
|
|
||||||
Buff({ 49016 }, { buffType = "enrage"}, "DEATHKNIGHT") -- Unholy Frenzy
|
|
||||||
Buff({ 59052 }, { buffType = "physical"}, "DEATHKNIGHT") -- Freezing Fog
|
|
||||||
Buff({ 55233 }, { buffType = "physical"}, "DEATHKNIGHT") -- Vampiric Blood
|
|
||||||
Buff({ 51271 }, { buffType = "physical"}, "DEATHKNIGHT") -- Unbreakable Armor
|
|
||||||
Buff({ 49796 }, { buffType = "physical"}, "DEATHKNIGHT") -- Deathchill
|
|
||||||
Buff({ 50485 }, { buffType = "physical"}, "DEATHKNIGHT") -- Acclimation
|
|
||||||
Buff({ 66803 }, { buffType = "physical"}, "DEATHKNIGHT") -- Desolation
|
|
||||||
Buff({ 55610 }, { buffType = "aura"}, "DEATHKNIGHT") -- Improved Icy Talons
|
|
||||||
Buff({ 53138 }, { buffType = "aura"}, "DEATHKNIGHT") -- Abomination's Might
|
|
@ -11,151 +11,126 @@ Debuff({ 9035, 19281, 19282, 19283, 19284, 19285, 25470 }, { buffType = "curse"
|
|||||||
Debuff({ 6788 }, { }, "PRIEST") -- Weakened Soul
|
Debuff({ 6788 }, { }, "PRIEST") -- Weakened Soul
|
||||||
Debuff({ 15487 }, { buffType = "magic" }, "PRIEST") -- Silence
|
Debuff({ 15487 }, { buffType = "magic" }, "PRIEST") -- Silence
|
||||||
Debuff({ 10797, 19296, 19299, 19302, 19303, 19304, 19305, 25446 }, { stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS" }, "PRIEST") -- starshards
|
Debuff({ 10797, 19296, 19299, 19302, 19303, 19304, 19305, 25446 }, { stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS" }, "PRIEST") -- starshards
|
||||||
Debuff({ 2944, 19276, 19277, 19278, 19279, 19280, 25467, 48299, 48300 }, { stacking = true , buffType = "disease", preEvent = "SPELL_CAST_SUCCESS"}, "PRIEST") --devouring plague
|
Debuff({ 2944, 19276, 19277, 19278, 19279, 19280, 25467 }, { stacking = true , buffType = "disease", preEvent = "SPELL_CAST_SUCCESS"}, "PRIEST") --devouring plague
|
||||||
Debuff({ 453, 8192, 10953, 25596 }, { }, "PRIEST") -- mind soothe
|
Debuff({ 453, 8192, 10953, 25596 }, { }, "PRIEST") -- mind soothe
|
||||||
Debuff({ 14914, 15261, 15262, 15263, 15264, 15265, 15266, 15267, 25384, 48134, 48135 }, { stacking = true, buffType = "magic", preEvent = "SPELL_DAMAGE"}, "PRIEST") -- Holy Fire, stacking?
|
Debuff({ 14914, 15261, 15262, 15263, 15264, 15265, 15266, 15267, 25384 }, { stacking = true, buffType = "magic", preEvent = "SPELL_DAMAGE"}, "PRIEST") -- Holy Fire, stacking?
|
||||||
Debuff({ 589, 594, 970, 992, 2767, 10892, 10893, 10894, 25367, 25368, 48124, 48125 }, { stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS"}, "PRIEST") -- SW:P
|
Debuff({ 589, 594, 970, 992, 2767, 10892, 10893, 10894, 25367, 25368 }, { stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS"}, "PRIEST") -- SW:P
|
||||||
Debuff({ 15258 } ,{ buffType = "magic" }, "PRIEST") -- Shadow Vulnerability (Shadow Weaving Talent Effect)
|
Debuff({ 15258 } ,{ buffType = "magic" }, "PRIEST") -- Shadow Vulnerability (Shadow Weaving Talent Effect)
|
||||||
Debuff({ 15286 } ,{ buffType = "magic" }, "PRIEST") -- Vampiric Embrace
|
Debuff({ 15286 } ,{ buffType = "magic" }, "PRIEST") -- Vampiric Embrace
|
||||||
Debuff({ 34914, 34916, 34917, 48159, 48160 }, { buffType = "magic"}, "PRIEST") -- Vampiric Touch
|
Debuff({ 15407, 17311, 17312, 17313, 17314, 18807, 25387 }, { buffType = "magic" }, "PRIEST") -- Mind Flay
|
||||||
Debuff({ 15407, 17311, 17312, 17313, 17314, 18807, 25387, 48155, 48156 }, { buffType = "magic" }, "PRIEST") -- Mind Flay
|
|
||||||
Debuff({ 605, 10911, 10912 }, { buffType = "magic" }, "PRIEST") -- Mind Control
|
Debuff({ 605, 10911, 10912 }, { buffType = "magic" }, "PRIEST") -- Mind Control
|
||||||
Debuff({ 8122, 8124, 10888, 10890 }, { buffType = "magic", }, "PRIEST") -- Psychic Scream
|
Debuff({ 8122, 8124, 10888, 10890 }, { buffType = "magic", }, "PRIEST") -- Psychic Scream
|
||||||
Debuff({ 15269 }, { buffType = "magic"}, "PRIEST") -- Blackout
|
Debuff({ 15269 }, { buffType = "magic"}, "PRIEST")
|
||||||
Debuff({ 44041, 44043, 44044, 44045, 44046, 44047 }, { buffType = "magic"}, "PRIEST") -- Chastise
|
|
||||||
Debuff({ 48045, 53023 }, {stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS"}, "PRIEST") -- Mind Sear
|
|
||||||
Debuff({ 64044 }, { buffType = "magic" }, "PRIEST") -- Psychic Horror
|
|
||||||
Debuff({ 64058 }, { buffType = "physical" }, "PRIEST") -- Psychic Horror Disarm
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
-- DRUID
|
-- DRUID
|
||||||
---------------
|
---------------
|
||||||
Debuff({ 33786 }, { buffType = "immune"}, "DRUID") -- Cyclone
|
Debuff({ 33786 }, { buffType = "immune"}, "DRUID") -- Cyclone
|
||||||
Debuff({ 19675 }, { }, "DRUID") -- Feral Charge
|
Debuff({ 19675 }, { }, "DRUID") -- Feral Charge
|
||||||
Debuff({ 22570, 49802}, { buffType = "physical"}, "DRUID") -- Maim
|
Debuff( { 22570}, { buffType = "physical"}, "DRUID") -- Maim
|
||||||
Debuff({ 19975, 19974, 19973, 19972, 19971, 19970, 27010, 53313 }, { buffType = "magic", altName = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)) }, "DRUID") -- Nature's Grasp root
|
Debuff({ 19975, 19974, 19973, 19972, 19971, 19970, 27010 }, { buffType = "magic", altName = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689)) }, "DRUID") -- Nature's Grasp root
|
||||||
Debuff({ 339, 1062, 5195, 5196, 9852, 9853, 26989 }, { buffType = "magic"}, "DRUID") -- Entangling Roots
|
Debuff({ 339, 1062, 5195, 5196, 9852, 9853, 26989 }, { buffType = "magic"}, "DRUID") -- Entangling Roots
|
||||||
Debuff({ 770, 778, 9749, 9907, 26993 }, { buffType = "magic" }, "DRUID") -- Faerie Fire
|
Debuff({ 770, 778, 9749, 9907, 26993 }, { buffType = "magic" }, "DRUID") -- Faerie Fire
|
||||||
Debuff({ 16857, 17390, 17391, 17392, 27011 }, { buffType = "magic" }, "DRUID") -- Faerie Fire (Feral)
|
Debuff({ 16857, 17390, 17391, 17392, 27011 }, { buffType = "magic" }, "DRUID") -- Faerie Fire (Feral)
|
||||||
Debuff({ 2637, 18657, 18658 }, { buffType = "magic"}, "DRUID") -- Hibernate
|
Debuff({ 2637, 18657, 18658 }, { buffType = "magic"}, "DRUID") -- Hibernate
|
||||||
Debuff({ 99, 1735, 9490, 9747, 9898, 26998, 48559, 48560 }, { buffType = "physical" }, "DRUID") -- Demoralizing Roar
|
Debuff({ 99, 1735, 9490, 9747, 9898, 26998 }, { buffType = "physical" }, "DRUID") -- Demoralizing Roar
|
||||||
Debuff({ 5209 }, { buffType = "physical" }, "DRUID") -- Challenging Roar
|
Debuff({ 5209 }, { buffType = "physical" }, "DRUID") -- Challenging Roar
|
||||||
Debuff({ 6795 }, { stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Taunt
|
Debuff({ 6795 }, { stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Taunt
|
||||||
Debuff({ 16922 }, { buffType = "physical" }, "DRUID") -- Imp Starfire Stun
|
Debuff({ 16922 }, { buffType = "physical" }, "DRUID") -- Imp Starfire Stun
|
||||||
Debuff({ 9005, 9823, 9827, 27006, 49803 }, { buffType = "physical" }, "DRUID") -- Pounce
|
Debuff({ 9005, 9823, 9827, 27006 }, { buffType = "physical" }, "DRUID") -- Pounce
|
||||||
Debuff({ 9007, 9824, 9826, 27007, 49804 }, { buffType = "physical", stacking = true, preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Pounce Bleed
|
Debuff({ 9007, 9824, 9826, 27007 }, { buffType = "physical", stacking = true, preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Pounce Bleed
|
||||||
Debuff({ 8921, 8924, 8925, 8926, 8927, 8928, 8929, 9833, 9834, 9835, 26987, 26988, 48462, 48463 }, { stacking = true, buffType = "magic"}, "DRUID") -- Moonfire
|
Debuff({ 8921, 8924, 8925, 8926, 8927, 8928, 8929, 9833, 9834, 9835, 26987, 26988 }, { stacking = true, buffType = "magic"}, "DRUID") -- Moonfire
|
||||||
Debuff({ 1822, 1823, 1824, 9904, 27003, 48573, 48574, 59886 }, { stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Rake
|
Debuff({ 1822, 1823, 1824, 9904, 27003 }, { stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Rake
|
||||||
Debuff({ 1079, 9492, 9493, 9752, 9894, 9896, 27008, 49799, 49800 }, { stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Rip
|
Debuff({ 1079, 9492, 9493, 9752, 9894, 9896, 27008 }, { stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Rip
|
||||||
Debuff({ 5570, 24974, 24975, 24976, 24977, 27013, 48468 }, { stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Insect Swarm
|
Debuff({ 5570, 24974, 24975, 24976, 24977, 27013 }, { stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Insect Swarm
|
||||||
Debuff({ 33745, 48567, 48568 }, { stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Lacerate
|
Debuff({ 33745 }, { stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "DRUID") -- Lacerate
|
||||||
Debuff({ 33878, 33986, 33987, 48563, 48564 }, { buffType = "physical" }, "DRUID") -- Mangle (Bear)
|
|
||||||
Debuff({ 33876, 33982, 33983, 48565, 48566 }, { buffType = "physical" }, "DRUID") -- Mangle (Cat)
|
|
||||||
Debuff({ 60433 }, { buffType = "magic" }, "DRUID") -- Earth and Moon
|
|
||||||
Debuff({ 58181 }, { buffType = "physical" }, "DRUID") -- Infected Wounds
|
|
||||||
|
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
-- WARRIOR
|
-- WARRIOR
|
||||||
-------------
|
-------------
|
||||||
Debuff({ 29703 }, { buffType = "physical"}, "WARRIOR") -- Dazed
|
Debuff({ 29703 }, { buffType = "physical"}, "WARRIOR") -- Dazed
|
||||||
Debuff({ 12294, 21551, 21552, 21553, 25248, 30330, 47485, 47486 }, { buffType = "physical" }, "WARRIOR") -- Mortal Strike
|
Debuff({ 12294, 21551, 21552, 21553, 25248, 30330 }, { buffType = "physical" }, "WARRIOR") -- Mortal Strike
|
||||||
Debuff({ 72, 1671, 1672, 29704 }, { buffType = "physical" }, "WARRIOR") -- Shield Bash
|
Debuff({ 72, 1671, 1672, 29704}, { buffType = "physical" }, "WARRIOR") -- Shield Bash
|
||||||
Debuff({ 18498 }, { buffType = "physical" }, "WARRIOR") -- Improved Shield Bash
|
Debuff({ 18498 }, { buffType = "physical" }, "WARRIOR") -- Improved Shield Bash
|
||||||
Debuff({ 772, 6546, 6547, 6548, 11572, 11573, 11574, 25208, 46845, 47465 }, { stacking = true, buffType = "physical"}, "WARRIOR") -- Rend
|
Debuff({ 772, 6546, 6547, 6548, 11572, 11573, 11574, 25208 }, { stacking = true, buffType = "physical"}, "WARRIOR") -- Rend
|
||||||
Debuff({ 12721, 43104, }, { stacking = true, buffType = "physical"}, "WARRIOR") -- Deep Wounds
|
Debuff({ 12721, 43104 }, { stacking = true, buffType = "physical"}, "WARRIOR") -- Deep Wounds
|
||||||
Debuff({ 12323 }, { buffType = "physical"}, "WARRIOR") -- Piercing Howl
|
Debuff({ 12323 }, { buffType = "physical"}, "WARRIOR") -- Piercing Howl
|
||||||
Debuff({ 1715, 7372, 7373, 25212 }, { buffType = "physical" }, "WARRIOR") -- Hamstring
|
Debuff({ 1715, 7372, 7373, 25212 }, { buffType = "physical" }, "WARRIOR") -- Hamstring
|
||||||
Debuff({ 23694 } , { buffType = "physical" }, "WARRIOR") -- Improved Hamstring
|
Debuff({ 23694 } , { buffType = "physical" }, "WARRIOR") -- Improved Hamstring
|
||||||
Debuff({ 6343, 8198, 8204, 8205, 11580, 11581, 25264, 47501, 47502 }, { buffType = "physical"}, "WARRIOR") -- Thunder Clap
|
Debuff({ 6343, 8198, 8204, 8205, 11580, 11581, 25264 }, { buffType = "physical"}, "WARRIOR") -- Thunder Clap
|
||||||
Debuff({ 694, 7400, 7402, 20559, 20560 }, { buffType = "physical", }, "WARRIOR") -- Mocking Blow
|
Debuff({ 694, 7400, 7402, 20559, 20560 }, { buffType = "physical", }, "WARRIOR") -- Mocking Blow
|
||||||
Debuff({ 1161 } ,{ buffType = "physical", }, "WARRIOR") -- Challenging Shout
|
Debuff({ 1161 } ,{ buffType = "physical", }, "WARRIOR") -- Challenging Shout
|
||||||
Debuff({ 355 } ,{ stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "WARRIOR") -- Taunt
|
Debuff({ 355 } ,{ stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "WARRIOR") -- Taunt
|
||||||
Debuff({ 1160, 6190, 11554, 11555, 11556, 25202, 25203, 47437 }, { buffType = "physical" }, "WARRIOR") -- Demoralizing Shout, varies
|
Debuff({ 1160, 6190, 11554, 11555, 11556, 25202, 25203 }, { buffType = "physical" }, "WARRIOR") -- Demoralizing Shout, varies
|
||||||
Debuff({ 5246 }, { buffType = "physical" }, "WARRIOR") -- Intimidating Shout Fear
|
Debuff({ 5246 }, { buffType = "physical" }, "WARRIOR") -- Intimidating Shout Fear
|
||||||
Debuff({ 676 } ,{ buffType = "physical" }, "WARRIOR") -- Disarm
|
Debuff({ 676 } ,{ buffType = "physical" }, "WARRIOR") -- Disarm
|
||||||
Debuff({ 12798 } , { buffType = "physical" }, "WARRIOR") -- Imp Revenge Stun
|
Debuff({ 12798 } , { buffType = "physical" }, "WARRIOR") -- Imp Revenge Stun
|
||||||
Debuff({ 7386, 7405, 8380, 11596, 11597, 25225 }, { buffType = "physical" }, { }, "WARRIOR") -- Sunder Armor
|
Debuff({ 7386, 7405, 8380, 11596, 11597, 25225, buffType = "physical" }, { }, "WARRIOR") -- Sunder Armor
|
||||||
Debuff({ 12809 } ,{ buffType = "physical" }, "WARRIOR") -- Concussion Blow
|
Debuff({ 12809 } ,{ buffType = "physical" }, "WARRIOR") -- Concussion Blow
|
||||||
Debuff({ 7922 }, { buffType = "physical" }, "WARRIOR") -- Charge Stun
|
Debuff({ 7922 }, { buffType = "physical" }, "WARRIOR") -- Charge Stun
|
||||||
Debuff({ 20253, 20614, 20615, 25273, 25274, 47995 }, { buffType = "physical" }, "WARRIOR") -- Intercept Stun
|
Debuff({ 20253, 20614, 20615, 25273, 25274 }, { buffType = "physical" }, "WARRIOR") -- Intercept Stun
|
||||||
Debuff({ 5530 }, { buffType = "physical"}, "WARRIOR") -- Mace Stun Effect (Mace Specialization)
|
Debuff({ 5530 }, { buffType = "physical"}, "WARRIOR") -- Mace Stun Effect (Mace Specialization)
|
||||||
Debuff({ 56112 }, { buffType = "physical"}, "WARRIOR") -- Furious Attacks
|
|
||||||
Debuff({ 18498, 74347 }, { buffType = "physical"}, "WARRIOR") -- Gag Order
|
|
||||||
Debuff({ 46857 }, { buffType = "physical"}, "WARRIOR") -- Trauma
|
|
||||||
Debuff({ 46968 }, { buffType = "physical"}, "WARRIOR") -- Shockwave
|
|
||||||
Debuff({ 64382 }, { buffType = "physical"}, "WARRIOR") -- Shattering Throw
|
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
-- ROGUE
|
-- ROGUE
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Debuff({ 16511, 17347, 17348, 26864, 48660 }, { buffType = "physical" }, "ROGUE") -- Hemorrhage
|
Debuff({ 16511, 17347, 17348, 26864 }, { buffType = "physical" }, "ROGUE") -- Hemorrhage
|
||||||
Debuff({ 3409, 11201 }, { buffType = "poison" }, "ROGUE") -- Crippling Poison
|
Debuff({ 3409, 11201 }, { buffType = "poison" }, "ROGUE") -- Crippling Poison
|
||||||
Debuff({ 13218, 13222, 13223, 13224, 27189, 57975 }, { buffType = "poison" }, "ROGUE") -- Wound Poison
|
Debuff({ 13218, 13222, 13223, 13224, 27189 }, { buffType = "poison" }, "ROGUE") -- Wound Poison
|
||||||
Debuff({ 26679 }, { buffType = "physical"}, "ROGUE") -- Deadly Throw Slow
|
Debuff({ 26679 }, { buffType = "physical"}, "ROGUE") -- Deadly Throw Slow
|
||||||
Debuff({ 2818, 2819, 11353, 11354, 25349, 26968, 27187, 57970 }, { stacking = true, buffType = "poison", preEvent = { { event = "SPELL_DAMAGE", spellID = 5940}, "SWING_DAMAGE" }}, "ROGUE") -- Deadly Poison
|
Debuff({ 2818, 2819, 11353, 11354, 25349, 26968, 27187 }, { stacking = true, buffType = "poison", preEvent = { { event = "SPELL_DAMAGE", spellID = 5940}, "SWING_DAMAGE" }}, "ROGUE") -- Deadly Poison
|
||||||
Debuff({ 5760, 8692, 11398 }, { buffType = "poison" }, "ROGUE") -- Mind-numbing Poison
|
Debuff({ 5760, 8692, 11398 }, { buffType = "poison" }, "ROGUE") -- Mind-numbing Poison
|
||||||
Debuff({ 18425 }, { buffType = "physical" }, "ROGUE") -- Improved Kick Silence
|
Debuff({ 18425 }, { buffType = "physical" }, "ROGUE") -- Improved Kick Silence
|
||||||
Debuff({ 1833 }, { buffType = "physical" }, "ROGUE") -- Cheap Shot
|
Debuff({ 1833 }, { buffType = "physical" }, "ROGUE") -- Cheap Shot
|
||||||
Debuff({ 2070, 6770, 11297 }, { buffType = "physical" }, "ROGUE") -- Sap
|
Debuff({ 2070, 6770, 11297 }, { buffType = "physical" }, "ROGUE") -- Sap
|
||||||
Debuff({ 2094 } , { buffType = "physical" }, "ROGUE") -- Blind
|
Debuff({ 2094 } , { buffType = "physical" }, "ROGUE") -- Blind
|
||||||
Debuff({ 8647, 8649, 8650, 11197, 11198, 26866 }, { buffType = "physical" }, "ROGUE") -- Expose Armor
|
Debuff({ 8647, 8649, 8650, 11197, 11198, 26866 }, { buffType = "physical" }, "ROGUE") -- Expose Armor
|
||||||
Debuff({ 703, 8631, 8632, 8633, 11289, 11290, 26839, 26884, 48676 }, { buffType = "physical", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "ROGUE") -- Garrote
|
Debuff({ 703, 8631, 8632, 8633, 11289, 11290, 26839, 26884 }, { buffType = "physical", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "ROGUE") -- Garrote
|
||||||
Debuff({ 1330 }, { buffType = "physical"}, "ROGUE")-- Garrote - Silence
|
Debuff({ 1330 }, { buffType = "physical"}, "ROGUE")-- Garrote - Silence
|
||||||
Debuff({ 408, 8643 }, { buffType = "physical" }, "ROGUE") -- Kidney Shot
|
Debuff({ 408, 8643 }, { buffType = "physical" }, "ROGUE") -- Kidney Shot
|
||||||
Debuff({ 1943, 8639, 8640, 11273, 11274, 11275, 26867, 48671, 48672 }, { buffType = "physical", stacking = true}, "ROGUE") -- Rupture
|
Debuff({ 1943, 8639, 8640, 11273, 11274, 11275, 26867 }, { buffType = "physical", stacking = true}, "ROGUE") -- Rupture
|
||||||
Debuff({ 1776, 1777, 8629, 11285, 11286, 38764 }, { buffType = "physical", }, "ROGUE") -- Gouge
|
Debuff({ 1776, 1777, 8629, 11285, 11286, 38764 }, { buffType = "physical", }, "ROGUE") -- Gouge
|
||||||
Debuff({ 14251 } , { buffType = "physical", }, "ROGUE") -- Riposte (disarm)
|
Debuff({ 14251 } , { buffType = "physical", }, "ROGUE") -- Riposte (disarm)
|
||||||
Debuff({ 51693 } , { buffType = "physical", }, "ROGUE") -- Waylay
|
|
||||||
Debuff({ 51585 } , { buffType = "physical", }, "ROGUE") -- Blade Twisting
|
|
||||||
|
|
||||||
|
|
||||||
------------
|
------------
|
||||||
-- WARLOCK
|
-- WARLOCK
|
||||||
------------
|
------------
|
||||||
Debuff({ 32386 }, { buffType = "magic"}, "WARLOCK") -- Shadow Embrace
|
Debuff({ 32386 }, { buffType = "magic"}, "WARLOCK") -- Shadow Embrace
|
||||||
Debuff({ 710, 18647 } ,{ buffType = "immune"}, "WARLOCK") -- Banish
|
Debuff({ 710, 18647 } ,{ buffType = "immune"}, "WARLOCK") -- Banish
|
||||||
Debuff( { 348, 707, 1094, 2941, 11665, 11667, 11668, 25309, 27215, 47810, 47811 }, { buffType = "magic", stacking = true, preEvent = "SPELL_DAMAGE"}, "WARLOCK") -- Immolate
|
Debuff( { 348, 707, 1094, 2941, 11665, 11667, 11668, 25309, 27215 }, { buffType = "magic", stacking = true, preEvent = "SPELL_DAMAGE"}, "WARLOCK") -- Immolate
|
||||||
Debuff({ 24259 } ,{ buffType = "magic" }, "WARLOCK") -- Spell Lock Silence
|
Debuff({ 24259 } ,{ buffType = "magic" }, "WARLOCK") -- Spell Lock Silence
|
||||||
Debuff({ 27243 } ,{ buffType = "magic", stacking = true, preEvent = "SPELL_CAST_START" }, "WARLOCK") -- Seed of Corruption
|
Debuff({ 27243 } ,{ buffType = "magic", stacking = true, preEvent = "SPELL_CAST_START" }, "WARLOCK") -- Seed of Corruption
|
||||||
Debuff( { 689, 699, 709, 7651, 11699, 11700, 27219, 27220, 47857 }, { buffType = "magic", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "WARLOCK") -- Drain Life
|
Debuff( { 689, 699, 709, 7651, 11699, 11700, 27219, 27220 }, { buffType = "magic", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "WARLOCK") -- Drain Life
|
||||||
Debuff( { 5138, 6226, 11703, 11704, 27221, 30908 }, { buffType = "magic", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "WARLOCK") -- Drain Mana
|
Debuff( { 5138, 6226, 11703, 11704, 27221, 30908 }, { buffType = "magic", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "WARLOCK") -- Drain Mana
|
||||||
Debuff( { 1120, 8288, 8289, 11675, 27217, 47855 }, { buffType = "magic", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "WARLOCK") -- Drain Soul
|
Debuff( { 1120, 8288, 8289, 11675, 27217 }, { buffType = "magic", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "WARLOCK") -- Drain Soul
|
||||||
Debuff( { 18265, 18879, 18880, 18881, 27264, 30911}, { buffType = "magic", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "WARLOCK") -- Siphon Life
|
Debuff( { 18265, 18879, 18880, 18881, 27264, 30911}, { buffType = "magic", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "WARLOCK") -- Siphon Life
|
||||||
Debuff( { 172, 6222, 6223, 7648, 11671, 11672, 25311, 27216, 47812, 47813 }, { buffType = "magic", stacking = true }, "WARLOCK") -- Corruption
|
Debuff( { 172, 6222, 6223, 7648, 11671, 11672, 25311, 27216 }, { buffType = "magic", stacking = true }, "WARLOCK") -- Corruption
|
||||||
Debuff( { 980, 1014, 6217, 11711, 11712, 11713, 27218, 47863, 47864 }, { buffType = "curse", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "WARLOCK") -- Curse of Agony
|
Debuff( { 980, 1014, 6217, 11711, 11712, 11713, 27218 }, { buffType = "curse", stacking = true, preEvent = "SPELL_CAST_SUCCESS"}, "WARLOCK") -- Curse of Agony
|
||||||
Debuff({ 18223, 29539, 46434 }, { buffType = "curse"}, "WARLOCK") -- Curse of Exhaustion
|
Debuff({ 18223, 29539, 46434 }, { buffType = "curse"}, "WARLOCK") -- Curse of Exhaustion
|
||||||
Debuff( { 16231, 704, 7658, 7659, 11717, 27226 }, { buffType = "curse"}, "WARLOCK") -- Curse of Recklessness
|
Debuff( { 704, 7658, 7659, 11717, 27226 }, { buffType = "curse"}, "WARLOCK") -- Curse of Recklessness
|
||||||
Debuff( { 1490, 11721, 11722, 27228, 47865 }, { buffType = "curse"}, "WARLOCK") -- Curse of the Elements
|
Debuff( { 1490, 11721, 11722, 27228 }, { buffType = "curse"}, "WARLOCK") -- Curse of the Elements
|
||||||
Debuff( { 1714, 11719 }, { buffType = "curse"}, "WARLOCK") -- Curse of Tongues
|
Debuff( { 1714, 11719 }, { buffType = "curse"}, "WARLOCK") -- Curse of Tongues
|
||||||
Debuff( { 702, 1108, 6205, 7646, 11707, 11708, 27224, 30909, 50511 }, { buffType = "curse"}, "WARLOCK") -- Curse of Weakness
|
Debuff( { 702, 1108, 6205, 7646, 11707, 11708, 27224, 30909 }, { buffType = "curse"}, "WARLOCK") -- Curse of Weakness
|
||||||
Debuff( { 603, 30910, 47867 }, { buffType = "curse"}, "WARLOCK") -- Curse of Doom
|
Debuff( { 603, 30910 }, { buffType = "curse"}, "WARLOCK") -- Curse of Doom
|
||||||
Debuff( { 6789, 17925, 17926, 27223, 47859, 47860 }, { buffType = "magic"}, "WARLOCK") -- Death Coil
|
Debuff( { 6789, 17925, 17926, 27223 }, { buffType = "magic"}, "WARLOCK") -- Death Coil
|
||||||
Debuff( { 5782, 6213, 6215 }, { buffType = "magic"}, "WARLOCK") -- Fear
|
Debuff( { 5782, 6213, 6215 }, { buffType = "magic"}, "WARLOCK") -- Fear
|
||||||
Debuff( { 5484, 17928 }, { buffType = "magic"}, "WARLOCK") -- Howl of Terror
|
Debuff( { 5484, 17928 }, { buffType = "magic"}, "WARLOCK") -- Howl of Terror
|
||||||
Debuff({ 6358 }, { buffType = "magic" }, "WARLOCK") -- Seduction
|
Debuff({ 6358 }, { buffType = "magic" }, "WARLOCK") -- Seduction
|
||||||
Debuff({ 30108, 30404, 30405, 47841, 47843 }, { buffType = "magic", stacking = true, preEvent = "SPELL_CAST_START" }, "WARLOCK") -- Unstable Affliction
|
Debuff({ 30108, 30404, 30405 }, { buffType = "magic", stacking = true, preEvent = "SPELL_CAST_START" }, "WARLOCK") -- Unstable Affliction
|
||||||
Debuff({ 31117, 43523, 65813 }, { buffType = "magic", altName = select(1, GetSpellInfo(30405)) .. " Silence" }, "WARLOCK") -- Unstable Affliction Silence
|
Debuff({ 31117, 43523 }, { buffType = "magic", altName = select(1, GetSpellInfo(30405)) .. " Silence" }, "WARLOCK") -- Unstable Affliction Silence
|
||||||
Debuff({ 18093 } ,{ buffType = "physical" }, "WARLOCK") -- Pyroclasm
|
Debuff({ 18093 } ,{ buffType = "physical" }, "WARLOCK") -- Pyroclasm
|
||||||
Debuff({ 17877, 18867, 18868, 18869, 18870, 18871, 27263, 30546, 47826, 47827 }, { buffType = "physical", stacking = true, preEvent = "SPELL_CAST_SUCCESS" }, "WARLOCK") -- Shadowburn Debuff
|
Debuff({ 17877, 18867, 18868, 18869, 18870, 18871, 27263, 30546 }, { buffType = "physical", stacking = true, preEvent = "SPELL_CAST_SUCCESS" }, "WARLOCK") -- Shadowburn Debuff
|
||||||
Debuff({ 47960, 61291 } ,{ buffType = "magic" }, "WARLOCK") -- Shadowflame dot
|
|
||||||
Debuff({ 63311 } ,{ buffType = "physical" }, "WARLOCK") -- Shadowflame slow
|
|
||||||
Debuff({ 48181, 59161, 59163, 59164 }, { buffType = "magic" }, "WARLOCK") -- Haunt
|
|
||||||
|
|
||||||
|
|
||||||
---------------
|
---------------
|
||||||
-- SHAMAN
|
-- SHAMAN
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
Debuff({ 17364 } ,{ buffType = "magic" }, "SHAMAN") -- Stormstrike
|
Debuff({ 17364 } ,{ buffType = "magic" }, "SHAMAN") -- Stormstrike
|
||||||
Debuff({ 8056, 8058, 10472, 10473, 25464, 49235, 49236 }, { buffType = "magic" }, "SHAMAN") -- Frost Shock
|
Debuff({ 8056, 8058, 10472, 10473, 25464 }, { buffType = "magic" }, "SHAMAN") -- Frost Shock
|
||||||
Debuff({ 8050, 8052, 8053, 10447, 10448, 29228, 25457, 49232, 49233 }, { stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS" }, "SHAMAN") -- Flame Shock
|
Debuff({ 8050, 8052, 8053, 10447, 10448, 29228, 25457 }, { stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS" }, "SHAMAN") -- Flame Shock
|
||||||
Debuff({ 8034, 8037, 10458, 16352, 16353, 25501, 58797, 58798, 58799 }, { buffType = "magic" }, "SHAMAN") -- Frostbrand Attack
|
Debuff({ 8034, 8037, 10458, 16352, 16353, 25501 }, { buffType = "magic" }, "SHAMAN") -- Frostbrand Attack
|
||||||
Debuff({ 3600 } ,{ buffType = "magic" }, "SHAMAN") -- Earthbind Totem
|
Debuff({ 3600 } ,{ buffType = "magic" }, "SHAMAN") -- Earthbind Totem
|
||||||
Debuff({ 63685 } ,{ buffType = "magic" }, "SHAMAN") -- Frozen Power
|
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
-- PALADIN
|
-- PALADIN
|
||||||
@ -165,94 +140,59 @@ Debuff( { 25771 }, { buffType = "immune"}, "PALADIN") -- Forbearance
|
|||||||
Debuff({ 20066 }, { buffType = "magic" }, "PALADIN") -- Repentance
|
Debuff({ 20066 }, { buffType = "magic" }, "PALADIN") -- Repentance
|
||||||
Debuff({ 2878, 5627, 5627 }, { buffType = "magic"}, "PALADIN") -- Turn Undead
|
Debuff({ 2878, 5627, 5627 }, { buffType = "magic"}, "PALADIN") -- Turn Undead
|
||||||
Debuff({ 21183, 20188, 20300, 20301, 20302, 20303, 27159 }, { }, "PALADIN") -- Judgement of the Crusader
|
Debuff({ 21183, 20188, 20300, 20301, 20302, 20303, 27159 }, { }, "PALADIN") -- Judgement of the Crusader
|
||||||
Debuff({ 20271, 20185, 20344, 20345, 20346 }, { buffType = "magic"}, "PALADIN") -- Judgement of Light
|
Debuff({ 20185, 20344, 20345, 20346 }, { buffType = "magic"}, "PALADIN") -- Judgement of Light
|
||||||
Debuff({ 20186, 20354, 20355, 53408 }, { buffType = "magic"}, "PALADIN") -- Judgement of Wisdom
|
Debuff({ 20186, 20354, 20355 }, { buffType = "magic"}, "PALADIN") -- Judgement of Wisdom
|
||||||
Debuff({ 20184, 31896, 53407}, { buffType = "magic", }, "PALADIN") -- Judgement of Justice
|
Debuff({ 20184, 31896}, { buffType = "magic", }, "PALADIN") -- Judgement of Justice
|
||||||
Debuff({ 853, 5588, 5589, 10308 }, { buffType = "magic" }, "PALADIN") -- Hammer of Justice
|
Debuff({ 853, 5588, 5589, 10308 }, { buffType = "magic" }, "PALADIN") -- Hammer of Justice
|
||||||
Debuff({ 20170 } ,{ buffType = "physical", }, "PALADIN") -- Seal of Justice stun
|
Debuff({ 20170 } ,{ buffType = "physical", }, "PALADIN") -- Seal of Justice stun
|
||||||
Debuff({ 63529 } ,{ buffType = "magic", }, "PALADIN") -- Shield of the Templar
|
|
||||||
Debuff({ 61840 } ,{ buffType = "magic", }, "PALADIN") -- Righteous Vengeance
|
|
||||||
Debuff({ 10326 }, { buffType = "magic"}, "PALADIN") -- Turn Evil
|
|
||||||
|
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
-- HUNTER
|
-- HUNTER
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Debuff( { 19434, 20900, 20901, 20902, 20903, 20904, 27065, 49049, 49050}, { buffType = "physical"}, "HUNTER") -- Aimed Shot
|
Debuff( { 19434, 20900, 20901, 20902, 20903, 20904}, { buffType = "physical"}, "HUNTER") -- Aimed Shot
|
||||||
Debuff({ 1130, 14323, 14324, 14325, 53338 }, { buffType = "magic", }, "HUNTER") -- Hunter's Mark
|
Debuff({ 1130, 14323, 14324, 14325 }, { buffType = "magic", }, "HUNTER") -- Hunter's Mark
|
||||||
Debuff({ 1978, 13549, 13550, 13551, 13552, 13553, 13554, 13555, 25295, 27016, 49000, 49001 }, { stacking = true, buffType = "poison", preEvent = "SPELL_CAST_SUCCESS" }, "HUNTER") -- Serpent Sting
|
Debuff({ 1978, 13549, 13550, 13551, 13552, 13553, 13554, 13555, 25295, 27016 }, { stacking = true, buffType = "poison", preEvent = "SPELL_CAST_SUCCESS" }, "HUNTER") -- Serpent Sting
|
||||||
Debuff({ 34490 }, { buffType = "magic" }, "HUNTER") -- Silencing Shot
|
Debuff({ 34490 }, { buffType = "magic" }, "HUNTER") -- Silencing Shot
|
||||||
Debuff({ 3043 }, { buffType = "poison", }, "HUNTER") -- Scorpid Sting
|
Debuff({ 3043 }, { buffType = "poison", }, "HUNTER") -- Scorpid Sting
|
||||||
Debuff({ 3034, 14279, 14280, 27018 }, { buffType = "poison", }, "HUNTER") -- Viper Sting
|
Debuff({ 3034, 14279, 14280, 27018 }, { buffType = "poison", }, "HUNTER") -- Viper Sting
|
||||||
Debuff({ 19386, 24132, 24133, 27068, 49011, 49012 }, { buffType = "poison", }, "HUNTER") -- Wyvern Sting
|
Debuff({ 19386, 24132, 24133, 27068 }, { buffType = "poison", }, "HUNTER") -- Wyvern Sting
|
||||||
Debuff({ 24131, 24134, 24135, 27069, 49009, 49010 }, { buffType = "poison", altName = select(1, GetSpellInfo(19386)) .. " Dot" }, "HUNTER") -- Wyvern Sting Dot
|
Debuff({ 24131, 24134, 24135, 27069 }, { buffType = "poison", altName = select(1, GetSpellInfo(19386)) .. " Dot" }, "HUNTER") -- Wyvern Sting Dot
|
||||||
Debuff({ 1513, 14326, 14327 }, { buffType = "magic"}, "HUNTER") -- Scare Beast
|
Debuff({ 1513, 14326, 14327 }, { buffType = "magic"}, "HUNTER") -- Scare Beast
|
||||||
Debuff({ 19229, 47168 }, { buffType = "physical", }, "HUNTER") -- Wing Clip Root
|
Debuff({ 19229 }, { buffType = "physical", }, "HUNTER") -- Wing Clip Root
|
||||||
Debuff({ 19306, 20909, 20910, 27067, 48998, 48999 }, { buffType = "physical"}, "HUNTER") -- Counterattack
|
Debuff({ 19306, 20909, 20910 }, { buffType = "physical"}, "HUNTER") -- Counterattack
|
||||||
Debuff({ 13812, 14314, 14315, 27026, 49064, 49065 }, { stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "HUNTER") -- Explosive Trap
|
Debuff({ 13812, 14314, 14315, 27026 }, { stacking = true, buffType = "physical", preEvent = "SPELL_CAST_SUCCESS" }, "HUNTER") -- Explosive Trap
|
||||||
Debuff({ 13797, 14298, 14299, 14300, 14301, 27024 }, { stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS" }, "HUNTER") -- Immolation Trap
|
Debuff({ 13797, 14298, 14299, 14300, 14301, 27024 }, { stacking = true, buffType = "magic", preEvent = "SPELL_CAST_SUCCESS" }, "HUNTER") -- Immolation Trap
|
||||||
Debuff({ 3355, 14308, 14309 }, { buffType = "magic" }, "HUNTER") -- Freezing Trap
|
Debuff({ 3355, 14308, 14309 }, { buffType = "magic" }, "HUNTER") -- Freezing Trap
|
||||||
Debuff({ 19503 }, { buffType = "physical" }, "HUNTER") -- Scatter Shot
|
Debuff({ 19503 }, { buffType = "physical" }, "HUNTER") -- Scatter Shot
|
||||||
Debuff({ 2974 }, { buffType = "physical" }, "HUNTER") -- Wing Clip
|
Debuff({ 2974, 14267, 14268 }, { buffType = "physical" }, "HUNTER") -- Wing Clip
|
||||||
Debuff({ 19229, 47168 }, { buffType = "physical" }, "HUNTER") -- Improved Wing Clip
|
|
||||||
Debuff({ 5116 }, { buffType = "physical" }, "HUNTER") -- Concussive Shot
|
Debuff({ 5116 }, { buffType = "physical" }, "HUNTER") -- Concussive Shot
|
||||||
Debuff({ 19410 }, { buffType = "physical" }, "HUNTER") -- Conc Stun
|
Debuff({ 19410 }, { buffType = "physical" }, "HUNTER") -- Conc Stun
|
||||||
Debuff({ 24394 }, { buffType = "physical" }, "HUNTER") -- Intimidation
|
Debuff({ 24394 }, { buffType = "physical" }, "HUNTER") -- Intimidation
|
||||||
Debuff({ 15571 }, { buffType = "physical" }, "HUNTER") -- Daze from Aspect
|
Debuff({ 15571 }, { buffType = "physical" }, "HUNTER") -- Daze from Aspect
|
||||||
Debuff({ 19185 }, { buffType = "physical" }, "HUNTER") -- Entrapment
|
Debuff({ 19185 }, { buffType = "physical" }, "HUNTER") -- Entrapment
|
||||||
Debuff({ 25999 }, { buffType = "physical" }, "HUNTER") -- Boar Charge
|
Debuff({ 25999 }, { buffType = "physical" }, "HUNTER") -- Boar Charge
|
||||||
Debuff({ 24640, 24583, 24586, 24587, 27060, 55728 }, { buffType = "poison" }, "HUNTER") -- Scorpid Poison
|
Debuff({ 24640, 24583, 24586, 24587, 27060 }, { buffType = "poison" }, "HUNTER") -- Scorpid Poison
|
||||||
Debuff({ 60053 }, { buffType = "magic" }, "HUNTER") -- Explosive Shot
|
|
||||||
Debuff({ 63468 }, { buffType = "physical" }, "HUNTER") -- Piercing Shots
|
|
||||||
Debuff({ 3674 }, { buffType = "magic" }, "HUNTER") -- Black Arrow
|
|
||||||
Debuff({ 60210 }, { buffType = "magic" }, "HUNTER") -- Freezing Arrow effect
|
|
||||||
|
|
||||||
-------------
|
-------------
|
||||||
-- MAGE
|
-- MAGE
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Debuff({ 133, 143, 145, 3140, 8400, 8401, 8402, 10148, 10149, 10150, 10151, 25306, 27070, 38692, 42832, 42833 }, { buffType = "magic"}, "MAGE") -- Fireball
|
Debuff({ 133, 143, 145, 3140, 8400, 8401, 8402, 10148, 10149, 10150, 10151, 25306, 27070 }, { buffType = "magic"}, "MAGE") -- Fireball
|
||||||
Debuff({ 11366, 12505, 12522, 12523, 12524, 12525, 12526, 18809, 27132, 33938, 42890, 42891 }, { buffType = "magic" }, "MAGE") -- Pyroblast
|
Debuff({ 11366, 12505, 12522, 12523, 12524, 12525, 12526, 18809, 27132, 33938 }, { buffType = "magic" }, "MAGE") -- Pyroblast
|
||||||
Debuff({ 18469 }, { buffType = "magic" }, "MAGE") -- Imp CS Silence
|
Debuff({ 18469 }, { buffType = "magic" }, "MAGE") -- Imp CS Silence
|
||||||
Debuff({ 118, 12824, 12825, 12826, 61721, 61305, 61780 }, { buffType = "magic" }, "MAGE") -- Polymorph
|
Debuff({ 118, 12824, 12825, 12826 }, { buffType = "magic" }, "MAGE") -- Polymorph
|
||||||
Debuff({ 12355 } , { buffType = "physical" }, "MAGE") -- Impact
|
Debuff({ 12355 } , { buffType = "physical" }, "MAGE") -- Impact
|
||||||
Debuff({ 12654 }, { buffType = "magic" }, "MAGE") -- Ignite
|
Debuff({ 12654 }, { buffType = "magic" }, "MAGE") -- Ignite
|
||||||
Debuff({ 22959 }, { buffType = "magic" }, "MAGE") -- Fire Vulnerability
|
Debuff({ 22959 }, { buffType = "magic" }, "MAGE") -- Fire Vulnerability
|
||||||
Debuff({ 12579 }, { buffType = "magic" }, "MAGE") -- Winter's Chill
|
Debuff({ 12579 }, { buffType = "magic" }, "MAGE") -- Winter's Chill
|
||||||
Debuff({ 11113, 13018, 13019, 13020, 13021, 27133, 33933, 42944, 42945 }, { buffType = "physical" }, "MAGE") -- Blast Wave
|
Debuff({ 11113, 13018, 13019, 13020, 13021, 27133, 33933 }, { buffType = "physical" }, "MAGE") -- Blast Wave
|
||||||
--Spell({ 2120, 2121, 8422, 8423, 10215, 10216, 27086 }, { stacking = true, buffType = "physical" }) -- Flamestrike
|
--Spell({ 2120, 2121, 8422, 8423, 10215, 10216, 27086 }, { stacking = true, buffType = "physical" }) -- Flamestrike
|
||||||
Debuff({ 120, 8492, 10159, 10160, 10161, 27087, 42930, 42931 }, { buffType = "magic" }, "MAGE") -- Cone of Cold
|
Debuff({ 120, 8492, 10159, 10160, 10161, 27087 }, { buffType = "magic" }, "MAGE") -- Cone of Cold
|
||||||
Debuff({ 12484, 12485, 12486 }, { .5 }) -- Improved Blizzard (Chilled)
|
Debuff({ 12484, 12485, 12486 }, { .5 }) -- Improved Blizzard (Chilled)
|
||||||
Debuff({ 6136, 7321, 18101, 20005, 16927, 15850, 31257}, { buffType = "magic" }, "MAGE") -- Frost/Ice Armor (Chilled)
|
Debuff({ 6136, 7321, 18101, 20005, 16927, 15850, 31257}, { buffType = "magic" }, "MAGE") -- Frost/Ice Armor (Chilled)
|
||||||
Debuff({ 116, 205, 837, 7322, 8406, 8407, 8408, 10179, 10180, 10181, 25304, 27071, 27072, 38697, 42841, 42842 }, { buffType = "magic" }, "MAGE") -- Frostbolt
|
Debuff({ 116, 205, 837, 7322, 8406, 8407, 8408, 10179, 10180, 10181, 25304, 27071, 27072, 38697 }, { buffType = "magic" }, "MAGE") -- Frostbolt
|
||||||
Debuff({ 12494 }, { buffType = "magic" }, "MAGE") -- Frostbite
|
Debuff({ 12494 }, { buffType = "magic" }, "MAGE") -- Frostbite
|
||||||
Debuff({ 122, 865, 6131, 10230, 27088, 42917 }, { buffType = "magic" }, "MAGE") -- Frost Nova
|
Debuff({ 122, 865, 6131, 10230 }, { buffType = "magic" }, "MAGE") -- Frost Nova
|
||||||
Debuff({ 31589 }, { buffType = "magic" }, "MAGE") -- Slow
|
Debuff({ 31589 }, { buffType = "magic" }, "MAGE") -- Slow
|
||||||
Debuff({ 41425 }, { buffType = "immune" }, "MAGE") -- Hypothermia
|
Debuff({ 41425 }, { buffType = "immune" }, "MAGE") -- Hypothermia
|
||||||
Debuff({ 44572 }, { buffType = "magic" }, "MAGE") -- Deep Freeze
|
|
||||||
Debuff({ 55360 }, { buffType = "magic" }, "MAGE") -- Living Bomb
|
|
||||||
Debuff({ 64346 }, { buffType = "magic" }, "MAGE") -- Fiery Payback
|
|
||||||
Debuff({ 44614, 47610 }, { buffType = "magic" }, "MAGE") -- Frostfire Bolt
|
|
||||||
Debuff({ 31661, 33041, 33042, 33043, 42949, 42950 }, { buffType = "magic" }, "MAGE") -- Dragon's Breath
|
|
||||||
Debuff({ 36032 }, { }, "MAGE") -- Arcane Blast
|
|
||||||
Debuff({ 55080 }, { buffType = "magic" }, "MAGE") -- Shattered Barrier
|
|
||||||
|
|
||||||
|
|
||||||
-------------
|
|
||||||
-- Death Knight
|
|
||||||
-------------
|
|
||||||
Debuff({ 55095 }, { buffType = "disease" }, "DEATHKNIGHT") -- Frost Fever
|
|
||||||
Debuff({ 55078 }, { buffType = "disease" }, "DEATHKNIGHT") -- Blood Plague
|
|
||||||
Debuff({ 50510 }, { buffType = "disease" }, "DEATHKNIGHT") -- Crypt Fever
|
|
||||||
Debuff({ 51735 }, { buffType = "disease" }, "DEATHKNIGHT") -- Ebon Plague
|
|
||||||
Debuff({ 50536 }, { buffType = "physical" }, "DEATHKNIGHT") -- Unholy Blight
|
|
||||||
Debuff({ 51209 }, { buffType = "magic" }, "DEATHKNIGHT") -- Hungering Cold
|
|
||||||
Debuff({ 47476 }, { buffType = "magic" }, "DEATHKNIGHT") -- Strangulate
|
|
||||||
Debuff({ 43265, 49936, 49937, 49938 }, { buffType = "physical" }, "DEATHKNIGHT") -- Death and decay
|
|
||||||
Debuff({ 45524 }, { buffType = "magic" }, "DEATHKNIGHT") -- Chains of Ice
|
|
||||||
Debuff({ 66803 }, { buffType = "physical" }, "DEATHKNIGHT") -- Desecration
|
|
||||||
Debuff({ 50436 }, { buffType = "physical" }, "DEATHKNIGHT") -- Icy Clutch
|
|
||||||
Debuff({ 49005 }, { buffType = "physical" }, "DEATHKNIGHT") -- Mark of Blood
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,51 +7,28 @@ LibClassAuras.debuffs = {}
|
|||||||
LibClassAuras.debuffToId = {}
|
LibClassAuras.debuffToId = {}
|
||||||
LibClassAuras.buffs = {}
|
LibClassAuras.buffs = {}
|
||||||
LibClassAuras.buffToId = {}
|
LibClassAuras.buffToId = {}
|
||||||
LibClassAuras.altNames = {}
|
|
||||||
|
|
||||||
LibClassAuras.gameExpansion = ({
|
|
||||||
[WOW_PROJECT_MAINLINE] = "retail",
|
|
||||||
[WOW_PROJECT_CLASSIC] = "classic",
|
|
||||||
[WOW_PROJECT_BURNING_CRUSADE_CLASSIC or 5] = "tbc"
|
|
||||||
})[WOW_PROJECT_ID]
|
|
||||||
|
|
||||||
local function Spell(id, opts, class, spellTable, idTable)
|
local function Spell(id, opts, class, spellTable, idTable)
|
||||||
if not opts or not class then
|
if not opts or not class then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local spellName
|
local lastRankID
|
||||||
if type(id) == "table" then
|
if type(id) == "table" then
|
||||||
local realIds = {}
|
local clones = id
|
||||||
for i = 1, #id do
|
lastRankID = clones[#clones]
|
||||||
if GetSpellInfo(id[i]) then
|
|
||||||
tinsert(realIds, id[i])
|
|
||||||
spellName = GetSpellInfo(id[i])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
id = realIds
|
|
||||||
else
|
else
|
||||||
spellName = GetSpellInfo(id)
|
lastRankID = id
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local spellName = GetSpellInfo(lastRankID)
|
||||||
if not spellName then
|
if not spellName then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if opts.altName then
|
if opts.altName then
|
||||||
for _,v in ipairs(id) do
|
idTable[opts.altName] = {id = id , class = class}
|
||||||
LibClassAuras.altNames[v] = opts.altName
|
|
||||||
end
|
|
||||||
if idTable[opts.altName] then
|
|
||||||
tinsert(idTable[opts.altName], {id = id , class = class})
|
|
||||||
else
|
else
|
||||||
idTable[opts.altName] = {[1] = {id = id , class = class}}
|
idTable[spellName] = {id = id , class = class}
|
||||||
end
|
|
||||||
else
|
|
||||||
if idTable[spellName] then
|
|
||||||
tinsert(idTable[spellName], {id = id , class = class})
|
|
||||||
else
|
|
||||||
idTable[spellName] = {[1] = {id = id , class = class}}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(id) == "table" then
|
if type(id) == "table" then
|
||||||
@ -77,11 +54,9 @@ LibClassAuras.Buff = Buff
|
|||||||
|
|
||||||
local function getClassDebuffs(class)
|
local function getClassDebuffs(class)
|
||||||
local classSpells = {}
|
local classSpells = {}
|
||||||
for name, spells in pairs(LibClassAuras.debuffToId) do
|
for k,v in pairs(LibClassAuras.debuffToId) do
|
||||||
for _, spellInfo in ipairs(spells) do
|
if v.class == class then
|
||||||
if spellInfo.class == class then
|
tinsert(classSpells, {name = k, id = v.id})
|
||||||
tinsert(classSpells, {name = name, id = spellInfo.id})
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return classSpells
|
return classSpells
|
||||||
@ -90,11 +65,9 @@ LibClassAuras.GetClassDebuffs = getClassDebuffs
|
|||||||
|
|
||||||
local function getClassBuffs(class)
|
local function getClassBuffs(class)
|
||||||
local classSpells = {}
|
local classSpells = {}
|
||||||
for name, spells in pairs(LibClassAuras.buffToId) do
|
for k,v in pairs(LibClassAuras.buffToId) do
|
||||||
for _, spellInfo in ipairs(spells) do
|
if v.class == class then
|
||||||
if spellInfo.class == class then
|
tinsert(classSpells, {name = k, id = v.id})
|
||||||
tinsert(classSpells, {name = name, id = spellInfo.id})
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return classSpells
|
return classSpells
|
||||||
@ -110,8 +83,3 @@ local function getSpellNameToId(auraType)
|
|||||||
end
|
end
|
||||||
|
|
||||||
LibClassAuras.GetSpellNameToId = getSpellNameToId
|
LibClassAuras.GetSpellNameToId = getSpellNameToId
|
||||||
|
|
||||||
local function getAltName(spellID)
|
|
||||||
return LibClassAuras.altNames[spellID]
|
|
||||||
end
|
|
||||||
LibClassAuras.GetAltName = getAltName
|
|
@ -1,711 +0,0 @@
|
|||||||
--[[
|
|
||||||
This library contains work of Hendrick "nevcairiel" Leppkes
|
|
||||||
https://www.wowace.com/projects/libbuttonglow-1-0
|
|
||||||
]]
|
|
||||||
|
|
||||||
-- luacheck: globals CreateFromMixins ObjectPoolMixin CreateTexturePool CreateFramePool
|
|
||||||
|
|
||||||
local MAJOR_VERSION = "LibCustomGlow-1.0"
|
|
||||||
local MINOR_VERSION = 16
|
|
||||||
if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end
|
|
||||||
local lib, oldversion = LibStub:NewLibrary(MAJOR_VERSION, MINOR_VERSION)
|
|
||||||
if not lib then return end
|
|
||||||
local Masque = LibStub("Masque", true)
|
|
||||||
|
|
||||||
local isRetail = WOW_PROJECT_ID == WOW_PROJECT_MAINLINE
|
|
||||||
local textureList = {
|
|
||||||
empty = [[Interface\AdventureMap\BrokenIsles\AM_29]],
|
|
||||||
white = [[Interface\BUTTONS\WHITE8X8]],
|
|
||||||
shine = [[Interface\ItemSocketingFrame\UI-ItemSockets]]
|
|
||||||
}
|
|
||||||
|
|
||||||
local shineCoords = {0.3984375, 0.4453125, 0.40234375, 0.44921875}
|
|
||||||
if isRetail then
|
|
||||||
textureList.shine = [[Interface\Artifacts\Artifacts]]
|
|
||||||
shineCoords = {0.8115234375,0.9169921875,0.8798828125,0.9853515625}
|
|
||||||
end
|
|
||||||
|
|
||||||
function lib.RegisterTextures(texture,id)
|
|
||||||
textureList[id] = texture
|
|
||||||
end
|
|
||||||
|
|
||||||
lib.glowList = {}
|
|
||||||
lib.startList = {}
|
|
||||||
lib.stopList = {}
|
|
||||||
|
|
||||||
local GlowParent = UIParent
|
|
||||||
|
|
||||||
local GlowMaskPool = CreateFromMixins(ObjectPoolMixin)
|
|
||||||
lib.GlowMaskPool = GlowMaskPool
|
|
||||||
local function MaskPoolFactory(maskPool)
|
|
||||||
return maskPool.parent:CreateMaskTexture()
|
|
||||||
end
|
|
||||||
|
|
||||||
local MaskPoolResetter = function(maskPool,mask)
|
|
||||||
mask:Hide()
|
|
||||||
mask:ClearAllPoints()
|
|
||||||
end
|
|
||||||
|
|
||||||
ObjectPoolMixin.OnLoad(GlowMaskPool,MaskPoolFactory,MaskPoolResetter)
|
|
||||||
GlowMaskPool.parent = GlowParent
|
|
||||||
|
|
||||||
local TexPoolResetter = function(pool,tex)
|
|
||||||
local maskNum = tex:GetNumMaskTextures()
|
|
||||||
for i = maskNum , 1, -1 do
|
|
||||||
tex:RemoveMaskTexture(tex:GetMaskTexture(i))
|
|
||||||
end
|
|
||||||
tex:Hide()
|
|
||||||
tex:ClearAllPoints()
|
|
||||||
end
|
|
||||||
local GlowTexPool = CreateTexturePool(GlowParent ,"ARTWORK",7,nil,TexPoolResetter)
|
|
||||||
lib.GlowTexPool = GlowTexPool
|
|
||||||
|
|
||||||
local FramePoolResetter = function(framePool,frame)
|
|
||||||
frame:SetScript("OnUpdate",nil)
|
|
||||||
local parent = frame:GetParent()
|
|
||||||
if parent[frame.name] then
|
|
||||||
parent[frame.name] = nil
|
|
||||||
end
|
|
||||||
if frame.textures then
|
|
||||||
for _, texture in pairs(frame.textures) do
|
|
||||||
GlowTexPool:Release(texture)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
if frame.bg then
|
|
||||||
GlowTexPool:Release(frame.bg)
|
|
||||||
frame.bg = nil
|
|
||||||
end
|
|
||||||
if frame.masks then
|
|
||||||
for _,mask in pairs(frame.masks) do
|
|
||||||
GlowMaskPool:Release(mask)
|
|
||||||
end
|
|
||||||
frame.masks = nil
|
|
||||||
end
|
|
||||||
frame.textures = {}
|
|
||||||
frame.info = {}
|
|
||||||
frame.name = nil
|
|
||||||
frame.timer = nil
|
|
||||||
frame:Hide()
|
|
||||||
frame:ClearAllPoints()
|
|
||||||
end
|
|
||||||
local GlowFramePool = CreateFramePool("Frame",GlowParent,nil,FramePoolResetter)
|
|
||||||
lib.GlowFramePool = GlowFramePool
|
|
||||||
|
|
||||||
local function addFrameAndTex(r,color,name,key,N,xOffset,yOffset,texture,texCoord,desaturated,frameLevel)
|
|
||||||
key = key or ""
|
|
||||||
frameLevel = frameLevel or 8
|
|
||||||
if not r[name..key] then
|
|
||||||
r[name..key] = GlowFramePool:Acquire()
|
|
||||||
r[name..key]:SetParent(r)
|
|
||||||
r[name..key].name = name..key
|
|
||||||
end
|
|
||||||
local f = r[name..key]
|
|
||||||
f:SetFrameLevel(r:GetFrameLevel()+frameLevel)
|
|
||||||
f:SetPoint("TOPLEFT",r,"TOPLEFT",-xOffset+0.05,yOffset+0.05)
|
|
||||||
f:SetPoint("BOTTOMRIGHT",r,"BOTTOMRIGHT",xOffset,-yOffset+0.05)
|
|
||||||
f:Show()
|
|
||||||
|
|
||||||
if not f.textures then
|
|
||||||
f.textures = {}
|
|
||||||
end
|
|
||||||
|
|
||||||
for i=1,N do
|
|
||||||
if not f.textures[i] then
|
|
||||||
f.textures[i] = GlowTexPool:Acquire()
|
|
||||||
f.textures[i]:SetTexture(texture)
|
|
||||||
f.textures[i]:SetTexCoord(texCoord[1],texCoord[2],texCoord[3],texCoord[4])
|
|
||||||
f.textures[i]:SetDesaturated(desaturated)
|
|
||||||
f.textures[i]:SetParent(f)
|
|
||||||
f.textures[i]:SetDrawLayer("ARTWORK",7)
|
|
||||||
if not isRetail and name == "_AutoCastGlow" then
|
|
||||||
f.textures[i]:SetBlendMode("ADD")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
f.textures[i]:SetVertexColor(color[1],color[2],color[3],color[4])
|
|
||||||
f.textures[i]:Show()
|
|
||||||
end
|
|
||||||
while #f.textures>N do
|
|
||||||
GlowTexPool:Release(f.textures[#f.textures])
|
|
||||||
table.remove(f.textures)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--Pixel Glow Functions--
|
|
||||||
local pCalc1 = function(progress,s,th,p)
|
|
||||||
local c
|
|
||||||
if progress>p[3] or progress<p[0] then
|
|
||||||
c = 0
|
|
||||||
elseif progress>p[2] then
|
|
||||||
c =s-th-(progress-p[2])/(p[3]-p[2])*(s-th)
|
|
||||||
elseif progress>p[1] then
|
|
||||||
c =s-th
|
|
||||||
else
|
|
||||||
c = (progress-p[0])/(p[1]-p[0])*(s-th)
|
|
||||||
end
|
|
||||||
return math.floor(c+0.5)
|
|
||||||
end
|
|
||||||
|
|
||||||
local pCalc2 = function(progress,s,th,p)
|
|
||||||
local c
|
|
||||||
if progress>p[3] then
|
|
||||||
c = s-th-(progress-p[3])/(p[0]+1-p[3])*(s-th)
|
|
||||||
elseif progress>p[2] then
|
|
||||||
c = s-th
|
|
||||||
elseif progress>p[1] then
|
|
||||||
c = (progress-p[1])/(p[2]-p[1])*(s-th)
|
|
||||||
elseif progress>p[0] then
|
|
||||||
c = 0
|
|
||||||
else
|
|
||||||
c = s-th-(progress+1-p[3])/(p[0]+1-p[3])*(s-th)
|
|
||||||
end
|
|
||||||
return math.floor(c+0.5)
|
|
||||||
end
|
|
||||||
|
|
||||||
local pUpdate = function(self,elapsed)
|
|
||||||
self.timer = self.timer+elapsed/self.info.period
|
|
||||||
if self.timer>1 or self.timer <-1 then
|
|
||||||
self.timer = self.timer%1
|
|
||||||
end
|
|
||||||
local progress = self.timer
|
|
||||||
local width,height = self:GetSize()
|
|
||||||
if width ~= self.info.width or height ~= self.info.height then
|
|
||||||
local perimeter = 2*(width+height)
|
|
||||||
if not (perimeter>0) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
self.info.width = width
|
|
||||||
self.info.height = height
|
|
||||||
self.info.pTLx = {
|
|
||||||
[0] = (height+self.info.length/2)/perimeter,
|
|
||||||
[1] = (height+width+self.info.length/2)/perimeter,
|
|
||||||
[2] = (2*height+width-self.info.length/2)/perimeter,
|
|
||||||
[3] = 1-self.info.length/2/perimeter
|
|
||||||
}
|
|
||||||
self.info.pTLy ={
|
|
||||||
[0] = (height-self.info.length/2)/perimeter,
|
|
||||||
[1] = (height+width+self.info.length/2)/perimeter,
|
|
||||||
[2] = (height*2+width+self.info.length/2)/perimeter,
|
|
||||||
[3] = 1-self.info.length/2/perimeter
|
|
||||||
}
|
|
||||||
self.info.pBRx ={
|
|
||||||
[0] = self.info.length/2/perimeter,
|
|
||||||
[1] = (height-self.info.length/2)/perimeter,
|
|
||||||
[2] = (height+width-self.info.length/2)/perimeter,
|
|
||||||
[3] = (height*2+width+self.info.length/2)/perimeter
|
|
||||||
}
|
|
||||||
self.info.pBRy ={
|
|
||||||
[0] = self.info.length/2/perimeter,
|
|
||||||
[1] = (height+self.info.length/2)/perimeter,
|
|
||||||
[2] = (height+width-self.info.length/2)/perimeter,
|
|
||||||
[3] = (height*2+width-self.info.length/2)/perimeter
|
|
||||||
}
|
|
||||||
end
|
|
||||||
if self:IsShown() then
|
|
||||||
if not (self.masks[1]:IsShown()) then
|
|
||||||
self.masks[1]:Show()
|
|
||||||
self.masks[1]:SetPoint("TOPLEFT",self,"TOPLEFT",self.info.th,-self.info.th)
|
|
||||||
self.masks[1]:SetPoint("BOTTOMRIGHT",self,"BOTTOMRIGHT",-self.info.th,self.info.th)
|
|
||||||
end
|
|
||||||
if self.masks[2] and not(self.masks[2]:IsShown()) then
|
|
||||||
self.masks[2]:Show()
|
|
||||||
self.masks[2]:SetPoint("TOPLEFT",self,"TOPLEFT",self.info.th+1,-self.info.th-1)
|
|
||||||
self.masks[2]:SetPoint("BOTTOMRIGHT",self,"BOTTOMRIGHT",-self.info.th-1,self.info.th+1)
|
|
||||||
end
|
|
||||||
if self.bg and not(self.bg:IsShown()) then
|
|
||||||
self.bg:Show()
|
|
||||||
end
|
|
||||||
for k,line in pairs(self.textures) do
|
|
||||||
line:SetPoint("TOPLEFT",self,"TOPLEFT",pCalc1((progress+self.info.step*(k-1))%1,width,self.info.th,self.info.pTLx),-pCalc2((progress+self.info.step*(k-1))%1,height,self.info.th,self.info.pTLy))
|
|
||||||
line:SetPoint("BOTTOMRIGHT",self,"TOPLEFT",self.info.th+pCalc2((progress+self.info.step*(k-1))%1,width,self.info.th,self.info.pBRx),-height+pCalc1((progress+self.info.step*(k-1))%1,height,self.info.th,self.info.pBRy))
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function lib.PixelGlow_Start(r,color,N,frequency,length,th,xOffset,yOffset,border,key,frameLevel)
|
|
||||||
if not r then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if not color then
|
|
||||||
color = {0.95,0.95,0.32,1}
|
|
||||||
end
|
|
||||||
|
|
||||||
if not(N and N>0) then
|
|
||||||
N = 8
|
|
||||||
end
|
|
||||||
|
|
||||||
local period
|
|
||||||
if frequency then
|
|
||||||
if not(frequency>0 or frequency<0) then
|
|
||||||
period = 4
|
|
||||||
else
|
|
||||||
period = 1/frequency
|
|
||||||
end
|
|
||||||
else
|
|
||||||
period = 4
|
|
||||||
end
|
|
||||||
local width,height = r:GetSize()
|
|
||||||
length = length or math.floor((width+height)*(2/N-0.1))
|
|
||||||
length = min(length,min(width,height))
|
|
||||||
th = th or 1
|
|
||||||
xOffset = xOffset or 0
|
|
||||||
yOffset = yOffset or 0
|
|
||||||
key = key or ""
|
|
||||||
|
|
||||||
addFrameAndTex(r,color,"_PixelGlow",key,N,xOffset,yOffset,textureList.white,{0,1,0,1},nil,frameLevel)
|
|
||||||
local f = r["_PixelGlow"..key]
|
|
||||||
if not f.masks then
|
|
||||||
f.masks = {}
|
|
||||||
end
|
|
||||||
if not f.masks[1] then
|
|
||||||
f.masks[1] = GlowMaskPool:Acquire()
|
|
||||||
f.masks[1]:SetTexture(textureList.empty, "CLAMPTOWHITE","CLAMPTOWHITE")
|
|
||||||
f.masks[1]:Show()
|
|
||||||
end
|
|
||||||
f.masks[1]:SetPoint("TOPLEFT",f,"TOPLEFT",th,-th)
|
|
||||||
f.masks[1]:SetPoint("BOTTOMRIGHT",f,"BOTTOMRIGHT",-th,th)
|
|
||||||
|
|
||||||
if not(border==false) then
|
|
||||||
if not f.masks[2] then
|
|
||||||
f.masks[2] = GlowMaskPool:Acquire()
|
|
||||||
f.masks[2]:SetTexture(textureList.empty, "CLAMPTOWHITE","CLAMPTOWHITE")
|
|
||||||
end
|
|
||||||
f.masks[2]:SetPoint("TOPLEFT",f,"TOPLEFT",th+1,-th-1)
|
|
||||||
f.masks[2]:SetPoint("BOTTOMRIGHT",f,"BOTTOMRIGHT",-th-1,th+1)
|
|
||||||
|
|
||||||
if not f.bg then
|
|
||||||
f.bg = GlowTexPool:Acquire()
|
|
||||||
f.bg:SetColorTexture(0.1,0.1,0.1,0.8)
|
|
||||||
f.bg:SetParent(f)
|
|
||||||
f.bg:SetAllPoints(f)
|
|
||||||
f.bg:SetDrawLayer("ARTWORK",6)
|
|
||||||
f.bg:AddMaskTexture(f.masks[2])
|
|
||||||
end
|
|
||||||
else
|
|
||||||
if f.bg then
|
|
||||||
GlowTexPool:Release(f.bg)
|
|
||||||
f.bg = nil
|
|
||||||
end
|
|
||||||
if f.masks[2] then
|
|
||||||
GlowMaskPool:Release(f.masks[2])
|
|
||||||
f.masks[2] = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
for _,tex in pairs(f.textures) do
|
|
||||||
if tex:GetNumMaskTextures() < 1 then
|
|
||||||
tex:AddMaskTexture(f.masks[1])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
f.timer = f.timer or 0
|
|
||||||
f.info = f.info or {}
|
|
||||||
f.info.step = 1/N
|
|
||||||
f.info.period = period
|
|
||||||
f.info.th = th
|
|
||||||
if f.info.length ~= length then
|
|
||||||
f.info.width = nil
|
|
||||||
f.info.length = length
|
|
||||||
end
|
|
||||||
pUpdate(f, 0)
|
|
||||||
f:SetScript("OnUpdate",pUpdate)
|
|
||||||
end
|
|
||||||
|
|
||||||
function lib.PixelGlow_Stop(r,key)
|
|
||||||
if not r then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
key = key or ""
|
|
||||||
if not r["_PixelGlow"..key] then
|
|
||||||
return false
|
|
||||||
else
|
|
||||||
GlowFramePool:Release(r["_PixelGlow"..key])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
table.insert(lib.glowList, "Pixel Glow")
|
|
||||||
lib.startList["Pixel Glow"] = lib.PixelGlow_Start
|
|
||||||
lib.stopList["Pixel Glow"] = lib.PixelGlow_Stop
|
|
||||||
|
|
||||||
|
|
||||||
--Autocast Glow Funcitons--
|
|
||||||
local function acUpdate(self,elapsed)
|
|
||||||
local width,height = self:GetSize()
|
|
||||||
if width ~= self.info.width or height ~= self.info.height then
|
|
||||||
if width*height == 0 then return end -- Avoid division by zero
|
|
||||||
self.info.width = width
|
|
||||||
self.info.height = height
|
|
||||||
self.info.perimeter = 2*(width+height)
|
|
||||||
self.info.bottomlim = height*2+width
|
|
||||||
self.info.rightlim = height+width
|
|
||||||
self.info.space = self.info.perimeter/self.info.N
|
|
||||||
end
|
|
||||||
|
|
||||||
local texIndex = 0;
|
|
||||||
for k=1,4 do
|
|
||||||
self.timer[k] = self.timer[k]+elapsed/(self.info.period*k)
|
|
||||||
if self.timer[k] > 1 or self.timer[k] <-1 then
|
|
||||||
self.timer[k] = self.timer[k]%1
|
|
||||||
end
|
|
||||||
for i = 1,self.info.N do
|
|
||||||
texIndex = texIndex+1
|
|
||||||
local position = (self.info.space*i+self.info.perimeter*self.timer[k])%self.info.perimeter
|
|
||||||
if position>self.info.bottomlim then
|
|
||||||
self.textures[texIndex]: SetPoint("CENTER",self,"BOTTOMRIGHT",-position+self.info.bottomlim,0)
|
|
||||||
elseif position>self.info.rightlim then
|
|
||||||
self.textures[texIndex]: SetPoint("CENTER",self,"TOPRIGHT",0,-position+self.info.rightlim)
|
|
||||||
elseif position>self.info.height then
|
|
||||||
self.textures[texIndex]: SetPoint("CENTER",self,"TOPLEFT",position-self.info.height,0)
|
|
||||||
else
|
|
||||||
self.textures[texIndex]: SetPoint("CENTER",self,"BOTTOMLEFT",0,position)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function lib.AutoCastGlow_Start(r,color,N,frequency,scale,xOffset,yOffset,key,frameLevel)
|
|
||||||
if not r then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if not color then
|
|
||||||
color = {0.95,0.95,0.32,1}
|
|
||||||
end
|
|
||||||
|
|
||||||
if not(N and N>0) then
|
|
||||||
N = 4
|
|
||||||
end
|
|
||||||
|
|
||||||
local period
|
|
||||||
if frequency then
|
|
||||||
if not(frequency>0 or frequency<0) then
|
|
||||||
period = 8
|
|
||||||
else
|
|
||||||
period = 1/frequency
|
|
||||||
end
|
|
||||||
else
|
|
||||||
period = 8
|
|
||||||
end
|
|
||||||
scale = scale or 1
|
|
||||||
xOffset = xOffset or 0
|
|
||||||
yOffset = yOffset or 0
|
|
||||||
key = key or ""
|
|
||||||
|
|
||||||
addFrameAndTex(r,color,"_AutoCastGlow",key,N*4,xOffset,yOffset,textureList.shine,shineCoords, true, frameLevel)
|
|
||||||
local f = r["_AutoCastGlow"..key]
|
|
||||||
local sizes = {7,6,5,4}
|
|
||||||
for k,size in pairs(sizes) do
|
|
||||||
for i = 1,N do
|
|
||||||
f.textures[i+N*(k-1)]:SetSize(size*scale,size*scale)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
f.timer = f.timer or {0,0,0,0}
|
|
||||||
f.info = f.info or {}
|
|
||||||
f.info.N = N
|
|
||||||
f.info.period = period
|
|
||||||
f:SetScript("OnUpdate",acUpdate)
|
|
||||||
end
|
|
||||||
|
|
||||||
function lib.AutoCastGlow_Stop(r,key)
|
|
||||||
if not r then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
key = key or ""
|
|
||||||
if not r["_AutoCastGlow"..key] then
|
|
||||||
return false
|
|
||||||
else
|
|
||||||
GlowFramePool:Release(r["_AutoCastGlow"..key])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
table.insert(lib.glowList, "Autocast Shine")
|
|
||||||
lib.startList["Autocast Shine"] = lib.AutoCastGlow_Start
|
|
||||||
lib.stopList["Autocast Shine"] = lib.AutoCastGlow_Stop
|
|
||||||
|
|
||||||
--Action Button Glow--
|
|
||||||
local function ButtonGlowResetter(framePool,frame)
|
|
||||||
frame:SetScript("OnUpdate",nil)
|
|
||||||
local parent = frame:GetParent()
|
|
||||||
if parent._ButtonGlow then
|
|
||||||
parent._ButtonGlow = nil
|
|
||||||
end
|
|
||||||
frame:Hide()
|
|
||||||
frame:ClearAllPoints()
|
|
||||||
end
|
|
||||||
local ButtonGlowPool = CreateFramePool("Frame",GlowParent,nil,ButtonGlowResetter)
|
|
||||||
lib.ButtonGlowPool = ButtonGlowPool
|
|
||||||
|
|
||||||
local function CreateScaleAnim(group, target, order, duration, x, y, delay)
|
|
||||||
local scale = group:CreateAnimation("Scale")
|
|
||||||
scale:SetChildKey(target)
|
|
||||||
scale:SetOrder(order)
|
|
||||||
scale:SetDuration(duration)
|
|
||||||
scale:SetScale(x, y)
|
|
||||||
|
|
||||||
if delay then
|
|
||||||
scale:SetStartDelay(delay)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function CreateAlphaAnim(group, target, order, duration, fromAlpha, toAlpha, delay, appear)
|
|
||||||
local alpha = group:CreateAnimation("Alpha")
|
|
||||||
alpha:SetChildKey(target)
|
|
||||||
alpha:SetOrder(order)
|
|
||||||
alpha:SetDuration(duration)
|
|
||||||
alpha:SetFromAlpha(fromAlpha)
|
|
||||||
alpha:SetToAlpha(toAlpha)
|
|
||||||
if delay then
|
|
||||||
alpha:SetStartDelay(delay)
|
|
||||||
end
|
|
||||||
if appear then
|
|
||||||
table.insert(group.appear, alpha)
|
|
||||||
else
|
|
||||||
table.insert(group.fade, alpha)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function AnimIn_OnPlay(group)
|
|
||||||
local frame = group:GetParent()
|
|
||||||
local frameWidth, frameHeight = frame:GetSize()
|
|
||||||
frame.spark:SetSize(frameWidth, frameHeight)
|
|
||||||
frame.spark:SetAlpha(not(frame.color) and 1.0 or 0.3*frame.color[4])
|
|
||||||
frame.innerGlow:SetSize(frameWidth / 2, frameHeight / 2)
|
|
||||||
frame.innerGlow:SetAlpha(not(frame.color) and 1.0 or frame.color[4])
|
|
||||||
frame.innerGlowOver:SetAlpha(not(frame.color) and 1.0 or frame.color[4])
|
|
||||||
frame.outerGlow:SetSize(frameWidth * 2, frameHeight * 2)
|
|
||||||
frame.outerGlow:SetAlpha(not(frame.color) and 1.0 or frame.color[4])
|
|
||||||
frame.outerGlowOver:SetAlpha(not(frame.color) and 1.0 or frame.color[4])
|
|
||||||
frame.ants:SetSize(frameWidth * 0.85, frameHeight * 0.85)
|
|
||||||
frame.ants:SetAlpha(0)
|
|
||||||
frame:Show()
|
|
||||||
end
|
|
||||||
|
|
||||||
local function AnimIn_OnFinished(group)
|
|
||||||
local frame = group:GetParent()
|
|
||||||
local frameWidth, frameHeight = frame:GetSize()
|
|
||||||
frame.spark:SetAlpha(0)
|
|
||||||
frame.innerGlow:SetAlpha(0)
|
|
||||||
frame.innerGlow:SetSize(frameWidth, frameHeight)
|
|
||||||
frame.innerGlowOver:SetAlpha(0.0)
|
|
||||||
frame.outerGlow:SetSize(frameWidth, frameHeight)
|
|
||||||
frame.outerGlowOver:SetAlpha(0.0)
|
|
||||||
frame.outerGlowOver:SetSize(frameWidth, frameHeight)
|
|
||||||
frame.ants:SetAlpha(not(frame.color) and 1.0 or frame.color[4])
|
|
||||||
end
|
|
||||||
|
|
||||||
local function AnimIn_OnStop(group)
|
|
||||||
local frame = group:GetParent()
|
|
||||||
local frameWidth, frameHeight = frame:GetSize()
|
|
||||||
frame.spark:SetAlpha(0)
|
|
||||||
frame.innerGlow:SetAlpha(0)
|
|
||||||
frame.innerGlowOver:SetAlpha(0.0)
|
|
||||||
frame.outerGlowOver:SetAlpha(0.0)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function bgHide(self)
|
|
||||||
if self.animOut:IsPlaying() then
|
|
||||||
self.animOut:Stop()
|
|
||||||
ButtonGlowPool:Release(self)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function bgUpdate(self, elapsed)
|
|
||||||
AnimateTexCoords(self.ants, 256, 256, 48, 48, 22, elapsed, self.throttle);
|
|
||||||
local cooldown = self:GetParent().cooldown;
|
|
||||||
if(cooldown and cooldown:IsShown() and cooldown:GetCooldownDuration() > 3000) then
|
|
||||||
self:SetAlpha(0.5);
|
|
||||||
else
|
|
||||||
self:SetAlpha(1.0);
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function configureButtonGlow(f,alpha)
|
|
||||||
f.spark = f:CreateTexture(nil, "BACKGROUND")
|
|
||||||
f.spark:SetPoint("CENTER")
|
|
||||||
f.spark:SetAlpha(0)
|
|
||||||
f.spark:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
|
|
||||||
f.spark:SetTexCoord(0.00781250, 0.61718750, 0.00390625, 0.26953125)
|
|
||||||
|
|
||||||
-- inner glow
|
|
||||||
f.innerGlow = f:CreateTexture(nil, "ARTWORK")
|
|
||||||
f.innerGlow:SetPoint("CENTER")
|
|
||||||
f.innerGlow:SetAlpha(0)
|
|
||||||
f.innerGlow:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
|
|
||||||
f.innerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375)
|
|
||||||
|
|
||||||
-- inner glow over
|
|
||||||
f.innerGlowOver = f:CreateTexture(nil, "ARTWORK")
|
|
||||||
f.innerGlowOver:SetPoint("TOPLEFT", f.innerGlow, "TOPLEFT")
|
|
||||||
f.innerGlowOver:SetPoint("BOTTOMRIGHT", f.innerGlow, "BOTTOMRIGHT")
|
|
||||||
f.innerGlowOver:SetAlpha(0)
|
|
||||||
f.innerGlowOver:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
|
|
||||||
f.innerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625)
|
|
||||||
|
|
||||||
-- outer glow
|
|
||||||
f.outerGlow = f:CreateTexture(nil, "ARTWORK")
|
|
||||||
f.outerGlow:SetPoint("CENTER")
|
|
||||||
f.outerGlow:SetAlpha(0)
|
|
||||||
f.outerGlow:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
|
|
||||||
f.outerGlow:SetTexCoord(0.00781250, 0.50781250, 0.27734375, 0.52734375)
|
|
||||||
|
|
||||||
-- outer glow over
|
|
||||||
f.outerGlowOver = f:CreateTexture(nil, "ARTWORK")
|
|
||||||
f.outerGlowOver:SetPoint("TOPLEFT", f.outerGlow, "TOPLEFT")
|
|
||||||
f.outerGlowOver:SetPoint("BOTTOMRIGHT", f.outerGlow, "BOTTOMRIGHT")
|
|
||||||
f.outerGlowOver:SetAlpha(0)
|
|
||||||
f.outerGlowOver:SetTexture([[Interface\SpellActivationOverlay\IconAlert]])
|
|
||||||
f.outerGlowOver:SetTexCoord(0.00781250, 0.50781250, 0.53515625, 0.78515625)
|
|
||||||
|
|
||||||
-- ants
|
|
||||||
f.ants = f:CreateTexture(nil, "OVERLAY")
|
|
||||||
f.ants:SetPoint("CENTER")
|
|
||||||
f.ants:SetAlpha(0)
|
|
||||||
f.ants:SetTexture([[Interface\SpellActivationOverlay\IconAlertAnts]])
|
|
||||||
|
|
||||||
f.animIn = f:CreateAnimationGroup()
|
|
||||||
f.animIn.appear = {}
|
|
||||||
f.animIn.fade = {}
|
|
||||||
CreateScaleAnim(f.animIn, "spark", 1, 0.2, 1.5, 1.5)
|
|
||||||
CreateAlphaAnim(f.animIn, "spark", 1, 0.2, 0, alpha, nil, true)
|
|
||||||
CreateScaleAnim(f.animIn, "innerGlow", 1, 0.3, 2, 2)
|
|
||||||
CreateScaleAnim(f.animIn, "innerGlowOver", 1, 0.3, 2, 2)
|
|
||||||
CreateAlphaAnim(f.animIn, "innerGlowOver", 1, 0.3, alpha, 0, nil, false)
|
|
||||||
CreateScaleAnim(f.animIn, "outerGlow", 1, 0.3, 0.5, 0.5)
|
|
||||||
CreateScaleAnim(f.animIn, "outerGlowOver", 1, 0.3, 0.5, 0.5)
|
|
||||||
CreateAlphaAnim(f.animIn, "outerGlowOver", 1, 0.3, alpha, 0, nil, false)
|
|
||||||
CreateScaleAnim(f.animIn, "spark", 1, 0.2, 2/3, 2/3, 0.2)
|
|
||||||
CreateAlphaAnim(f.animIn, "spark", 1, 0.2, alpha, 0, 0.2, false)
|
|
||||||
CreateAlphaAnim(f.animIn, "innerGlow", 1, 0.2, alpha, 0, 0.3, false)
|
|
||||||
CreateAlphaAnim(f.animIn, "ants", 1, 0.2, 0, alpha, 0.3, true)
|
|
||||||
f.animIn:SetScript("OnPlay", AnimIn_OnPlay)
|
|
||||||
f.animIn:SetScript("OnStop", AnimIn_OnStop)
|
|
||||||
f.animIn:SetScript("OnFinished", AnimIn_OnFinished)
|
|
||||||
|
|
||||||
f.animOut = f:CreateAnimationGroup()
|
|
||||||
f.animOut.appear = {}
|
|
||||||
f.animOut.fade = {}
|
|
||||||
CreateAlphaAnim(f.animOut, "outerGlowOver", 1, 0.2, 0, alpha, nil, true)
|
|
||||||
CreateAlphaAnim(f.animOut, "ants", 1, 0.2, alpha, 0, nil, false)
|
|
||||||
CreateAlphaAnim(f.animOut, "outerGlowOver", 2, 0.2, alpha, 0, nil, false)
|
|
||||||
CreateAlphaAnim(f.animOut, "outerGlow", 2, 0.2, alpha, 0, nil, false)
|
|
||||||
f.animOut:SetScript("OnFinished", function(self) ButtonGlowPool:Release(self:GetParent()) end)
|
|
||||||
|
|
||||||
f:SetScript("OnHide", bgHide)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function updateAlphaAnim(f,alpha)
|
|
||||||
for _,anim in pairs(f.animIn.appear) do
|
|
||||||
anim:SetToAlpha(alpha)
|
|
||||||
end
|
|
||||||
for _,anim in pairs(f.animIn.fade) do
|
|
||||||
anim:SetFromAlpha(alpha)
|
|
||||||
end
|
|
||||||
for _,anim in pairs(f.animOut.appear) do
|
|
||||||
anim:SetToAlpha(alpha)
|
|
||||||
end
|
|
||||||
for _,anim in pairs(f.animOut.fade) do
|
|
||||||
anim:SetFromAlpha(alpha)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local ButtonGlowTextures = {["spark"] = true,["innerGlow"] = true,["innerGlowOver"] = true,["outerGlow"] = true,["outerGlowOver"] = true,["ants"] = true}
|
|
||||||
|
|
||||||
function lib.ButtonGlow_Start(r,color,frequency,frameLevel)
|
|
||||||
if not r then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
frameLevel = frameLevel or 8;
|
|
||||||
local throttle
|
|
||||||
if frequency and frequency > 0 then
|
|
||||||
throttle = 0.25/frequency*0.01
|
|
||||||
else
|
|
||||||
throttle = 0.01
|
|
||||||
end
|
|
||||||
if r._ButtonGlow then
|
|
||||||
local f = r._ButtonGlow
|
|
||||||
local width,height = r:GetSize()
|
|
||||||
f:SetFrameLevel(r:GetFrameLevel()+frameLevel)
|
|
||||||
f:SetSize(width*1.4 , height*1.4)
|
|
||||||
f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2)
|
|
||||||
f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2)
|
|
||||||
f.ants:SetSize(width*1.4*0.85, height*1.4*0.85)
|
|
||||||
AnimIn_OnFinished(f.animIn)
|
|
||||||
if f.animOut:IsPlaying() then
|
|
||||||
f.animOut:Stop()
|
|
||||||
f.animIn:Play()
|
|
||||||
end
|
|
||||||
|
|
||||||
if not(color) then
|
|
||||||
for texture in pairs(ButtonGlowTextures) do
|
|
||||||
f[texture]:SetDesaturated(nil)
|
|
||||||
f[texture]:SetVertexColor(1,1,1)
|
|
||||||
f[texture]:SetAlpha(f[texture]:GetAlpha()/(f.color and f.color[4] or 1))
|
|
||||||
updateAlphaAnim(f, 1)
|
|
||||||
end
|
|
||||||
f.color = false
|
|
||||||
else
|
|
||||||
for texture in pairs(ButtonGlowTextures) do
|
|
||||||
f[texture]:SetDesaturated(1)
|
|
||||||
f[texture]:SetVertexColor(color[1],color[2],color[3])
|
|
||||||
f[texture]:SetAlpha(f[texture]:GetAlpha()/(f.color and f.color[4] or 1)*color[4])
|
|
||||||
updateAlphaAnim(f,color and color[4] or 1)
|
|
||||||
end
|
|
||||||
f.color = color
|
|
||||||
end
|
|
||||||
f.throttle = throttle
|
|
||||||
else
|
|
||||||
local f, new = ButtonGlowPool:Acquire()
|
|
||||||
if new then
|
|
||||||
configureButtonGlow(f,color and color[4] or 1)
|
|
||||||
else
|
|
||||||
updateAlphaAnim(f,color and color[4] or 1)
|
|
||||||
end
|
|
||||||
r._ButtonGlow = f
|
|
||||||
local width,height = r:GetSize()
|
|
||||||
f:SetParent(r)
|
|
||||||
f:SetFrameLevel(r:GetFrameLevel()+frameLevel)
|
|
||||||
f:SetSize(width * 1.4, height * 1.4)
|
|
||||||
f:SetPoint("TOPLEFT", r, "TOPLEFT", -width * 0.2, height * 0.2)
|
|
||||||
f:SetPoint("BOTTOMRIGHT", r, "BOTTOMRIGHT", width * 0.2, -height * 0.2)
|
|
||||||
if not(color) then
|
|
||||||
f.color = false
|
|
||||||
for texture in pairs(ButtonGlowTextures) do
|
|
||||||
f[texture]:SetDesaturated(nil)
|
|
||||||
f[texture]:SetVertexColor(1,1,1)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
f.color = color
|
|
||||||
for texture in pairs(ButtonGlowTextures) do
|
|
||||||
f[texture]:SetDesaturated(1)
|
|
||||||
f[texture]:SetVertexColor(color[1],color[2],color[3])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
f.throttle = throttle
|
|
||||||
f:SetScript("OnUpdate", bgUpdate)
|
|
||||||
|
|
||||||
f.animIn:Play()
|
|
||||||
|
|
||||||
if Masque and Masque.UpdateSpellAlert and (not r.overlay or not issecurevariable(r, "overlay")) then
|
|
||||||
local old_overlay = r.overlay
|
|
||||||
r.overlay = f
|
|
||||||
Masque:UpdateSpellAlert(r)
|
|
||||||
r.overlay = old_overlay
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function lib.ButtonGlow_Stop(r)
|
|
||||||
if r._ButtonGlow then
|
|
||||||
if r._ButtonGlow.animIn:IsPlaying() then
|
|
||||||
r._ButtonGlow.animIn:Stop()
|
|
||||||
ButtonGlowPool:Release(r._ButtonGlow)
|
|
||||||
elseif r:IsVisible() then
|
|
||||||
r._ButtonGlow.animOut:Play()
|
|
||||||
else
|
|
||||||
ButtonGlowPool:Release(r._ButtonGlow)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
table.insert(lib.glowList, "Action Button Glow")
|
|
||||||
lib.startList["Action Button Glow"] = lib.ButtonGlow_Start
|
|
||||||
lib.stopList["Action Button Glow"] = lib.ButtonGlow_Stop
|
|
@ -1,12 +0,0 @@
|
|||||||
## Interface: 80200
|
|
||||||
## Title: Lib: CustomGlow
|
|
||||||
## Notes: Creates custom glow functions
|
|
||||||
## Author: deezo
|
|
||||||
## X-Category: Library
|
|
||||||
## X-License: BSD
|
|
||||||
## Version: f15e6de
|
|
||||||
## OptionalDeps: Masque
|
|
||||||
|
|
||||||
LibStub\LibStub.lua
|
|
||||||
|
|
||||||
LibCustomGlow-1.0.xml
|
|
@ -1,51 +0,0 @@
|
|||||||
Adds functions:
|
|
||||||
|
|
||||||
`PixelGlow_Start(frame[, color[, N[, frequency[, length[, th[, xOffset[, yOffset[, border[ ,key]]]]]]]])`
|
|
||||||
|
|
||||||
Starts glow over target frame with set parameters:
|
|
||||||
|
|
||||||
- frame - target frame to set glowing;
|
|
||||||
- color - {r,g,b,a}, color of lines and opacity, from 0 to 1. Defaul value is {0.95, 0.95, 0.32, 1};
|
|
||||||
- N - number of lines. Defaul value is 8;
|
|
||||||
- frequency - frequency, set to negative to inverse direction of rotation. Default value is 0.25;
|
|
||||||
- length - length of lines. Default value depends on region size and number of lines;
|
|
||||||
- th - thickness of lines. Default value is 2;
|
|
||||||
- xOffset,yOffset - offset of glow relative to region border;
|
|
||||||
- border - set to true to create border under lines;
|
|
||||||
- key - key of glow, allows for multiple glows on one frame;
|
|
||||||
|
|
||||||
`PixelGlow_Stop(frame[, key])`
|
|
||||||
|
|
||||||
Stops glow with set key over target frame
|
|
||||||
|
|
||||||
`AutoCastGlow_Start(frame[, color[, N[, frequency[, scale[, xOffset[, yOffset[, key]]]]]]])`
|
|
||||||
|
|
||||||
Starts glow over target frame with set parameters:
|
|
||||||
|
|
||||||
- frame - target frame to set glowing;
|
|
||||||
- color - {r,g,b,a}, color of particles and opacity, from 0 to 1. Defaul value is {0.95, 0.95, 0.32, 1};
|
|
||||||
- N - number of particle groups. Each group contains 4 particles. Defaul value is 4;
|
|
||||||
- frequency - frequency, set to negative to inverse direction of rotation. Default value is 0.125;
|
|
||||||
- scale - scale of particles;
|
|
||||||
- xOffset,yOffset - offset of glow relative to region border;
|
|
||||||
- key - key of glow, allows for multiple glows on one frame;
|
|
||||||
|
|
||||||
`AutoCastGlow_Stop(frame[, key])`
|
|
||||||
|
|
||||||
Stops glow with set key over target frame
|
|
||||||
|
|
||||||
|
|
||||||
Blizzard glow is based heavily on https://www.wowace.com/projects/libbuttonglow-1-0
|
|
||||||
|
|
||||||
`ButtonGlow_Start(frame[, color[, frequency]]])`
|
|
||||||
|
|
||||||
Starts glow over target frame with set parameters:
|
|
||||||
|
|
||||||
- frame - target frame to set glowing;
|
|
||||||
- color - {r,g,b,a}, color of particles and opacity, from 0 to 1. Defaul value is {0.95, 0.95, 0.32, 1};
|
|
||||||
- frequency - frequency. Default value is 0.125;
|
|
||||||
- frameLevel - frameLevel. Default value is 8;
|
|
||||||
|
|
||||||
`ButtonGlow_Stop(frame)`
|
|
||||||
|
|
||||||
Stops glow over target frame
|
|
@ -1,7 +1,6 @@
|
|||||||
--@curseforge-project-slug: libsharedmedia-3-0@
|
|
||||||
--[[
|
--[[
|
||||||
Name: LibSharedMedia-3.0
|
Name: LibSharedMedia-3.0
|
||||||
Revision: $Revision: 128 $
|
Revision: $Revision: 114 $
|
||||||
Author: Elkano (elkano@gmx.de)
|
Author: Elkano (elkano@gmx.de)
|
||||||
Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
|
Inspired By: SurfaceLib by Haste/Otravi (troeks@gmail.com)
|
||||||
Website: http://www.wowace.com/projects/libsharedmedia-3-0/
|
Website: http://www.wowace.com/projects/libsharedmedia-3-0/
|
||||||
|
@ -1,232 +0,0 @@
|
|||||||
--- = Background =
|
|
||||||
-- Blizzard's IsSpellInRange API has always been very limited - you either must have the name of the spell, or its spell book ID. Checking directly by spellID is simply not possible.
|
|
||||||
-- Now, in Mists of Pandaria, Blizzard changed the way that many talents and specialization spells work - instead of giving you a new spell when leaned, they replace existing spells. These replacement spells do not work with Blizzard's IsSpellInRange function whatsoever; this limitation is what prompted the creation of this lib.
|
|
||||||
-- = Usage =
|
|
||||||
-- **LibSpellRange-1.0** exposes an enhanced version of IsSpellInRange that:
|
|
||||||
-- * Allows ranged checking based on both spell name and spellID.
|
|
||||||
-- * Works correctly with replacement spells that will not work using Blizzard's IsSpellInRange method alone.
|
|
||||||
--
|
|
||||||
-- @class file
|
|
||||||
-- @name LibSpellRange-1.0.lua
|
|
||||||
|
|
||||||
local major = "SpellRange-1.0"
|
|
||||||
local minor = 15
|
|
||||||
|
|
||||||
assert(LibStub, format("%s requires LibStub.", major))
|
|
||||||
|
|
||||||
local Lib = LibStub:NewLibrary(major, minor)
|
|
||||||
if not Lib then return end
|
|
||||||
|
|
||||||
local tonumber = _G.tonumber
|
|
||||||
local strlower = _G.strlower
|
|
||||||
local wipe = _G.wipe
|
|
||||||
local type = _G.type
|
|
||||||
|
|
||||||
local GetSpellTabInfo = _G.GetSpellTabInfo
|
|
||||||
local GetNumSpellTabs = _G.GetNumSpellTabs
|
|
||||||
local GetSpellBookItemInfo = _G.GetSpellBookItemInfo
|
|
||||||
local GetSpellBookItemName = _G.GetSpellBookItemName
|
|
||||||
local GetSpellLink = _G.GetSpellLink
|
|
||||||
local GetSpellInfo = _G.GetSpellInfo
|
|
||||||
|
|
||||||
local IsSpellInRange = _G.IsSpellInRange
|
|
||||||
local SpellHasRange = _G.SpellHasRange
|
|
||||||
|
|
||||||
-- isNumber is basically a tonumber cache for maximum efficiency
|
|
||||||
Lib.isNumber = Lib.isNumber or setmetatable({}, {
|
|
||||||
__mode = "kv",
|
|
||||||
__index = function(t, i)
|
|
||||||
local o = tonumber(i) or false
|
|
||||||
t[i] = o
|
|
||||||
return o
|
|
||||||
end})
|
|
||||||
local isNumber = Lib.isNumber
|
|
||||||
|
|
||||||
-- strlower cache for maximum efficiency
|
|
||||||
Lib.strlowerCache = Lib.strlowerCache or setmetatable(
|
|
||||||
{}, {
|
|
||||||
__index = function(t, i)
|
|
||||||
if not i then return end
|
|
||||||
local o
|
|
||||||
if type(i) == "number" then
|
|
||||||
o = i
|
|
||||||
else
|
|
||||||
o = strlower(i)
|
|
||||||
end
|
|
||||||
t[i] = o
|
|
||||||
return o
|
|
||||||
end,
|
|
||||||
}) local strlowerCache = Lib.strlowerCache
|
|
||||||
|
|
||||||
-- Matches lowercase player spell names to their spellBookID
|
|
||||||
Lib.spellsByName_spell = Lib.spellsByName_spell or {}
|
|
||||||
local spellsByName_spell = Lib.spellsByName_spell
|
|
||||||
|
|
||||||
-- Matches player spellIDs to their spellBookID
|
|
||||||
Lib.spellsByID_spell = Lib.spellsByID_spell or {}
|
|
||||||
local spellsByID_spell = Lib.spellsByID_spell
|
|
||||||
|
|
||||||
-- Matches lowercase pet spell names to their spellBookID
|
|
||||||
Lib.spellsByName_pet = Lib.spellsByName_pet or {}
|
|
||||||
local spellsByName_pet = Lib.spellsByName_pet
|
|
||||||
|
|
||||||
-- Matches pet spellIDs to their spellBookID
|
|
||||||
Lib.spellsByID_pet = Lib.spellsByID_pet or {}
|
|
||||||
local spellsByID_pet = Lib.spellsByID_pet
|
|
||||||
|
|
||||||
-- Updates spellsByName and spellsByID
|
|
||||||
local function UpdateBook(bookType)
|
|
||||||
local max = 0
|
|
||||||
for i = 1, GetNumSpellTabs() do
|
|
||||||
local _, _, offs, numspells, _, specId = GetSpellTabInfo(i)
|
|
||||||
if specId == 0 then
|
|
||||||
max = offs + numspells
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local spellsByName = Lib["spellsByName_" .. bookType]
|
|
||||||
local spellsByID = Lib["spellsByID_" .. bookType]
|
|
||||||
|
|
||||||
wipe(spellsByName)
|
|
||||||
wipe(spellsByID)
|
|
||||||
|
|
||||||
for spellBookID = 1, max do
|
|
||||||
local type, baseSpellID = GetSpellBookItemInfo(spellBookID, bookType)
|
|
||||||
|
|
||||||
if type == "SPELL" or type == "PETACTION" then
|
|
||||||
local currentSpellName = GetSpellBookItemName(spellBookID, bookType)
|
|
||||||
local link = GetSpellLink(currentSpellName)
|
|
||||||
local currentSpellID = tonumber(link and link:gsub("|", "||"):match("spell:(%d+)"))
|
|
||||||
|
|
||||||
-- For each entry we add to a table,
|
|
||||||
-- only add it if there isn't anything there already.
|
|
||||||
-- This prevents weird passives from overwriting real, legit spells.
|
|
||||||
-- For example, in WoW 7.3.5 the ret paladin mastery
|
|
||||||
-- was coming back with a base spell named "Judgement",
|
|
||||||
-- which was overwriting the real "Judgement".
|
|
||||||
-- Passives usually come last in the spellbook,
|
|
||||||
-- so this should work just fine as a workaround.
|
|
||||||
-- This issue with "Judgement" is gone in BFA because the mastery changed.
|
|
||||||
|
|
||||||
if currentSpellName and not spellsByName[strlower(currentSpellName)] then
|
|
||||||
spellsByName[strlower(currentSpellName)] = spellBookID
|
|
||||||
end
|
|
||||||
if currentSpellID and not spellsByID[currentSpellID] then
|
|
||||||
spellsByID[currentSpellID] = spellBookID
|
|
||||||
end
|
|
||||||
|
|
||||||
if type == "SPELL" then
|
|
||||||
-- PETACTION (pet abilities) don't return a spellID for baseSpellID,
|
|
||||||
-- so base spells only work for proper player spells.
|
|
||||||
local baseSpellName = GetSpellInfo(baseSpellID)
|
|
||||||
if baseSpellName and not spellsByName[strlower(baseSpellName)] then
|
|
||||||
spellsByName[strlower(baseSpellName)] = spellBookID
|
|
||||||
end
|
|
||||||
if baseSpellID and not spellsByID[baseSpellID] then
|
|
||||||
spellsByID[baseSpellID] = spellBookID
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Handles updating spellsByName and spellsByID
|
|
||||||
if not Lib.updaterFrame then
|
|
||||||
Lib.updaterFrame = CreateFrame("Frame")
|
|
||||||
end
|
|
||||||
Lib.updaterFrame:UnregisterAllEvents()
|
|
||||||
Lib.updaterFrame:RegisterEvent("SPELLS_CHANGED")
|
|
||||||
|
|
||||||
local function UpdateSpells()
|
|
||||||
UpdateBook("spell")
|
|
||||||
UpdateBook("pet")
|
|
||||||
end
|
|
||||||
|
|
||||||
Lib.updaterFrame:SetScript("OnEvent", UpdateSpells)
|
|
||||||
UpdateSpells()
|
|
||||||
|
|
||||||
--- Improved spell range checking function.
|
|
||||||
-- @name SpellRange.IsSpellInRange
|
|
||||||
-- @paramsig spell, unit
|
|
||||||
-- @param spell Name or spellID of a spell that you wish to check the range of. The spell must be a spell that you have in your spellbook or your pet's spellbook.
|
|
||||||
-- @param unit UnitID of the spell that you wish to check the range on.
|
|
||||||
-- @return Exact same returns as http://wowprogramming.com/docs/api/IsSpellInRange
|
|
||||||
-- @usage
|
|
||||||
-- -- Check spell range by spell name on unit "target"
|
|
||||||
-- local SpellRange = LibStub("SpellRange-1.0")
|
|
||||||
-- local inRange = SpellRange.IsSpellInRange("Stormstrike", "target")
|
|
||||||
--
|
|
||||||
-- -- Check spell range by spellID on unit "mouseover"
|
|
||||||
-- local SpellRange = LibStub("SpellRange-1.0")
|
|
||||||
-- local inRange = SpellRange.IsSpellInRange(17364, "mouseover")
|
|
||||||
function Lib.IsSpellInRange(spellInput, unit)
|
|
||||||
if isNumber[spellInput] then
|
|
||||||
local spell = spellsByID_spell[spellInput]
|
|
||||||
if spell then
|
|
||||||
return IsSpellInRange(spell, "spell", unit)
|
|
||||||
else
|
|
||||||
local spell = spellsByID_pet[spellInput]
|
|
||||||
if spell then
|
|
||||||
return IsSpellInRange(spell, "pet", unit)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local spellInput = strlowerCache[spellInput]
|
|
||||||
|
|
||||||
local spell = spellsByName_spell[spellInput]
|
|
||||||
if spell then
|
|
||||||
return IsSpellInRange(spell, "spell", unit)
|
|
||||||
else
|
|
||||||
local spell = spellsByName_pet[spellInput]
|
|
||||||
if spell then
|
|
||||||
return IsSpellInRange(spell, "pet", unit)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return IsSpellInRange(spellInput, unit)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
--- Improved SpellHasRange.
|
|
||||||
-- @name SpellRange.SpellHasRange
|
|
||||||
-- @paramsig spell
|
|
||||||
-- @param spell Name or spellID of a spell that you wish to check for a range. The spell must be a spell that you have in your spellbook or your pet's spellbook.
|
|
||||||
-- @return Exact same returns as http://wowprogramming.com/docs/api/SpellHasRange
|
|
||||||
-- @usage
|
|
||||||
-- -- Check if a spell has a range by spell name
|
|
||||||
-- local SpellRange = LibStub("SpellRange-1.0")
|
|
||||||
-- local hasRange = SpellRange.SpellHasRange("Stormstrike")
|
|
||||||
--
|
|
||||||
-- -- Check if a spell has a range by spellID
|
|
||||||
-- local SpellRange = LibStub("SpellRange-1.0")
|
|
||||||
-- local hasRange = SpellRange.SpellHasRange(17364)
|
|
||||||
function Lib.SpellHasRange(spellInput)
|
|
||||||
if isNumber[spellInput] then
|
|
||||||
local spell = spellsByID_spell[spellInput]
|
|
||||||
if spell then
|
|
||||||
return SpellHasRange(spell, "spell")
|
|
||||||
else
|
|
||||||
local spell = spellsByID_pet[spellInput]
|
|
||||||
if spell then
|
|
||||||
return SpellHasRange(spell, "pet")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
else
|
|
||||||
local spellInput = strlowerCache[spellInput]
|
|
||||||
|
|
||||||
local spell = spellsByName_spell[spellInput]
|
|
||||||
if spell then
|
|
||||||
return SpellHasRange(spell, "spell")
|
|
||||||
else
|
|
||||||
local spell = spellsByName_pet[spellInput]
|
|
||||||
if spell then
|
|
||||||
return SpellHasRange(spell, "pet")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return SpellHasRange(spellInput)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
@ -1,61 +0,0 @@
|
|||||||
# LibSpellRange-1.0
|
|
||||||
|
|
||||||
## Background
|
|
||||||
|
|
||||||
Blizzard's `IsSpellInRange` API has always been very limited - you either must have the name of the spell,
|
|
||||||
or its spell book ID. Checking directly by spellID is simply not possible.
|
|
||||||
Now, since Mists of Pandaria, Blizzard changed the way that many talents and specialization spells work -
|
|
||||||
instead of giving you a new spell when leaned, they replace existing spells. These replacement spells do
|
|
||||||
not work with Blizzard's IsSpellInRange function whatsoever; this limitation is what prompted the creation of this lib.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
**LibSpellRange-1.0** exposes an enhanced version of IsSpellInRange that:
|
|
||||||
|
|
||||||
* Allows ranged checking based on both spell name and spellID.
|
|
||||||
* Works correctly with replacement spells that will not work using Blizzard's IsSpellInRange method alone.
|
|
||||||
|
|
||||||
### `SpellRange.IsSpellInRange(spell, unit)` - Improved `IsSpellInRange`
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
- `spell` - Name or spellID of a spell that you wish to check the range of. The spell must be a spell that you have in your spellbook or your pet's spellbook.
|
|
||||||
- `unit` - UnitID of the spell that you wish to check the range on.
|
|
||||||
|
|
||||||
#### Return value
|
|
||||||
|
|
||||||
Exact same returns as [the built-in `IsSpellInRange`](http://wowprogramming.com/docs/api/IsSpellInRange.html)
|
|
||||||
|
|
||||||
#### Usage
|
|
||||||
|
|
||||||
``` lua
|
|
||||||
-- Check spell range by spell name on unit "target"
|
|
||||||
local SpellRange = LibStub("SpellRange-1.0")
|
|
||||||
local inRange = SpellRange.IsSpellInRange("Stormstrike", "target")
|
|
||||||
|
|
||||||
-- Check spell range by spellID on unit "mouseover"
|
|
||||||
local SpellRange = LibStub("SpellRange-1.0")
|
|
||||||
local inRange = SpellRange.IsSpellInRange(17364, "mouseover")
|
|
||||||
```
|
|
||||||
|
|
||||||
### `SpellRange.SpellHasRange(spell)` - Improved `SpellHasRange`
|
|
||||||
|
|
||||||
#### Parameters
|
|
||||||
|
|
||||||
- `spell` - Name or spellID of a spell that you wish to check for a range. The spell must be a spell that you have in your spellbook or your pet's spellbook.
|
|
||||||
|
|
||||||
#### Return value
|
|
||||||
|
|
||||||
Exact same returns as [the built-in `SpellHasRange`](http://wowprogramming.com/docs/api/SpellHasRange.html)
|
|
||||||
|
|
||||||
#### Usage
|
|
||||||
|
|
||||||
``` lua
|
|
||||||
-- Check if a spell has a range by spell name
|
|
||||||
local SpellRange = LibStub("SpellRange-1.0")
|
|
||||||
local hasRange = SpellRange.SpellHasRange("Stormstrike")
|
|
||||||
|
|
||||||
-- Check if a spell has a range by spellID
|
|
||||||
local SpellRange = LibStub("SpellRange-1.0")
|
|
||||||
local hasRange = SpellRange.SpellHasRange(17364)
|
|
||||||
```
|
|
@ -1,3 +0,0 @@
|
|||||||
<Ui>
|
|
||||||
<Script file="LibSpellRange-1.0.lua"/>
|
|
||||||
</Ui>
|
|
@ -10,7 +10,7 @@ if not LibStub or LibStub.minor < LIBSTUB_MINOR then
|
|||||||
|
|
||||||
function LibStub:NewLibrary(major, minor)
|
function LibStub:NewLibrary(major, minor)
|
||||||
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
|
assert(type(major) == "string", "Bad argument #2 to `NewLibrary' (string expected)")
|
||||||
minor = assert(tonumber(string.match(minor, "%d+")), "Minor version must either be a number or contain a number.")
|
minor = assert(tonumber(strmatch(minor, "%d+")), "Minor version must either be a number or contain a number.")
|
||||||
|
|
||||||
local oldminor = self.minors[major]
|
local oldminor = self.minors[major]
|
||||||
if oldminor and oldminor >= minor then return nil end
|
if oldminor and oldminor >= minor then return nil end
|
||||||
|
@ -16,18 +16,17 @@ local UnitName = UnitName
|
|||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local Announcements = Gladdy:NewModule("Announcements", 101, {
|
local Announcements = Gladdy:NewModule("Announcements", nil, {
|
||||||
announcements = {
|
announcements = {
|
||||||
drinks = true,
|
drinks = true,
|
||||||
resurrections = true,
|
resurrections = true,
|
||||||
enemy = false,
|
enemy = false,
|
||||||
spec = true,
|
spec = false,
|
||||||
health = false,
|
health = false,
|
||||||
healthThreshold = 20,
|
healthThreshold = 20,
|
||||||
trinketUsed = true,
|
trinketUsed = true,
|
||||||
trinketReady = false,
|
trinketReady = false,
|
||||||
spellInterrupt = true,
|
dest = "self",
|
||||||
dest = "party",
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -42,20 +41,15 @@ function Announcements:Initialize()
|
|||||||
[GetSpellInfo(20777)] = true,
|
[GetSpellInfo(20777)] = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
self:RegisterMessage("JOINED_ARENA")
|
self:RegisterMessage("CAST_START")
|
||||||
|
self:RegisterMessage("ENEMY_SPOTTED")
|
||||||
|
self:RegisterMessage("UNIT_SPEC")
|
||||||
|
self:RegisterMessage("UNIT_HEALTH")
|
||||||
|
self:RegisterMessage("TRINKET_USED")
|
||||||
|
self:RegisterMessage("TRINKET_READY")
|
||||||
end
|
end
|
||||||
|
|
||||||
function Announcements:Reset()
|
function Announcements:Reset()
|
||||||
self:UnregisterMessages(
|
|
||||||
"CAST_START",
|
|
||||||
"ENEMY_SPOTTED",
|
|
||||||
"UNIT_SPEC",
|
|
||||||
"AURA_GAIN",
|
|
||||||
"UNIT_HEALTH",
|
|
||||||
"TRINKET_USED",
|
|
||||||
"TRINKET_READY",
|
|
||||||
"SHADOWSIGHT",
|
|
||||||
"SPELL_INTERRUPT")
|
|
||||||
self.enemy = {}
|
self.enemy = {}
|
||||||
self.throttled = {}
|
self.throttled = {}
|
||||||
end
|
end
|
||||||
@ -65,23 +59,15 @@ function Announcements:Test(unit)
|
|||||||
if (not button) then
|
if (not button) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self:JOINED_ARENA()
|
|
||||||
if unit == "arena1" then
|
|
||||||
self:AURA_GAIN(unit, nil, nil, self.DRINK_AURA)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function Announcements:JOINED_ARENA()
|
if (unit == "arena1") then
|
||||||
self:RegisterMessages(
|
self:UNIT_SPEC(unit, button.testSpec)
|
||||||
"CAST_START",
|
elseif (unit == "arena2") then
|
||||||
"ENEMY_SPOTTED",
|
self:CheckDrink(unit, self.DRINK_AURA)
|
||||||
"UNIT_SPEC",
|
elseif (unit == "arena3") then
|
||||||
"AURA_GAIN",
|
self:UNIT_HEALTH(unit, button.health, button.healthMax)
|
||||||
"UNIT_HEALTH",
|
self:ENEMY_SPOTTED(unit)
|
||||||
"TRINKET_USED",
|
end
|
||||||
"TRINKET_READY",
|
|
||||||
"SHADOWSIGHT",
|
|
||||||
"SPELL_INTERRUPT")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Announcements:CAST_START(unit, spell)
|
function Announcements:CAST_START(unit, spell)
|
||||||
@ -91,7 +77,7 @@ function Announcements:CAST_START(unit, spell)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if (self.RES_SPELLS[spell]) then
|
if (self.RES_SPELLS[spell]) then
|
||||||
self:Send(L["RESURRECTING: %s (%s)"]:format(button.name, button.classLoc), 3, RAID_CLASS_COLORS[button.class], unit)
|
self:Send(L["RESURRECTING: %s (%s)"]:format(button.name, button.classLoc), 3, RAID_CLASS_COLORS[button.class])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -105,7 +91,7 @@ function Announcements:ENEMY_SPOTTED(unit)
|
|||||||
if button.name == "Unknown" then
|
if button.name == "Unknown" then
|
||||||
button.name = UnitName(unit)
|
button.name = UnitName(unit)
|
||||||
end
|
end
|
||||||
self:Send("ENEMY SPOTTED:" .. ("%s (%s)"):format(button.name, button.classLoc), 0, RAID_CLASS_COLORS[button.class], unit)
|
self:Send("ENEMY SPOTTED:" .. ("%s (%s)"):format(button.name, button.classLoc), 0, RAID_CLASS_COLORS[button.class])
|
||||||
self.enemy[unit] = true
|
self.enemy[unit] = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -118,7 +104,7 @@ function Announcements:UNIT_SPEC(unit, spec)
|
|||||||
if button.name == "Unknown" then
|
if button.name == "Unknown" then
|
||||||
button.name = UnitName(unit)
|
button.name = UnitName(unit)
|
||||||
end
|
end
|
||||||
self:Send(L["SPEC DETECTED: %s - %s (%s)"]:format(button.name, spec, button.classLoc), 1, RAID_CLASS_COLORS[button.class], unit)
|
self:Send(L["SPEC DETECTED: %s - %s (%s)"]:format(button.name, spec, button.classLoc), 0, RAID_CLASS_COLORS[button.class])
|
||||||
end
|
end
|
||||||
|
|
||||||
function Announcements:UNIT_HEALTH(unit, health, healthMax)
|
function Announcements:UNIT_HEALTH(unit, health, healthMax)
|
||||||
@ -129,7 +115,7 @@ function Announcements:UNIT_HEALTH(unit, health, healthMax)
|
|||||||
|
|
||||||
local healthPercent = floor(health * 100 / healthMax)
|
local healthPercent = floor(health * 100 / healthMax)
|
||||||
if (healthPercent < Gladdy.db.announcements.healthThreshold) then
|
if (healthPercent < Gladdy.db.announcements.healthThreshold) then
|
||||||
self:Send(L["LOW HEALTH: %s (%s)"]:format(button.name, button.classLoc), 10, RAID_CLASS_COLORS[button.class], unit)
|
self:Send(L["LOW HEALTH: %s (%s)"]:format(button.name, button.classLoc), 10, RAID_CLASS_COLORS[button.class])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -139,7 +125,7 @@ function Announcements:TRINKET_USED(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self:Send(L["TRINKET USED: %s (%s)"]:format(button.name, button.classLoc), 1, RAID_CLASS_COLORS[button.class], unit)
|
self:Send(L["TRINKET USED: %s (%s)"]:format(button.name, button.classLoc), 0, RAID_CLASS_COLORS[button.class])
|
||||||
end
|
end
|
||||||
|
|
||||||
function Announcements:TRINKET_READY(unit)
|
function Announcements:TRINKET_READY(unit)
|
||||||
@ -148,43 +134,27 @@ function Announcements:TRINKET_READY(unit)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self:Send(L["TRINKET READY: %s (%s)"]:format(button.name, button.classLoc), 1, RAID_CLASS_COLORS[button.class], unit)
|
self:Send(L["TRINKET READY: %s (%s)"]:format(button.name, button.classLoc), 3, RAID_CLASS_COLORS[button.class])
|
||||||
end
|
end
|
||||||
|
|
||||||
function Announcements:SPELL_INTERRUPT(unit,spellID,spellName,spellSchool,extraSpellId,extraSpellName,extraSpellSchool)
|
function Announcements:CheckDrink(unit, aura)
|
||||||
local button = Gladdy.buttons[unit]
|
|
||||||
if (not button or not Gladdy.db.announcements.spellInterrupt) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
self:Send(L["INTERRUPTED: %s (%s)"]:format(extraSpellName, button.name or ""), nil, RAID_CLASS_COLORS[button.class], unit)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Announcements:AURA_GAIN(unit, auraType, spellID, spellName)
|
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
if (not button or not Gladdy.db.announcements.drinks) then
|
if (not button or not Gladdy.db.announcements.drinks) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if (spellName == self.DRINK_AURA) then
|
if (aura == self.DRINK_AURA) then
|
||||||
self:Send(L["DRINKING: %s (%s)"]:format(button.name, button.classLoc), 3, RAID_CLASS_COLORS[button.class], unit)
|
self:Send(L["DRINKING: %s (%s)"]:format(button.name, button.classLoc), 3, RAID_CLASS_COLORS[button.class])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Announcements:SHADOWSIGHT(msg)
|
function Announcements:Send(msg, throttle, color)
|
||||||
self:Send(msg, 2)
|
|
||||||
end
|
|
||||||
|
|
||||||
function Announcements:Send(msg, throttle, color, unit)
|
|
||||||
if (throttle and throttle > 0) then
|
if (throttle and throttle > 0) then
|
||||||
local throttledMsg = unit and msg .. unit or msg
|
if (not self.throttled[msg]) then
|
||||||
if (not self.throttled[throttledMsg]) then
|
self.throttled[msg] = GetTime() + throttle
|
||||||
self.throttled[throttledMsg] = GetTime() + throttle
|
elseif (self.throttled[msg] < GetTime()) then
|
||||||
Gladdy:Debug("INFO", throttledMsg, "- NOT THROTTLED -", self.throttled[throttledMsg])
|
self.throttled[msg] = nil
|
||||||
elseif (self.throttled[throttledMsg] < GetTime()) then
|
|
||||||
Gladdy:Debug("INFO", throttledMsg, "- THROTTLED OVER -", self.throttled[throttledMsg])
|
|
||||||
self.throttled[throttledMsg] = GetTime() + throttle
|
|
||||||
else
|
else
|
||||||
Gladdy:Debug("INFO", throttledMsg, "- THROTTLED -", self.throttled[throttledMsg])
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -202,9 +172,9 @@ function Announcements:Send(msg, throttle, color, unit)
|
|||||||
RaidNotice_AddMessage(RaidBossEmoteFrame, msg, color)
|
RaidNotice_AddMessage(RaidBossEmoteFrame, msg, color)
|
||||||
elseif (dest == "fct" and IsAddOnLoaded("Blizzard_CombatText")) then
|
elseif (dest == "fct" and IsAddOnLoaded("Blizzard_CombatText")) then
|
||||||
CombatText_AddMessage(msg, nil, color.r, color.g, color.b, "crit", 1)
|
CombatText_AddMessage(msg, nil, color.r, color.g, color.b, "crit", 1)
|
||||||
elseif (dest == "msbt" and IsAddOnLoaded("MikScrollingBattleText")) then
|
--[[elseif (dest == "msbt" and IsAddOnLoaded("MikScrollingBattleText")) then
|
||||||
MikSBT.Animations.DisplayMessage(msg, MikSBT.DISPLAYTYPE_NOTIFICATION, true, color.r * 255, color.g * 255, color.b * 255)
|
MikSBT.DisplayMessage(msg, MikSBT.DISPLAYTYPE_NOTIFICATION, true, color.r * 255, color.g * 255, color.b * 255)
|
||||||
--[[elseif (dest == "sct" and IsAddOnLoaded("sct")) then
|
elseif (dest == "sct" and IsAddOnLoaded("sct")) then
|
||||||
SCT:DisplayText(msg, color, true, "event", 1)
|
SCT:DisplayText(msg, color, true, "event", 1)
|
||||||
elseif (dest == "parrot" and IsAddOnLoaded("parrot")) then
|
elseif (dest == "parrot" and IsAddOnLoaded("parrot")) then
|
||||||
Parrot:ShowMessage(msg, "Notification", true, color.r, color.g, color.b)--]]
|
Parrot:ShowMessage(msg, "Notification", true, color.r, color.g, color.b)--]]
|
||||||
@ -235,15 +205,12 @@ function Announcements:GetOptions()
|
|||||||
["self"] = L["Self"],
|
["self"] = L["Self"],
|
||||||
["party"] = L["Party"],
|
["party"] = L["Party"],
|
||||||
["rw"] = L["Raid Warning"],
|
["rw"] = L["Raid Warning"],
|
||||||
|
["fct"] = L["Blizzard's Floating Combat Text"],
|
||||||
|
--["msbt"] = L["MikScrollingBattleText"],
|
||||||
|
--["sct"] = L["Scrolling Combat Text"],
|
||||||
|
--["parrot"] = L["Parrot"],
|
||||||
}
|
}
|
||||||
|
|
||||||
if IsAddOnLoaded("Blizzard_CombatText") then
|
|
||||||
destValues["fct"] = L["Blizzard's Floating Combat Text"]
|
|
||||||
end
|
|
||||||
if IsAddOnLoaded("MikScrollingBattleText") then
|
|
||||||
destValues["msbt"] = L["MikScrollingBattleText"]
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
headerAnnouncements = {
|
headerAnnouncements = {
|
||||||
type = "header",
|
type = "header",
|
||||||
@ -262,47 +229,41 @@ function Announcements:GetOptions()
|
|||||||
desc = L["Announce when an enemy's trinket is ready again"],
|
desc = L["Announce when an enemy's trinket is ready again"],
|
||||||
order = 4,
|
order = 4,
|
||||||
}),
|
}),
|
||||||
spellInterrupt = option({
|
|
||||||
type = "toggle",
|
|
||||||
name = L["Interrupts"],
|
|
||||||
desc = L["Announces when enemies' spells are interrupted"],
|
|
||||||
order = 5,
|
|
||||||
}),
|
|
||||||
drinks = option({
|
drinks = option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Drinking"],
|
name = L["Drinking"],
|
||||||
desc = L["Announces when enemies sit down to drink"],
|
desc = L["Announces when enemies sit down to drink"],
|
||||||
order = 6,
|
order = 5,
|
||||||
}),
|
}),
|
||||||
resurrections = option({
|
resurrections = option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Resurrection"],
|
name = L["Resurrection"],
|
||||||
desc = L["Announces when an enemy tries to resurrect a teammate"],
|
desc = L["Announces when an enemy tries to resurrect a teammate"],
|
||||||
order = 7,
|
order = 6,
|
||||||
}),
|
}),
|
||||||
enemy = option({
|
enemy = option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["New enemies"],
|
name = L["New enemies"],
|
||||||
desc = L["Announces when new enemies are discovered"],
|
desc = L["Announces when new enemies are discovered"],
|
||||||
order = 8,
|
order = 7,
|
||||||
}),
|
}),
|
||||||
spec = option({
|
spec = option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Spec Detection"],
|
name = L["Spec Detection"],
|
||||||
desc = L["Announces when the spec of an enemy was detected"],
|
desc = L["Announces when the spec of an enemy was detected"],
|
||||||
order = 9,
|
order = 8,
|
||||||
}),
|
}),
|
||||||
health = option({
|
health = option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Low health"],
|
name = L["Low health"],
|
||||||
desc = L["Announces when an enemy drops below a certain health threshold"],
|
desc = L["Announces when an enemy drops below a certain health threshold"],
|
||||||
order = 10,
|
order = 9,
|
||||||
}),
|
}),
|
||||||
healthThreshold = option({
|
healthThreshold = option({
|
||||||
type = "range",
|
type = "range",
|
||||||
name = L["Low health threshold"],
|
name = L["Low health threshold"],
|
||||||
desc = L["Choose how low an enemy must be before low health is announced"],
|
desc = L["Choose how low an enemy must be before low health is announced"],
|
||||||
order = 11,
|
order = 10,
|
||||||
min = 1,
|
min = 1,
|
||||||
max = 100,
|
max = 100,
|
||||||
step = 1,
|
step = 1,
|
||||||
@ -314,7 +275,7 @@ function Announcements:GetOptions()
|
|||||||
type = "select",
|
type = "select",
|
||||||
name = L["Destination"],
|
name = L["Destination"],
|
||||||
desc = L["Choose how your announcements are displayed"],
|
desc = L["Choose how your announcements are displayed"],
|
||||||
order = 12,
|
order = 11,
|
||||||
values = destValues,
|
values = destValues,
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
|
@ -1,178 +1,157 @@
|
|||||||
local str_find, pairs = string.find, pairs
|
local select, floor, str_len, tostring, str_sub, str_find = select, math.floor, string.len, tostring, string.sub, string.find
|
||||||
local CreateFrame = CreateFrame
|
local IsInInstance = IsInInstance
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local ACDFrame = Gladdy:NewModule("Arena Countdown", nil, {
|
local ACDFrame = Gladdy:NewModule("Countdown", nil, {
|
||||||
countdown = true,
|
countdown = true,
|
||||||
arenaCountdownSize = 256,
|
arenaCountdownSize = 256
|
||||||
arenaCountdownFrameStrata = "HIGH",
|
|
||||||
arenaCountdownFrameLevel = 50,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
function ACDFrame:OnEvent(event, ...)
|
|
||||||
self[event](self, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
function ACDFrame:Initialize()
|
function ACDFrame:Initialize()
|
||||||
self.locale = Gladdy:GetArenaTimer()
|
self.hidden = false
|
||||||
self.countdown = -1
|
self.countdown = -1
|
||||||
self.texturePath = "Interface\\AddOns\\Gladdy\\Images\\Countdown\\";
|
self.texturePath = "Interface\\AddOns\\Gladdy\\Images\\Countdown\\";
|
||||||
|
ACDFrame:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
||||||
local ACDNumFrame = CreateFrame("Frame", "ACDNumFrame", UIParent)
|
ACDFrame:RegisterEvent("PLAYER_ENTERING_WORLD")
|
||||||
self.ACDNumFrame = ACDNumFrame
|
|
||||||
self.ACDNumFrame:EnableMouse(false)
|
|
||||||
self.ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumFrame:SetPoint("CENTER", 0, 128)
|
|
||||||
self.ACDNumFrame:Hide()
|
|
||||||
|
|
||||||
local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "OVERLAY")
|
|
||||||
self.ACDNumTens = ACDNumTens
|
|
||||||
self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
|
|
||||||
|
|
||||||
local ACDNumOnes = ACDNumFrame:CreateTexture("ACDNumOnes", "OVERLAY")
|
|
||||||
self.ACDNumOnes = ACDNumOnes
|
|
||||||
self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
|
|
||||||
|
|
||||||
local ACDNumOne = ACDNumFrame:CreateTexture("ACDNumOne", "OVERLAY")
|
|
||||||
self.ACDNumOne = ACDNumOne
|
|
||||||
self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumOne:SetPoint("CENTER", self.ACDNumFrame, "CENTER", 0, 0)
|
|
||||||
|
|
||||||
if Gladdy.db.countdown then
|
|
||||||
self:RegisterMessage("JOINED_ARENA")
|
|
||||||
self:RegisterMessage("ENEMY_SPOTTED")
|
|
||||||
self:RegisterMessage("UNIT_SPEC")
|
|
||||||
end
|
|
||||||
self.faction = UnitFactionGroup("player")
|
|
||||||
self:SetScript("OnEvent", ACDFrame.OnEvent)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function ACDFrame:UpdateFrameOnce()
|
function ACDFrame:OnEvent(event, ...)
|
||||||
if Gladdy.db.countdown then
|
-- functions created in "object:method"-style have an implicit first parameter of "self", which points to object
|
||||||
self:RegisterMessage("JOINED_ARENA")
|
self[event](self, ...) -- route event parameters to LoseControl:event methods
|
||||||
self:RegisterMessage("ENEMY_SPOTTED")
|
|
||||||
self:RegisterMessage("UNIT_SPEC")
|
|
||||||
else
|
|
||||||
self:UnregisterAllMessages()
|
|
||||||
end
|
|
||||||
self.ACDNumFrame:SetFrameStrata(Gladdy.db.arenaCountdownFrameStrata)
|
|
||||||
self.ACDNumFrame:SetFrameLevel(Gladdy.db.arenaCountdownFrameLevel)
|
|
||||||
|
|
||||||
self.ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumFrame:SetPoint("CENTER", 0, 128)
|
|
||||||
|
|
||||||
self.ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumTens:SetPoint("CENTER", self.ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
|
|
||||||
|
|
||||||
self.ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumOnes:SetPoint("CENTER", self.ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
|
|
||||||
|
|
||||||
self.ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize)
|
|
||||||
self.ACDNumOne:SetPoint("CENTER", self.ACDNumFrame, "CENTER", 0, 0)
|
|
||||||
end
|
end
|
||||||
|
ACDFrame:SetScript("OnEvent", ACDFrame.OnEvent)
|
||||||
|
|
||||||
function ACDFrame:HideAll()
|
|
||||||
self.ACDNumFrame:Hide()
|
|
||||||
self.ACDNumTens:Hide()
|
|
||||||
self.ACDNumOnes:Hide()
|
|
||||||
self.ACDNumOne:Hide()
|
|
||||||
end
|
|
||||||
|
|
||||||
function ACDFrame:CreateTicker(countdown)
|
local ACDNumFrame = CreateFrame("Frame", "ACDNumFrame", UIParent)
|
||||||
self.countdown = countdown
|
ACDNumFrame:SetHeight(256)
|
||||||
if self.ticker and not self.ticker:IsCancelled() then
|
ACDNumFrame:SetWidth(256)
|
||||||
self.ticker:Cancel()
|
ACDNumFrame:SetPoint("CENTER", 0, 128)
|
||||||
end
|
ACDNumFrame:Show()
|
||||||
self.ticker = C_Timer.NewTicker(1, ACDFrame.Ticker)
|
|
||||||
end
|
|
||||||
|
|
||||||
function ACDFrame.Ticker()
|
local ACDNumTens = ACDNumFrame:CreateTexture("ACDNumTens", "HIGH")
|
||||||
local self = ACDFrame
|
ACDNumTens:SetWidth(256)
|
||||||
if (Gladdy.db.countdown) then
|
ACDNumTens:SetHeight(128)
|
||||||
self.ACDNumFrame:Show()
|
ACDNumTens:SetPoint("CENTER", ACDNumFrame, "CENTER", -48, 0)
|
||||||
if (self.countdown and self.countdown >= 10 and self.countdown <= 60) then
|
|
||||||
|
local ACDNumOnes = ACDNumFrame:CreateTexture("ACDNumOnes", "HIGH")
|
||||||
|
ACDNumOnes:SetWidth(256)
|
||||||
|
ACDNumOnes:SetHeight(128)
|
||||||
|
ACDNumOnes:SetPoint("CENTER", ACDNumFrame, "CENTER", 48, 0)
|
||||||
|
|
||||||
|
local ACDNumOne = ACDNumFrame:CreateTexture("ACDNumOne", "HIGH")
|
||||||
|
ACDNumOne:SetWidth(256)
|
||||||
|
ACDNumOne:SetHeight(128)
|
||||||
|
ACDNumOne:SetPoint("CENTER", ACDNumFrame, "CENTER", 0, 0)
|
||||||
|
|
||||||
|
function ACDFrame:PLAYER_ENTERING_WORLD()
|
||||||
|
|
||||||
|
local instanceType = select(2, IsInInstance())
|
||||||
|
if (( instanceType == "arena" )) then
|
||||||
|
ACDFrame:SetScript("OnUpdate", function(self, elapse)
|
||||||
|
if (self.countdown > 0 and Gladdy.db.countdown) then
|
||||||
|
self.hidden = false;
|
||||||
|
|
||||||
|
if ((floor(self.countdown) ~= floor(self.countdown - elapse)) and (floor(self.countdown - elapse) >= 0)) then
|
||||||
|
local str = tostring(floor(self.countdown - elapse));
|
||||||
|
|
||||||
|
if (floor(self.countdown - elapse) == 0) then
|
||||||
|
ACDNumTens:Hide();
|
||||||
|
ACDNumOnes:Hide();
|
||||||
|
ACDNumOne:Hide();
|
||||||
|
elseif (str_len(str) == 2) then
|
||||||
-- Display has 2 digits
|
-- Display has 2 digits
|
||||||
local ones = self.countdown % 10
|
ACDNumOne:Hide();
|
||||||
local tens = (self.countdown / 10) % 10
|
ACDNumTens:Show();
|
||||||
self.ACDNumOne:Hide()
|
ACDNumOnes:Show();
|
||||||
self.ACDNumTens:Show()
|
|
||||||
self.ACDNumOnes:Show()
|
|
||||||
|
|
||||||
self.ACDNumTens:SetTexture(self.texturePath .. tens)
|
ACDNumTens:SetTexture(self.texturePath .. str_sub(str, 0, 1));
|
||||||
self.ACDNumOnes:SetTexture(self.texturePath .. ones)
|
ACDNumOnes:SetTexture(self.texturePath .. str_sub(str, 2, 2));
|
||||||
self.ACDNumFrame:SetScale(0.7)
|
ACDNumFrame:SetScale(0.7)
|
||||||
elseif (self.countdown and self.countdown < 10 and self.countdown > -1) then
|
elseif (str_len(str) == 1) then
|
||||||
-- Display has 1 digit
|
-- Display has 1 digit
|
||||||
local path = self.countdown <= 0 and self.faction or self.countdown
|
ACDNumOne:Show();
|
||||||
self.ACDNumOne:Show()
|
ACDNumOne:SetTexture(self.texturePath .. str_sub(str, 0, 1));
|
||||||
self.ACDNumOne:SetTexture(self.texturePath .. path)
|
ACDNumOnes:Hide();
|
||||||
self.ACDNumOnes:Hide()
|
ACDNumTens:Hide();
|
||||||
self.ACDNumTens:Hide()
|
ACDNumFrame:SetScale(1.0)
|
||||||
self.ACDNumFrame:SetScale(1.0)
|
end
|
||||||
|
end
|
||||||
|
self.countdown = self.countdown - elapse;
|
||||||
else
|
else
|
||||||
ACDFrame:HideAll()
|
self.hidden = true;
|
||||||
if (self.countdown and self.countdown < -1) then
|
ACDNumTens:Hide();
|
||||||
self.ticker:Cancel()
|
ACDNumOnes:Hide();
|
||||||
|
ACDNumOne:Hide();
|
||||||
end
|
end
|
||||||
end
|
|
||||||
self.countdown = self.countdown and self.countdown - 1
|
|
||||||
else
|
|
||||||
ACDFrame:HideAll()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function ACDFrame:JOINED_ARENA()
|
end)
|
||||||
if Gladdy.db.countdown then
|
|
||||||
self:CreateTicker(nil)
|
|
||||||
self:RegisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function ACDFrame:Reset()
|
|
||||||
if self.ticker and not self.ticker:IsCancelled() then
|
|
||||||
self.ticker:Cancel()
|
|
||||||
end
|
|
||||||
self.countdown = nil
|
|
||||||
self:UnregisterEvent("CHAT_MSG_BG_SYSTEM_NEUTRAL")
|
|
||||||
ACDFrame:HideAll()
|
|
||||||
end
|
|
||||||
|
|
||||||
function ACDFrame:ENEMY_SPOTTED()
|
|
||||||
if not Gladdy.frame.testing then
|
|
||||||
ACDFrame:Reset()
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function ACDFrame:UNIT_SPEC()
|
|
||||||
if not Gladdy.frame.testing then
|
|
||||||
ACDFrame:Reset()
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ACDFrame:CHAT_MSG_BG_SYSTEM_NEUTRAL(msg)
|
function ACDFrame:CHAT_MSG_BG_SYSTEM_NEUTRAL(msg)
|
||||||
for k,v in pairs(self.locale) do
|
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 60 secondes !")) then
|
||||||
if str_find(msg, v) then
|
self.countdown = 61
|
||||||
if self.countdown and self.countdown == 0 then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self.countdown = k
|
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 30 secondes !")) then
|
||||||
|
self.countdown = 31
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 15 secondes !")) then
|
||||||
|
self.countdown = 16
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if (str_find(msg, "L'ar\195\168ne ouvre ses portes dans 10 secondes !")) then
|
||||||
|
self.countdown = 11
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if (str_find(msg, "One minute until the Arena battle begins!")) then
|
||||||
|
self.countdown = 61
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if (str_find(msg, "Thirty seconds until the Arena battle begins!")) then
|
||||||
|
self.countdown = 31
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if (str_find(msg, "Fifteen seconds until the Arena battle begins!")) then
|
||||||
|
self.countdown = 16
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if (str_find(msg, "Ten seconds until the Arena battle begins!")) then
|
||||||
|
self.countdown = 10
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if (str_find(msg, "The Arena battle has begun!")) then
|
||||||
|
ACDFrame:SetScript("OnUpdate", nil)
|
||||||
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function ACDFrame:TestOnce()
|
function ACDFrame:UpdateFrame()
|
||||||
self:CreateTicker(30)
|
ACDNumFrame:SetHeight(Gladdy.db.arenaCountdownSize)
|
||||||
|
ACDNumFrame:SetWidth(Gladdy.db.arenaCountdownSize)
|
||||||
|
ACDNumFrame:SetPoint("CENTER", 0, 128)
|
||||||
|
|
||||||
|
ACDNumTens:SetWidth(Gladdy.db.arenaCountdownSize)
|
||||||
|
ACDNumTens:SetHeight(Gladdy.db.arenaCountdownSize/2)
|
||||||
|
ACDNumTens:SetPoint("CENTER", ACDNumFrame, "CENTER", -(Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
|
||||||
|
|
||||||
|
ACDNumOnes:SetWidth(Gladdy.db.arenaCountdownSize)
|
||||||
|
ACDNumOnes:SetHeight(Gladdy.db.arenaCountdownSize/2)
|
||||||
|
ACDNumOnes:SetPoint("CENTER", ACDNumFrame, "CENTER", (Gladdy.db.arenaCountdownSize/8 + Gladdy.db.arenaCountdownSize/8/2), 0)
|
||||||
|
|
||||||
|
ACDNumOne:SetWidth(Gladdy.db.arenaCountdownSize)
|
||||||
|
ACDNumOne:SetHeight(Gladdy.db.arenaCountdownSize/2)
|
||||||
|
ACDNumOne:SetPoint("CENTER", ACDNumFrame, "CENTER", 0, 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
function ACDFrame:Test()
|
||||||
|
self.countdown = 30
|
||||||
|
end
|
||||||
|
|
||||||
|
function ACDFrame:Reset()
|
||||||
|
self.countdown = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
function ACDFrame:GetOptions()
|
function ACDFrame:GetOptions()
|
||||||
@ -184,7 +163,7 @@ function ACDFrame:GetOptions()
|
|||||||
},
|
},
|
||||||
countdown = Gladdy:option({
|
countdown = Gladdy:option({
|
||||||
type = "toggle",
|
type = "toggle",
|
||||||
name = L["Enabled"],
|
name = L["Turn on/off"],
|
||||||
desc = L["Turns countdown before the start of an arena match on/off."],
|
desc = L["Turns countdown before the start of an arena match on/off."],
|
||||||
order = 3,
|
order = 3,
|
||||||
width = "full",
|
width = "full",
|
||||||
@ -196,31 +175,6 @@ function ACDFrame:GetOptions()
|
|||||||
min = 64,
|
min = 64,
|
||||||
max = 512,
|
max = 512,
|
||||||
step = 16,
|
step = 16,
|
||||||
width = "full",
|
|
||||||
disabled = function() return not Gladdy.db.countdown end,
|
|
||||||
}),
|
|
||||||
headerAuraLevel = {
|
|
||||||
type = "header",
|
|
||||||
name = L["Frame Strata and Level"],
|
|
||||||
order = 5,
|
|
||||||
},
|
|
||||||
arenaCountdownFrameStrata = Gladdy:option({
|
|
||||||
type = "select",
|
|
||||||
name = L["Frame Strata"],
|
|
||||||
order = 6,
|
|
||||||
values = Gladdy.frameStrata,
|
|
||||||
sorting = Gladdy.frameStrataSorting,
|
|
||||||
disabled = function() return not Gladdy.db.countdown end,
|
|
||||||
}),
|
|
||||||
arenaCountdownFrameLevel = Gladdy:option({
|
|
||||||
type = "range",
|
|
||||||
name = L["Frame Level"],
|
|
||||||
min = 0,
|
|
||||||
max = 500,
|
|
||||||
step = 1,
|
|
||||||
order = 7,
|
|
||||||
width = "full",
|
|
||||||
disabled = function() return not Gladdy.db.countdown end,
|
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
1242
Modules/Auras.lua
1242
Modules/Auras.lua
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user