Skip to content

Commit

Permalink
use WA_COMBO_TARGET_CHANGED
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuds authored and InfusOnWoW committed Jun 17, 2024
1 parent 1d4f2c4 commit 5784e0e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
15 changes: 15 additions & 0 deletions WeakAuras/GenericTrigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3994,6 +3994,21 @@ do
end
end

do
local watchFrame
function Private.WatchCOMBO_TARGET_CHANGED()
if not watchFrame then
watchFrame = CreateFrame("Frame")
watchFrame:RegisterEvent("COMBO_TARGET_CHANGED")
watchFrame:SetScript("OnEvent", function()
Private.StartProfileSystem("generictrigger COMBO_TARGET_CHANGED")
WeakAuras.ScanEvents("WA_COMBO_TARGET_CHANGED", "player")
Private.StopProfileSystem("generictrigger COMBO_TARGET_CHANGED")
end)
end
end
end

-- Cast Latency
do
local castLatencyFrame
Expand Down
6 changes: 4 additions & 2 deletions WeakAuras/Prototypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3503,8 +3503,6 @@ Private.event_prototypes = {
if WeakAuras.IsRetail() then
AddUnitEventForEvents(result, unit, "UNIT_POWER_POINT_CHARGE")
elseif WeakAuras.IsCataClassic() then
result.events = result.events or {}
tinsert(result.events, "COMBO_TARGET_CHANGED")
AddUnitEventForEvents(result, unit, "UNIT_TARGET")
else
AddUnitEventForEvents(result, unit, "UNIT_TARGET")
Expand All @@ -3530,6 +3528,10 @@ Private.event_prototypes = {
if WeakAuras.IsCataClassic() and trigger.unit == "player" and trigger.use_powertype and trigger.powertype == 26 then
tinsert(result, "ECLIPSE_DIRECTION_CHANGE");
end
if WeakAuras.IsCataClassic() and trigger.unit == "player" and trigger.use_powertype and trigger.powertype == 4 then
Private.WatchCOMBO_TARGET_CHANGED()
tinsert(result, "WA_COMBO_TARGET_CHANGED");
end
return result
end,
loadFunc = function(trigger)
Expand Down

0 comments on commit 5784e0e

Please sign in to comment.