perception cd tracking improved (rogue out of stealth)
This commit is contained in:
parent
874d8471e8
commit
89a5511fb9
@ -86,6 +86,9 @@ function Gladdy:SpotEnemy(unit, auraScan)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if Gladdy.cooldownBuffs.racials[spellName] then
|
||||||
|
Gladdy:SendMessage("RACIAL_USED", unit, expirationTime, spellName)
|
||||||
|
end
|
||||||
if Gladdy.specBuffs[spellName] then -- Check for auras that detect a spec
|
if Gladdy.specBuffs[spellName] 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
|
||||||
@ -216,6 +219,9 @@ Gladdy.exceptionNames = { -- TODO MOVE ME TO CLASSBUFFS LIB
|
|||||||
|
|
||||||
Gladdy.cooldownBuffs = {
|
Gladdy.cooldownBuffs = {
|
||||||
[GetSpellInfo(6346)] = { cd = 180, spellId = 6346 }, -- Fear Ward
|
[GetSpellInfo(6346)] = { cd = 180, spellId = 6346 }, -- Fear Ward
|
||||||
|
racials = {
|
||||||
|
[GetSpellInfo(20600)] = { cd = 180, spellId = 20600 }, -- Perception
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function EventListener:UNIT_AURA(unit)
|
function EventListener:UNIT_AURA(unit)
|
||||||
@ -243,6 +249,9 @@ function EventListener:UNIT_AURA(unit)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
if Gladdy.cooldownBuffs.racials[spellName] then
|
||||||
|
Gladdy:SendMessage("RACIAL_USED", unit, spellName, expirationTime, spellName)
|
||||||
|
end
|
||||||
if not button.spec and Gladdy.specBuffs[spellName] then
|
if not button.spec and Gladdy.specBuffs[spellName] 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 unitCaster and (UnitIsUnit(unit, unitCaster) or UnitIsUnit(unitPet, unitCaster)) then
|
||||||
|
@ -165,13 +165,17 @@ function Racial:JOINED_ARENA()
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Racial:RACIAL_USED(unit)
|
function Racial:RACIAL_USED(unit, expirationTime, spellName)
|
||||||
local racial = self.frames[unit]
|
local racial = self.frames[unit]
|
||||||
local button = Gladdy.buttons[unit]
|
local button = Gladdy.buttons[unit]
|
||||||
if (not racial or not button or not button.race) then
|
if (not racial or not button or not button.race) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
Racial:Used(unit, GetTime(), Gladdy:Racials()[button.race].duration)
|
if expirationTime and Gladdy:Racials()[button.race].spellName ~= spellName then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local startTime = (expirationTime and expirationTime - Gladdy:Racials()[button.race].duration) or GetTime()
|
||||||
|
Racial:Used(unit, startTime, Gladdy:Racials()[button.race].duration)
|
||||||
end
|
end
|
||||||
|
|
||||||
function Racial:Used(unit, startTime, duration)
|
function Racial:Used(unit, startTime, duration)
|
||||||
|
Loading…
Reference in New Issue
Block a user