cooldown tracking with UNIT_SPELLCAST_SUCCEEDED
This commit is contained in:
		| @@ -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) |                 if spellID == 16188 or spellID == 17116 then -- Nature's Swiftness (same name for druid and shaman) | ||||||
|                     spellId = spellID |                     spellId = spellID | ||||||
|                 end |                 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 |                     if (Gladdy:GetCooldownList()[Gladdy.buttons[srcUnit].class][spellId]) then | ||||||
|                         unitClass = Gladdy.buttons[srcUnit].class |                         unitClass = Gladdy.buttons[srcUnit].class | ||||||
|                     else |                     else | ||||||
| @@ -393,6 +393,18 @@ function EventListener:UNIT_SPELLCAST_SUCCEEDED(...) | |||||||
|             Gladdy:Debug("INFO", "UNIT_SPELLCAST_SUCCEEDED - RACIAL_USED", unit, spellID) |             Gladdy:Debug("INFO", "UNIT_SPELLCAST_SUCCEEDED - RACIAL_USED", unit, spellID) | ||||||
|             Gladdy:SendMessage("RACIAL_USED", unit) |             Gladdy:SendMessage("RACIAL_USED", unit) | ||||||
|         end |         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 | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user