mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-30 15:40:51 +00:00
Keep libpredict tracking casts when HealComm is loaded
With HealComm-1.0 present (HealComm, LunaUnitFrames, NotGrid), the compat hook unregistered every event on libpredict.sender to stop pfUI broadcasting a duplicate of the player's casts. Since cast detection moved onto that frame's UNIT_SPELLCAST_* handlers, that also blinded libpredict to every cast, so the player's own resurrections never put the rez icon on the target's frame: ParseChatMessage drops the player's own Resurrection echo, expecting the cast events to have tracked it. The compat hook now only mutes the outgoing HealComm and CTRA messages. The HealComm.SendAddonMessage hook that parsed the player's own messages while solo goes too, since libpredict tracks its own casts directly.
This commit is contained in:
@@ -1172,21 +1172,9 @@ pfUI:RegisterModule("thirdparty-vanilla", function()
|
||||
end)
|
||||
|
||||
local EnableHealComm = function()
|
||||
-- hook healcomm's addon message to parse single-player events
|
||||
-- HealComm-1.0 already broadcasts this player's casts: keep libpredict
|
||||
-- tracking them, but stop it sending a second copy
|
||||
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 IsInGroup() then
|
||||
libpredict:ParseChatMessage(UnitName("player"), msg, "HealComm")
|
||||
end
|
||||
pfHookHealCommSendAddonMessage(this, msg)
|
||||
end
|
||||
|
||||
-- disable pfUI predictions
|
||||
pfUI.api.libpredict.sender:UnregisterAllEvents()
|
||||
pfUI.api.libpredict.sender.enabled = nil
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user