testmode random Auras + Interrupts only with enabled Auras + Interrupts
This commit is contained in:
parent
0d5b5644a9
commit
74753e327c
@ -167,7 +167,7 @@ function EventListener:ARENA_OPPONENT_UPDATE(unit, updateReason)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB
|
Gladdy.exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB
|
||||||
[31117] = GetSpellInfo(30405) .. " Silence", -- Unstable Affliction Silence
|
[31117] = GetSpellInfo(30405) .. " Silence", -- Unstable Affliction Silence
|
||||||
[43523] = GetSpellInfo(30405) .. " Silence",
|
[43523] = GetSpellInfo(30405) .. " Silence",
|
||||||
[24131] = select(1, GetSpellInfo(19386)) .. " Dot", -- Wyvern Sting Dot
|
[24131] = select(1, GetSpellInfo(19386)) .. " Dot", -- Wyvern Sting Dot
|
||||||
@ -207,8 +207,8 @@ function EventListener:UNIT_AURA(unit)
|
|||||||
Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName])
|
Gladdy:DetectSpec(unit, Gladdy.specBuffs[spellName])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if exceptionNames[spellID] then
|
if Gladdy.exceptionNames[spellID] then
|
||||||
spellName = exceptionNames[spellID]
|
spellName = Gladdy.exceptionNames[spellID]
|
||||||
end
|
end
|
||||||
Gladdy:SendMessage("AURA_GAIN", unit, auraType, spellID, spellName, texture, duration, expirationTime, count, debuffType, i)
|
Gladdy:SendMessage("AURA_GAIN", unit, auraType, spellID, spellName, texture, duration, expirationTime, count, debuffType, i)
|
||||||
Gladdy:Call("Announcements", "CheckDrink", unit, spellName)
|
Gladdy:Call("Announcements", "CheckDrink", unit, spellName)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
local pairs, ipairs, select, tinsert, tbl_sort, tostring = pairs, ipairs, select, tinsert, table.sort, tostring
|
local pairs, ipairs, select, tinsert, tbl_sort, tostring, tonumber, rand = pairs, ipairs, select, tinsert, table.sort, tostring, tonumber, math.random
|
||||||
|
|
||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local CreateFrame, GetTime = CreateFrame, GetTime
|
local CreateFrame, GetTime = CreateFrame, GetTime
|
||||||
@ -266,28 +266,63 @@ function Auras:ResetUnit(unit)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Auras:Test(unit)
|
function Auras:Test(unit)
|
||||||
local spellName, _, icon
|
local spellName, spellid, icon, limit, i
|
||||||
|
|
||||||
if (unit == "arena1") then
|
self:AURA_FADE(unit, AURA_TYPE_BUFF)
|
||||||
spellName, _, icon = GetSpellInfo(7922)
|
self:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
||||||
self:AURA_FADE(unit, AURA_TYPE_BUFF)
|
|
||||||
self:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
--Auras
|
||||||
self:AURA_GAIN(unit,AURA_TYPE_DEBUFF, 7922, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
local enabledAuras = 0
|
||||||
self:SPELL_INTERRUPT(unit,19244, select(1, GetSpellInfo(19244)), "physical", 25396, select(1, GetSpellInfo(25396)), 64)
|
for _,value in pairs(Gladdy.db.auraListDefault) do
|
||||||
elseif (unit == "arena2") then
|
if value.enabled then
|
||||||
spellName = select(1, GetSpellInfo(27010)) .. " " .. select(1, GetSpellInfo(16689))
|
enabledAuras = enabledAuras + 1
|
||||||
_, _, icon = GetSpellInfo(27010)
|
end
|
||||||
self:AURA_FADE(unit, AURA_TYPE_BUFF)
|
end
|
||||||
self:AURA_FADE(unit,AURA_TYPE_DEBUFF)
|
if enabledAuras > 0 then
|
||||||
self:AURA_GAIN(unit,AURA_TYPE_DEBUFF, 27010, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
limit, i = rand(1, enabledAuras), 1
|
||||||
self:SPELL_INTERRUPT(unit,19244, select(1, GetSpellInfo(19244)), "physical", 25396, select(1, GetSpellInfo(25396)), 64)
|
for spellIdStr,value in pairs(Gladdy.db.auraListDefault) do
|
||||||
elseif (unit == "arena3") then
|
if i > limit then break end
|
||||||
spellName, _, icon = GetSpellInfo(34709)
|
if value.enabled then
|
||||||
self:AURA_FADE(unit, AURA_TYPE_BUFF)
|
spellid = tonumber(spellIdStr)
|
||||||
self:AURA_GAIN(unit,AURA_TYPE_BUFF, 34709, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
spellName = select(1, GetSpellInfo(tonumber(spellIdStr)))
|
||||||
spellName, _, icon = GetSpellInfo(18425)
|
icon = select(3, GetSpellInfo(tonumber(spellIdStr)))
|
||||||
--self:AURA_FADE(unit, AURA_TYPE_DEBUFF)
|
if Gladdy.exceptionNames[spellid] then
|
||||||
--self:AURA_GAIN(unit,AURA_TYPE_DEBUFF, 18425, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
spellName = Gladdy.exceptionNames[spellid]
|
||||||
|
end
|
||||||
|
self:AURA_GAIN(unit,value.track, spellid, spellName, icon, self.auras[spellName].duration, GetTime() + self.auras[spellName].duration)
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--Interrupts
|
||||||
|
local spellSchools = {}
|
||||||
|
for k,_ in pairs(Gladdy:GetSpellSchoolColors()) do
|
||||||
|
tinsert(spellSchools, k)
|
||||||
|
end
|
||||||
|
enabledAuras = 0
|
||||||
|
for _, value in pairs(Gladdy.db.auraListInterrupts) do
|
||||||
|
if value.enabled then
|
||||||
|
enabledAuras = enabledAuras + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if enabledAuras > 0 then
|
||||||
|
limit, i = rand(1, enabledAuras), 1
|
||||||
|
local extraSpellSchool
|
||||||
|
for spellIdStr, value in pairs(Gladdy.db.auraListInterrupts) do
|
||||||
|
if i > limit then break end
|
||||||
|
if value.enabled then
|
||||||
|
enabledAuras = enabledAuras + 1
|
||||||
|
end
|
||||||
|
spellid = tonumber(spellIdStr)
|
||||||
|
if (unit == "arena1" or unit == "arena2") then
|
||||||
|
extraSpellSchool = spellSchools[rand(1, #spellSchools)]
|
||||||
|
spellName = select(1, GetSpellInfo(spellid))
|
||||||
|
Gladdy:Print(spellName, extraSpellSchool)
|
||||||
|
self:SPELL_INTERRUPT(unit,spellid, spellName, "physical", spellid, spellName, extraSpellSchool)
|
||||||
|
end
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
local select = select
|
local select = select
|
||||||
local pairs,ipairs,tbl_sort,tinsert,format = pairs,ipairs,table.sort,tinsert,format
|
local pairs,ipairs,tbl_sort,tinsert,format,rand = pairs,ipairs,table.sort,tinsert,format,math.random
|
||||||
|
|
||||||
local GetSpellInfo = GetSpellInfo
|
local GetSpellInfo = GetSpellInfo
|
||||||
local CreateFrame = CreateFrame
|
local CreateFrame = CreateFrame
|
||||||
@ -261,7 +261,7 @@ function Diminishings:Test(unit)
|
|||||||
for spellID,category in pairs(DRData:GetSpells()) do
|
for spellID,category in pairs(DRData:GetSpells()) do
|
||||||
if Gladdy.db.drCategories[category].enabled then
|
if Gladdy.db.drCategories[category].enabled then
|
||||||
if not limit[category] then
|
if not limit[category] then
|
||||||
limit[category] = { count = 1, limit = math.random(1,3) }
|
limit[category] = { count = 1, limit = rand(1,3) }
|
||||||
else
|
else
|
||||||
limit[category].count = limit[category].count + 1
|
limit[category].count = limit[category].count + 1
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user