From fc73812baa4276d01f80ec8013dd21b561895785 Mon Sep 17 00:00:00 2001 From: FLORIAN GUSTIN Date: Tue, 24 Mar 2026 02:37:08 +0100 Subject: [PATCH 1/3] adding maul queue --- .gitignore | 2 ++ modules/gui.lua | 2 +- modules/swingtimer.lua | 47 ++++++++++++++++++++++++++++-------------- 3 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..274656fa --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.idea +/.idea \ No newline at end of file diff --git a/modules/gui.lua b/modules/gui.lua index f87dad94..171906ab 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2090,7 +2090,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, T["Offhand Bar Color"], C.unitframes, "swingtimerohcolor", "color") CreateConfig(nil, T["Ranged Bar Color"], C.unitframes, "swingtimerrangedcolor", "color") CreateConfig(nil, T["Ranged Warn Color (Hunter)"], C.unitframes, "swingtimerrangedwarncolor", "color") - CreateConfig(nil, T["Show HS/Cleave Queue Color (Warrior)"], C.unitframes, "swingtimerhsqueue", "checkbox") + CreateConfig(nil, T["Show On Next Attack Queue Color"], C.unitframes, "swingtimerhsqueue", "checkbox") CreateConfig(nil, T["Show Attack Speed"], C.unitframes, "swingtimerattackspeed", "checkbox") CreateConfig(nil, "Mark Tracking", nil, nil, "header") diff --git a/modules/swingtimer.lua b/modules/swingtimer.lua index d5187fd1..c9e67734 100644 --- a/modules/swingtimer.lua +++ b/modules/swingtimer.lua @@ -22,7 +22,7 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () inCombat = false, pendingCastSpellId = nil, mhFrozenAt = nil, - hsQueued = false, cleaveQueued = false, + hsQueued = false, cleaveQueued = false, maulQueued = false, isWarrior = false, cachedHSSlots = {}, cachedCleaveSlots = {}, useSpellQueueEvent = false, @@ -64,7 +64,16 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () local cleaveSpellIDs = { [845] = true, [7369] = true, [11608] = true, [11609] = true, [20569] = true, - } + } + + -- Maul spell IDs (all ranks 1 to 7) + local maulSpellIDs = { + [6807] = true, + [6808] = true, + [6809] = true, + [8972] = true, + [9745] = true, [9880] = true, [9881] = true, + } -- Read config local sw_width = tonumber(C.unitframes.swingtimerwidth) or 200 @@ -507,12 +516,15 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () -- HS/Cleave color local curR, curG, curB = mhDefaultR, mhDefaultG, mhDefaultB if sw_hsqueue and S.isWarrior then - local hs, cl = IsHSOrCleaveQueued() - if cl then - curR, curG, curB = 0.2, 0.9, 0.2 - elseif hs then - curR, curG, curB = 0.9, 0.9, 0.2 - end + local hs, cl = IsHSOrCleaveQueued() + local maul = S.maulQueued + if maul then + curR, curG, curB = 0.2, 0.6, 1.0 -- blue-ish for druid + elseif cl then + curR, curG, curB = 0.2, 0.9, 0.2 + elseif hs then + curR, curG, curB = 0.9, 0.9, 0.2 + end end -- Render MH @@ -692,8 +704,9 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () -- Slam delays auto-attack but does NOT reset the swing timer. Ignore. S.pendingCastSpellId = nil return - elseif hsSpellIDs[spellId] or IsOnSwingSpell(spellId) then + elseif hsSpellIDs[spellId] or cleaveSpellIDs[spellId] or maulSpellIDs[spellId] or IsOnSwingSpell(spellId) then S.hsQueued = false; S.cleaveQueued = false + S.maulQueued = false ResetMH() elseif cleaveSpellIDs[spellId] then S.hsQueued = false; S.cleaveQueued = false @@ -716,11 +729,12 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () -- SPELL_CAST_EVENT hook: HS/Cleave queue tracking pfUI.libdebuff_spell_cast_hooks = pfUI.libdebuff_spell_cast_hooks or {} pfUI.libdebuff_spell_cast_hooks["swingtimer"] = function(success, spellId) - if success ~= 1 then return end if hsSpellIDs[spellId] then - S.hsQueued = true; S.cleaveQueued = false + S.hsQueued = true; S.cleaveQueued = false; S.maulQueued = false elseif cleaveSpellIDs[spellId] then - S.cleaveQueued = true; S.hsQueued = false + S.cleaveQueued = true; S.hsQueued = false; S.maulQueued = false + elseif maulSpellIDs[spellId] then + S.maulQueued = true; S.hsQueued = false; S.cleaveQueued = false end end @@ -806,12 +820,14 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () if eventCode == ON_SWING_QUEUED then S.useSpellQueueEvent = true if hsSpellIDs[spellId] then - S.hsQueued = true; S.cleaveQueued = false + S.hsQueued = true; S.cleaveQueued = false; S.maulQueued = false elseif cleaveSpellIDs[spellId] then - S.cleaveQueued = true; S.hsQueued = false + S.cleaveQueued = true; S.hsQueued = false; S.maulQueued = false + elseif maulSpellIDs[spellId] then + S.maulQueued = true; S.hsQueued = false; S.cleaveQueued = false end elseif eventCode == ON_SWING_QUEUE_POPPED then - S.hsQueued = false; S.cleaveQueued = false + S.hsQueued = false; S.cleaveQueued = false; S.maulQueued = false end elseif event == "START_AUTOATTACK" then @@ -897,6 +913,7 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () -- Warrior HS/Cleave queue state IsHSQueued = function() return S.hsQueued end, IsCleaveQueued = function() return S.cleaveQueued end, + IsMaulQueued = function() return S.maulQueued end, } UpdateWeaponSpeeds() From 74e4ddab6f0e9c8e47cafc7e998885a92cfd421c Mon Sep 17 00:00:00 2001 From: FLORIAN GUSTIN Date: Tue, 24 Mar 2026 13:15:17 +0100 Subject: [PATCH 2/3] fix on maul queue --- modules/swingtimer.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/modules/swingtimer.lua b/modules/swingtimer.lua index c9e67734..1cdbd9a7 100644 --- a/modules/swingtimer.lua +++ b/modules/swingtimer.lua @@ -24,6 +24,7 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () mhFrozenAt = nil, hsQueued = false, cleaveQueued = false, maulQueued = false, isWarrior = false, + isDruid = false, cachedHSSlots = {}, cachedCleaveSlots = {}, useSpellQueueEvent = false, playerGUID = nil, @@ -515,16 +516,17 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () -- HS/Cleave color local curR, curG, curB = mhDefaultR, mhDefaultG, mhDefaultB - if sw_hsqueue and S.isWarrior then + if sw_hsqueue then + if S.maulQueued and S.isDruid then + curR, curG, curB = 0.2, 0.6, 1.0 -- blue-ish for druid + elseif S.isWarrior then local hs, cl = IsHSOrCleaveQueued() - local maul = S.maulQueued - if maul then - curR, curG, curB = 0.2, 0.6, 1.0 -- blue-ish for druid - elseif cl then + if cl then curR, curG, curB = 0.2, 0.9, 0.2 elseif hs then curR, curG, curB = 0.9, 0.9, 0.2 end + end end -- Render MH @@ -839,6 +841,7 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () elseif event == "PLAYER_ENTERING_WORLD" then local _, class = UnitClass("player") S.isWarrior = (class == "WARRIOR") + S.isDruid = (class == "DRUID") S.playerGUID = GetUnitGUID("player") UpdateWeaponSpeeds() RebuildQueueSlotCache() @@ -866,6 +869,7 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () S.inCombat = false S.hsQueued = false S.cleaveQueued = false + S.maulQueued = false elseif event == "UNIT_DIED" then if arg1 and arg1 == S.playerGUID then @@ -917,4 +921,4 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () } UpdateWeaponSpeeds() -end) \ No newline at end of file +end) From 38c7feeed732f33f30e6edaa8772fddfdb67c01e Mon Sep 17 00:00:00 2001 From: FLORIAN GUSTIN Date: Tue, 24 Mar 2026 13:20:41 +0100 Subject: [PATCH 3/3] changing maul color --- modules/swingtimer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/swingtimer.lua b/modules/swingtimer.lua index 1cdbd9a7..b8adec05 100644 --- a/modules/swingtimer.lua +++ b/modules/swingtimer.lua @@ -518,7 +518,7 @@ pfUI:RegisterModule("swingtimer", "vanilla:tbc", function () local curR, curG, curB = mhDefaultR, mhDefaultG, mhDefaultB if sw_hsqueue then if S.maulQueued and S.isDruid then - curR, curG, curB = 0.2, 0.6, 1.0 -- blue-ish for druid + curR, curG, curB = 1.0, 0.55, 0.0 -- orange for druid maul queue elseif S.isWarrior then local hs, cl = IsHSOrCleaveQueued() if cl then