From a5bead3b0215c1e79598a18f8f21bd177208fd6d Mon Sep 17 00:00:00 2001 From: frakern <134113799+frakern@users.noreply.github.com> Date: Wed, 13 Sep 2023 12:30:16 +0900 Subject: [PATCH] Add wand shoot cd to GCD tracker --- modules/GCD.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/GCD.lua b/modules/GCD.lua index 6ef4987..ee886b4 100644 --- a/modules/GCD.lua +++ b/modules/GCD.lua @@ -83,6 +83,7 @@ function GCD:OnEnable() --self:RegisterEvent("UNIT_SPELLCAST_SENT","CheckGCD") self:RegisterEvent("UNIT_SPELLCAST_START","CheckGCD") self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED","CheckGCD") + self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED", "CLEUHandler") if not gcdbar then gcdbar = CreateFrame("Frame", "Quartz3GCDBar", UIParent, "BackdropTemplate") gcdbar:SetFrameStrata("HIGH") @@ -113,6 +114,21 @@ function GCD:CheckGCD(event, unit, guid, spell) end end +function GCD:CLEUHandler() + local playerGUID = UnitGUID("player") + local timestamp, event, hideCaster, sGUID, sName, sFlags, sRaidFlags, dGUID, dName, dFlags, dRaidFlags, spellId, spellName = CombatLogGetCurrentEventInfo() + + if playerGUID == sGUID and event == "SPELL_CAST_SUCCESS" and spellName == "Shoot" then + local start = GetTime() + local dur = UnitRangedDamage("player") + if dur and dur > 0 then + starttime = start + duration = dur + gcdbar:Show() + end + end +end + function GCD:ApplySettings() db = self.db.profile if gcdbar and self:IsEnabled() then