From 2071ff0b2a1057360d9512ec86f074722816b870 Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 27 Nov 2020 15:26:02 +0100 Subject: [PATCH] thirdparty: update healcomm code for libpredict * disable libpredict sender when healcomm should be used * fix bug where solo-predictions where not parsed --- modules/thirdparty-vanilla.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/thirdparty-vanilla.lua b/modules/thirdparty-vanilla.lua index 81d76c67..04b0fa44 100644 --- a/modules/thirdparty-vanilla.lua +++ b/modules/thirdparty-vanilla.lua @@ -987,21 +987,21 @@ pfUI:RegisterModule("thirdparty-vanilla", "vanilla", function() local EnableHealComm = function() -- hook healcomm's addon message to parse single-player events - if AceLibrary and AceLibrary:HasInstance("HealComm-1.0") and pfUI.prediction then + if AceLibrary and AceLibrary:HasInstance("HealComm-1.0") and pfUI.api.libpredict then local HealComm = AceLibrary("HealComm-1.0") -- use pfUI frames to draw healComm predictions local pfHookHealCommSendAddonMessage = HealComm.SendAddonMessage function HealComm.SendAddonMessage(this, msg) if not UnitInRaid("player") and GetNumPartyMembers() < 1 then - pfUI.prediction:ParseChatMessage(UnitName("player"), msg) + libpredict:ParseChatMessage(UnitName("player"), msg, "HealComm") end pfHookHealCommSendAddonMessage(this, msg) end -- disable pfUI predictions - pfUI.prediction.sender:UnregisterAllEvents() - pfUI.prediction.sender.enabled = nil + pfUI.api.libpredict.sender:UnregisterAllEvents() + pfUI.api.libpredict.sender.enabled = nil end end HookAddonOrVariable("HealComm", EnableHealComm)