cooldown tracking with UNIT_SPELLCAST_SUCCEEDED

This commit is contained in:
Sumsebrum 2022-08-17 22:42:05 +02:00
parent e4cc5568ce
commit 3b285efa9e

View File

@ -167,7 +167,7 @@ function EventListener:COMBAT_LOG_EVENT_UNFILTERED()
if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman)
spellId = spellID
end
if Gladdy.db.cooldownCooldowns[tostring(spellId)] and (eventType == "SPELL_CAST_SUCCESS" or eventType == "SPELL_MISSED") then
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
unitClass = Gladdy.buttons[srcUnit].class
else
@ -393,6 +393,18 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(...)
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