From d834be9f0b7add6c7e6fd2cd04947d33c0196d36 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Fri, 3 Jul 2026 21:38:05 -0500 Subject: [PATCH] Revert "nameplates: hide castbar on remote interrupt / caster death (#11)" This reverts commit 703d7770cada99f042f3db3500b05cdf91ec32a3. --- modules/nameplates.lua | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 18825576..98f28aea 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -63,14 +63,6 @@ pfUI:RegisterModule("nameplates", function () local raidGuidCache = {} -- guid -> name (rebuilt on RAID_ROSTER_UPDATE/PARTY_MEMBERS_CHANGED) - -- ClassicAPI's remote-cast cache has no interrupt signal — an interrupted - -- cast keeps being reported until its computed end time (issue #11). When - -- nampower tells us a remote cast failed (SPELL_FAILED_OTHER) or the caster - -- died (UNIT_DIED), we stamp the event time here (engine-ms domain, same as - -- startMs) and GetCastInfo drops any cast that started before the stamp. A - -- newer cast clears its unit's entry. - local castSuppressed = {} -- guid -> suppression time (GetTime()*1000) - -- Resolve a plate GUID to its cast/channel info via C_Spell. Returns a -- compact struct (spellName / icon / startTime / endTime / duration / -- isChannel) or nil when the unit isn't casting / the GUID can't map to a @@ -86,11 +78,6 @@ pfUI:RegisterModule("nameplates", function () isChannel = true end if not name or not startMs or not endMs then return nil end - local supp = castSuppressed[guid] - if supp then - if startMs <= supp then return nil end - castSuppressed[guid] = nil - end return { spellName = name, spellID = spellID, @@ -487,9 +474,6 @@ nameplates:RegisterEvent("PARTY_MEMBERS_CHANGED") nameplates:RegisterEvent("NAME_PLATE_CREATED") nameplates:RegisterEvent("NAME_PLATE_UNIT_ADDED") nameplates:RegisterEvent("NAME_PLATE_UNIT_REMOVED") --- nampower: remote cast interrupted / caster died — see castSuppressed -nameplates:RegisterEvent("SPELL_FAILED_OTHER") -nameplates:RegisterEvent("UNIT_DIED") if GetUnitField then nameplates:RegisterEvent("UNIT_FLAGS_GUID") nameplates:RegisterEvent("UNIT_AURA_GUID") @@ -610,19 +594,6 @@ end plate.nameplate.auraUpdate = true end - elseif event == "SPELL_FAILED_OTHER" or event == "UNIT_DIED" then - -- Nampower: arg1 = guid. Only stamp when the unit actually has a - -- tracked cast — keeps the table from accumulating an entry for every - -- combat-log death. Flag the plate so the castbar hides this tick - -- instead of waiting out the throttle. - if arg1 and GetCastInfo(arg1) then - castSuppressed[arg1] = GetTime() * 1000 - local plate = C_NamePlate.GetNamePlateForGUID(arg1) - if plate and plate.nameplate then - plate.nameplate.castUpdate = true - end - end - elseif event == "PLAYER_TARGET_CHANGED" then -- Flag target plate for update via GUID registry local targetGuid = UnitGUID("target")