v1.06-Beta hotfix BuffDebuff module
This commit is contained in:
parent
57036a77c1
commit
cddea2e094
@ -25,7 +25,7 @@ local MAJOR, MINOR = "Gladdy", 4
|
|||||||
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
|
local Gladdy = LibStub:NewLibrary(MAJOR, MINOR)
|
||||||
local L
|
local L
|
||||||
Gladdy.version_major_num = 1
|
Gladdy.version_major_num = 1
|
||||||
Gladdy.version_minor_num = 0.05
|
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.beta
|
Gladdy.version_releaseType = RELEASE_TYPES.beta
|
||||||
Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType
|
Gladdy.version = PREFIX .. Gladdy.version_num .. "-" .. Gladdy.version_releaseType
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
## Interface: 20501
|
## Interface: 20501
|
||||||
## Title: Gladdy - TBC
|
## Title: Gladdy - TBC
|
||||||
## Version: 1.0.5-Beta
|
## Version: 1.06-Beta
|
||||||
## Notes: The most powerful arena AddOn for WoW 2.5.1
|
## Notes: The most powerful arena AddOn for WoW 2.5.1
|
||||||
## Author: XiconQoo, DnB_Junkee, Knall
|
## Author: XiconQoo, DnB_Junkee, Knall
|
||||||
## X-Email: contact me on discord Knall#1751
|
## X-Email: contact me on discord Knall#1751
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local type, ipairs, pairs, tinsert = type, ipairs, pairs, tinsert
|
local type, ipairs, pairs, tinsert = type, ipairs, pairs, tinsert
|
||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
|
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||||
|
|
||||||
local LibClassAuras = LibStub:NewLibrary("LibClassAuras-1.0", 1)
|
local LibClassAuras = LibStub:NewLibrary("LibClassAuras-1.0", 1)
|
||||||
LibClassAuras.debuffs = {}
|
LibClassAuras.debuffs = {}
|
||||||
@ -72,3 +73,13 @@ local function getClassBuffs(class)
|
|||||||
return classSpells
|
return classSpells
|
||||||
end
|
end
|
||||||
LibClassAuras.GetClassBuffs = getClassBuffs
|
LibClassAuras.GetClassBuffs = getClassBuffs
|
||||||
|
|
||||||
|
local function getSpellNameToId(auraType)
|
||||||
|
if auraType == AURA_TYPE_DEBUFF then
|
||||||
|
return LibClassAuras.debuffToId
|
||||||
|
else
|
||||||
|
return LibClassAuras.buffToId
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
LibClassAuras.GetSpellNameToId = getSpellNameToId
|
@ -1,7 +1,7 @@
|
|||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
local GetTime = GetTime
|
local GetTime = GetTime
|
||||||
local select, lower, ceil, tremove, tinsert, pairs, ipairs = select, string.lower, ceil, tremove, tinsert, pairs, ipairs
|
local select, lower, ceil, tremove, tinsert, pairs, ipairs, tostring = select, string.lower, ceil, tremove, tinsert, pairs, ipairs, tostring
|
||||||
local auraTypeColor = { }
|
local auraTypeColor = { }
|
||||||
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||||
local auraTypes = {AURA_TYPE_BUFF, AURA_TYPE_DEBUFF}
|
local auraTypes = {AURA_TYPE_BUFF, AURA_TYPE_DEBUFF}
|
||||||
@ -21,9 +21,10 @@ auraTypeColor[""] = auraTypeColor["none"]
|
|||||||
---------------------------
|
---------------------------
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
|
local LibClassAuras = LibStub("LibClassAuras-1.0")
|
||||||
local L = Gladdy.L
|
local L = Gladdy.L
|
||||||
local defaultTrackedDebuffs = select(2, Gladdy:GetAuras("debuff"))
|
local defaultTrackedDebuffs = select(2, Gladdy:GetAuras(AURA_TYPE_DEBUFF))
|
||||||
local defaultTrackedBuffs = select(2, Gladdy:GetAuras("buff"))
|
local defaultTrackedBuffs = select(2, Gladdy:GetAuras(AURA_TYPE_BUFF))
|
||||||
local BuffsDebuffs = Gladdy:NewModule("BuffsDebuffs", nil, {
|
local BuffsDebuffs = Gladdy:NewModule("BuffsDebuffs", nil, {
|
||||||
buffsEnabled = true,
|
buffsEnabled = true,
|
||||||
buffsShowAuraDebuffs = false,
|
buffsShowAuraDebuffs = false,
|
||||||
@ -145,18 +146,23 @@ end
|
|||||||
function BuffsDebuffs:Test(unit)
|
function BuffsDebuffs:Test(unit)
|
||||||
if Gladdy.db.buffsEnabled then
|
if Gladdy.db.buffsEnabled then
|
||||||
if unit == "arena1" or unit == "arena3" then
|
if unit == "arena1" or unit == "arena3" then
|
||||||
self:AddOrRefreshAura(unit, 1943, AURA_TYPE_DEBUFF, 10, 10, 1,"physical", select(3, GetSpellInfo(1943)), 1)
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
self:AddOrRefreshAura(unit, 18647, AURA_TYPE_DEBUFF, 10, 10,1, "immune", select(3, GetSpellInfo(18647)), 2)
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
self:AddOrRefreshAura(unit, 27218, AURA_TYPE_DEBUFF, 24, 20,1, "curse", select(3, GetSpellInfo(27218)), 3)
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_DEBUFF, 1943, select(1, GetSpellInfo(1943)), select(3, GetSpellInfo(1943)), 10, GetTime() + 10, 1, "physical")
|
||||||
self:AddOrRefreshAura(unit, 27216, AURA_TYPE_DEBUFF, 18, 18,1, "magic", select(3, GetSpellInfo(27216)), 4)
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_DEBUFF, 18647, select(1, GetSpellInfo(18647)), select(3, GetSpellInfo(18647)), 10, GetTime() + 10, 1, "immune")
|
||||||
self:AddOrRefreshAura(unit, 27189, AURA_TYPE_DEBUFF, 12, 12,5, "poison", select(3, GetSpellInfo(27189)), 5)
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_DEBUFF, 27218, select(1, GetSpellInfo(27218)), select(3, GetSpellInfo(27218)), 24, GetTime() + 20, 1, "curse")
|
||||||
self:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 20, 20,5, "magic", select(3, GetSpellInfo(32999)), 1)
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_DEBUFF, 27216, select(1, GetSpellInfo(27216)), select(3, GetSpellInfo(27216)), 18, GetTime() + 18, 1, "magic")
|
||||||
self:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 20, 20,5, "magic", select(3, GetSpellInfo(25389)), 2)
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_DEBUFF, 27189, select(1, GetSpellInfo(27189)), select(3, GetSpellInfo(27189)), 12, GetTime() + 12, 5, "poison")
|
||||||
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_BUFF, 33076, select(1, GetSpellInfo(33076)), select(3, GetSpellInfo(33076)), 20, GetTime() + 20, 1, "magic")
|
||||||
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_BUFF, 26980, select(1, GetSpellInfo(26980)), select(3, GetSpellInfo(26980)), 20, GetTime() + 20, 5, "magic")
|
||||||
elseif unit == "arena2" then
|
elseif unit == "arena2" then
|
||||||
self:AddOrRefreshAura(unit, 1943, AURA_TYPE_DEBUFF, 10, 10, 1, "physical", select(3, GetSpellInfo(1943)), 1)
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
self:AddOrRefreshAura(unit, 1, AURA_TYPE_DEBUFF, 20, 20,5, "poison", select(3, GetSpellInfo(1)), 2)
|
BuffsDebuffs:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
self:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 20, 20,5, "magic", select(3, GetSpellInfo(32999)), 1)
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_DEBUFF, 1943, select(1, GetSpellInfo(1943)), select(3, GetSpellInfo(1943)), 10, GetTime() + 10, 1, "physical")
|
||||||
self:AddOrRefreshAura(unit, 1, AURA_TYPE_BUFF, 20, 20,5, "magic", select(3, GetSpellInfo(25389)), 2)
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_DEBUFF, 1, select(1, GetSpellInfo(1)), select(3, GetSpellInfo(1)), 20, GetTime() + 20, 5, "poison")
|
||||||
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_BUFF, 27009, select(1, GetSpellInfo(27009)), select(3, GetSpellInfo(27009)), 20, GetTime() + 15, 1, "magic")
|
||||||
|
BuffsDebuffs:AURA_GAIN(unit, AURA_TYPE_BUFF, 11426, select(1, GetSpellInfo(11426)), select(3, GetSpellInfo(11426)), 10, GetTime() + 10, 1, "magic")
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -196,11 +202,13 @@ function BuffsDebuffs:AURA_GAIN(unit, auraType, spellID, spellName, texture, dur
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
local auraFrame = self.frames[unit]
|
local auraFrame = self.frames[unit]
|
||||||
local aura = Gladdy.db.auraListDefault[spellName] and Gladdy.db.auraListDefault[spellName].enabled
|
local aura = Gladdy:GetImportantAuras()[spellName] and Gladdy.db.auraListDefault[tostring(Gladdy:GetImportantAuras()[spellName].spellID)].enabled
|
||||||
if aura and Gladdy.db.buffsShowAuraDebuffs then
|
if aura and Gladdy.db.buffsShowAuraDebuffs then
|
||||||
aura = false
|
aura = false
|
||||||
end
|
end
|
||||||
if not aura and spellID and expirationTime and (Gladdy.db.trackedBuffs[spellName] or Gladdy.db.trackedDebuffs[spellName]) then
|
local auraNames = LibClassAuras.GetSpellNameToId(auraType)
|
||||||
|
local spellId = auraNames[spellName] and auraNames[spellName].id[1]
|
||||||
|
if not aura and spellID and spellId and expirationTime and (Gladdy.db.trackedBuffs[tostring(spellId)] or Gladdy.db.trackedDebuffs[tostring(spellId)]) then
|
||||||
local index
|
local index
|
||||||
if auraType == AURA_TYPE_DEBUFF then
|
if auraType == AURA_TYPE_DEBUFF then
|
||||||
auraFrame.numDebuffs = auraFrame.numDebuffs + 1
|
auraFrame.numDebuffs = auraFrame.numDebuffs + 1
|
||||||
@ -459,10 +467,6 @@ function BuffsDebuffs:UpdateAurasOnUnit(unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function BuffsDebuffs:UNIT_DEATH(destUnit)
|
|
||||||
self:RemoveAuras(destUnit)
|
|
||||||
end
|
|
||||||
|
|
||||||
local function iconTimer(auraFrame, elapsed)
|
local function iconTimer(auraFrame, elapsed)
|
||||||
if auraFrame.endtime ~= "undefined" then
|
if auraFrame.endtime ~= "undefined" then
|
||||||
local timeLeftMilliSec = auraFrame.endtime - GetTime()
|
local timeLeftMilliSec = auraFrame.endtime - GetTime()
|
||||||
@ -1021,7 +1025,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
type = "group",
|
type = "group",
|
||||||
order = 11,
|
order = 11,
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
args = select(1, Gladdy:GetAuras("debuff")),
|
args = select(1, Gladdy:GetAuras(AURA_TYPE_DEBUFF)),
|
||||||
set = function(info, state)
|
set = function(info, state)
|
||||||
local optionKey = info[#info]
|
local optionKey = info[#info]
|
||||||
Gladdy.dbi.profile.trackedDebuffs[optionKey] = state
|
Gladdy.dbi.profile.trackedDebuffs[optionKey] = state
|
||||||
@ -1036,7 +1040,7 @@ function BuffsDebuffs:GetOptions()
|
|||||||
type = "group",
|
type = "group",
|
||||||
order = 12,
|
order = 12,
|
||||||
childGroups = "tree",
|
childGroups = "tree",
|
||||||
args = select(1, Gladdy:GetAuras("buffs")),
|
args = select(1, Gladdy:GetAuras(AURA_TYPE_BUFF)),
|
||||||
set = function(info, state)
|
set = function(info, state)
|
||||||
local optionKey = info[#info]
|
local optionKey = info[#info]
|
||||||
Gladdy.dbi.profile.trackedBuffs[optionKey] = state
|
Gladdy.dbi.profile.trackedBuffs[optionKey] = state
|
||||||
|
@ -194,7 +194,7 @@ function Racial:ResetUnit(unit)
|
|||||||
if (not racial) then
|
if (not racial) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
racial.texture:SetTexture(nil)
|
||||||
racial.timeLeft = nil
|
racial.timeLeft = nil
|
||||||
racial.active = false
|
racial.active = false
|
||||||
racial.cooldown:Clear()
|
racial.cooldown:Clear()
|
||||||
|
28
Options.lua
28
Options.lua
@ -4,6 +4,7 @@ local InterfaceOptionsFrame_OpenToFrame = InterfaceOptionsFrame_OpenToFrame
|
|||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
|
local LOCALIZED_CLASS_NAMES_MALE = LOCALIZED_CLASS_NAMES_MALE
|
||||||
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
local CLASS_ICON_TCOORDS = CLASS_ICON_TCOORDS
|
||||||
|
local AURA_TYPE_DEBUFF, AURA_TYPE_BUFF = AURA_TYPE_DEBUFF, AURA_TYPE_BUFF
|
||||||
|
|
||||||
local Gladdy = LibStub("Gladdy")
|
local Gladdy = LibStub("Gladdy")
|
||||||
local LibClassAuras = LibStub("LibClassAuras-1.0")
|
local LibClassAuras = LibStub("LibClassAuras-1.0")
|
||||||
@ -597,8 +598,14 @@ function Gladdy:GetAuras(auraType)
|
|||||||
name = "Check All",
|
name = "Check All",
|
||||||
type = "execute",
|
type = "execute",
|
||||||
func = function(info)
|
func = function(info)
|
||||||
for k,v in pairs(Gladdy.dbi.profile.trackedDebuffs) do
|
if auraType == AURA_TYPE_DEBUFF then
|
||||||
Gladdy.dbi.profile.trackedDebuffs[k] = true
|
for k,v in pairs(Gladdy.defaults.profile.trackedDebuffs) do
|
||||||
|
Gladdy.dbi.profile.trackedDebuffs[k] = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for k,v in pairs(Gladdy.defaults.profile.trackedBuffs) do
|
||||||
|
Gladdy.dbi.profile.trackedBuffs[k] = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -608,8 +615,14 @@ function Gladdy:GetAuras(auraType)
|
|||||||
name = "Uncheck All",
|
name = "Uncheck All",
|
||||||
type = "execute",
|
type = "execute",
|
||||||
func = function(info)
|
func = function(info)
|
||||||
for k,v in pairs(Gladdy.dbi.profile.trackedDebuffs) do
|
if auraType == AURA_TYPE_DEBUFF then
|
||||||
Gladdy.dbi.profile.trackedDebuffs[k] = false
|
for k,v in pairs(Gladdy.defaults.profile.trackedDebuffs) do
|
||||||
|
Gladdy.dbi.profile.trackedDebuffs[k] = false
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for k,v in pairs(Gladdy.defaults.profile.trackedBuffs) do
|
||||||
|
Gladdy.dbi.profile.trackedBuffs[k] = false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -689,13 +702,12 @@ function Gladdy:GetAuras(auraType)
|
|||||||
local defaultDebuffs = {}
|
local defaultDebuffs = {}
|
||||||
local assignForClass = function(class)
|
local assignForClass = function(class)
|
||||||
local args = {}
|
local args = {}
|
||||||
local classSpells = auraType == "debuff" and LibClassAuras.GetClassDebuffs(class) or LibClassAuras.GetClassBuffs(class)
|
local classSpells = auraType == AURA_TYPE_DEBUFF and LibClassAuras.GetClassDebuffs(class) or LibClassAuras.GetClassBuffs(class)
|
||||||
table.sort(classSpells, function(a, b)
|
table.sort(classSpells, function(a, b)
|
||||||
return a.name:upper() < b.name:upper()
|
return a.name:upper() < b.name:upper()
|
||||||
end)
|
end)
|
||||||
for i=1, #classSpells do
|
for i=1, #classSpells do
|
||||||
local spellName, _, texture = GetSpellInfo(classSpells[i].id[#classSpells[i].id])
|
local _, _, texture = GetSpellInfo(classSpells[i].id[#classSpells[i].id])
|
||||||
--spellName = (classSpells[i].id[#classSpells[i].id] == 31117 or classSpells[i].id[#classSpells[i].id] == 43523) and "Unstable Affliction Silence" or spellName
|
|
||||||
if classSpells[i].texture then
|
if classSpells[i].texture then
|
||||||
texture = classSpells[i].texture
|
texture = classSpells[i].texture
|
||||||
end
|
end
|
||||||
@ -705,7 +717,7 @@ function Gladdy:GetAuras(auraType)
|
|||||||
type = "toggle",
|
type = "toggle",
|
||||||
image = texture,
|
image = texture,
|
||||||
width = "2",
|
width = "2",
|
||||||
arg = classSpells[i].name
|
arg = tostring(classSpells[i].id[1])
|
||||||
}
|
}
|
||||||
defaultDebuffs[tostring(classSpells[i].id[1])] = true
|
defaultDebuffs[tostring(classSpells[i].id[1])] = true
|
||||||
end
|
end
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Gladdy - TBC
|
# Gladdy - TBC
|
||||||
|
|
||||||
### The most powerful arena addon for WoW TBC 2.5.1
|
### The most powerful arena addon for WoW TBC 2.5.1
|
||||||
## [v1.0.5-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.0.5-Beta/Gladdy_TBC-Classic_v1.0.5-Beta.zip)
|
## [v1.06-Beta Download Here](https://github.com/XiconQoo/Gladdy-TBC/releases/download/v1.06-Beta/Gladdy_TBC-Classic_v1.06-Beta.zip)
|
||||||
|
|
||||||
###### <a target="_blank" rel="noopener noreferrer" href="https://www.paypal.me/xiconqoo/10"><img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/Paypal-Donate.png" height="30" style="margin-top:-30px;position:relative;top:20px;"></a> Please consider donating if you like my work
|
###### <a target="_blank" rel="noopener noreferrer" href="https://www.paypal.me/xiconqoo/10"><img src="https://raw.githubusercontent.com/XiconQoo/Gladdy/readme-media/Paypal-Donate.png" height="30" style="margin-top:-30px;position:relative;top:20px;"></a> Please consider donating if you like my work
|
||||||
|
|
||||||
@ -35,6 +35,11 @@ The goal is to make Gladdy highly configurable in it's appearance. Everything ca
|
|||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|
||||||
|
#### v1.06-Beta
|
||||||
|
- fixed BuffsDebuff module
|
||||||
|
- fix racial texture reset
|
||||||
|
- minor bugfixes
|
||||||
|
|
||||||
#### v1.0.5-Beta
|
#### v1.0.5-Beta
|
||||||
- fixed Aura-Module
|
- fixed Aura-Module
|
||||||
- Racial module added to EventListener and Version check updated
|
- Racial module added to EventListener and Version check updated
|
||||||
|
Loading…
Reference in New Issue
Block a user