From dac995bc895957dc23ff040140750a311cdb92a9 Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 28 Mar 2020 12:05:06 +0100 Subject: [PATCH] prediction: detect selfcast via actionbuttons --- modules/prediction.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/prediction.lua b/modules/prediction.lua index 0e740454..9cbd12fa 100644 --- a/modules/prediction.lua +++ b/modules/prediction.lua @@ -361,7 +361,7 @@ pfUI:RegisterModule("prediction", "vanilla:tbc", function () end, true) local scanner = libtipscan:GetScanner("prediction") - hooksecurefunc("UseAction", function(slot, target, button) + hooksecurefunc("UseAction", function(slot, target, selfcast) if not pfUI.prediction.sender.enabled then return end if GetActionText(slot) or not IsCurrentAction(slot) then return end scanner:SetAction(slot) @@ -369,7 +369,7 @@ pfUI:RegisterModule("prediction", "vanilla:tbc", function () if not effect then return end spell_queue[1] = effect spell_queue[2] = effect.. ( rank or "" ) - spell_queue[3] = UnitName("target") and UnitCanAssist("player", "target") and UnitName("target") or UnitName("player") + spell_queue[3] = selfcast and UnitName("player") or UnitName("target") and UnitCanAssist("player", "target") and UnitName("target") or UnitName("player") end, true) pfUI.prediction.sender = CreateFrame("Frame", "pfPredictionSender", UIParent)