From cc11831adac647b05a1056f81f747ea1afe43a0d Mon Sep 17 00:00:00 2001 From: Meow <30401521+me0wg4ming@users.noreply.github.com> Date: Mon, 30 Mar 2026 16:21:25 +0200 Subject: [PATCH] fixed heals being shown as prediction on hostile targets. --- libs/libpredict.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/libpredict.lua b/libs/libpredict.lua index b3508045..b29b7cfc 100644 --- a/libs/libpredict.lua +++ b/libs/libpredict.lua @@ -288,8 +288,14 @@ pfUI.libdebuff_spell_start_self_hooks["libpredict"] = function(spellId, casterGu return -- skip the generic Heal call below end - libpredict:Heal(player, target, amount, casttime) - libpredict.sender:SendHealCommMsg("Heal/" .. (target or "") .. "/" .. amount .. "/" .. casttime .. "/") + -- If target is hostile (e.g. self-heal while targeting an enemy), + -- store the heal under player instead so the player frame shows prediction. + local healTarget = target + if healTarget and UnitExists("target") and (UnitCanAttack("player", "target") or not UnitIsFriend("player", "target")) then + healTarget = player + end + libpredict:Heal(player, healTarget, amount, casttime) + libpredict.sender:SendHealCommMsg("Heal/" .. (healTarget or "") .. "/" .. amount .. "/" .. casttime .. "/") libpredict.sender.healing = true end end