mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
Retire the hasPfUI76 flag and the pfUI 7.6 branches it gated
Assume a modern pfUI, and drop the version-tiered branching entirely: 31 call sites across five files, plus the flag and its detector. Note which side was actually dead. HasPfUI76() required four things -- pfUI version >= 7.6, Nampower >= 2.40, pfUI.libdebuff_objects_guid, and pfUI.libdebuff_casts. The last one does not exist: pfUI exports 28 libdebuff_* tables and libdebuff_casts is not among them (libdebuff_recent_casts is a dedup table keyed [targetGuid][spellName][casterGuid], a different shape). So the detector returned false at any version, and it was the hasPfUI76-TRUE branches that never ran, not the fallbacks. Removing those is behaviour- preserving; keeping SCRM as the owner of castTracking is what the code has always actually done. Removed accordingly: - lib:HasPfUI76(), both flag declarations, and the block that would have aliased castTracking to pfUI.libdebuff_casts and re-pointed lib.objects/iconCache. - HookPfUILibdebuff's "7.6 handles durations internally" early return, so the GetDuration/AddEffect hooks below it are visibly the live path again. - The SPELL_START_OTHER / SPELL_FAILED_OTHER unregister arm, the pfUI branch of GetAuraTrackingData, the pfUI76 arm of the libdebuff zone/death cleanup, the pfUI backing table in the /cleveroid aura dump, and two status-string suffixes. - SyncComboDurationToPfUI (77 lines) with its two call sites: it returned immediately whenever hasPfUI76, and is inert once the tier split is gone. Unconditionalised the paths that were gated on `not hasPfUI76`: the castTracking populate/clear/sweep, InitPfUIIntegration on login, and ten libdebuff duration lookups. Verified no hasPfUI76 reference remains, and that per-file block balance is unchanged from HEAD.
This commit is contained in:
+3
-11
@@ -779,14 +779,6 @@ CleveRoids.DownrankBlocked = CleveRoids.DownrankBlocked or {}
|
||||
function CleveRoids.GetAuraTrackingData(targetGuid)
|
||||
if not targetGuid then return nil, false end
|
||||
|
||||
-- pfUI path: read directly from pfUI's table (has downrank protection built-in)
|
||||
if CleveRoids.hasPfUI76 and pfUI and pfUI.libdebuff_all_auras then
|
||||
local data = pfUI.libdebuff_all_auras[targetGuid]
|
||||
if data then return data, true end
|
||||
-- Fall through: our table may have test entries even when pfUI is active
|
||||
end
|
||||
|
||||
-- Standalone path (or pfUI had no data for this GUID)
|
||||
local data = CleveRoids.AllCasterAuraTracking[targetGuid]
|
||||
if data then return data, false end
|
||||
return nil, false
|
||||
@@ -995,7 +987,7 @@ local function OnAutoAttackOther(attackerGuid, targetGuid, totalDamage, hitInfo,
|
||||
end
|
||||
|
||||
-- Sync to pfUI if loaded (pre-7.6 only)
|
||||
if not CleveRoids.hasPfUI76 and pfUI and pfUI.api and pfUI.api.libdebuff then
|
||||
if pfUI and pfUI.api and pfUI.api.libdebuff then
|
||||
local spellName = C_Spell.GetSpellName(spellID) or nil
|
||||
local baseName = CleveRoids.StripRank(spellName)
|
||||
local targetName = (lib.guidToName and lib.guidToName[normalizedTarget]) or UnitName("target")
|
||||
@@ -1175,7 +1167,7 @@ local function OnAuraCastOther(spellId, casterGuid, targetGuid, effect, effectAu
|
||||
-- full downrank protection — we read from that table via GetAuraTrackingData().
|
||||
if spellId and durationMs and durationMs > 0 then
|
||||
local spellName = C_Spell.GetSpellName(spellId)
|
||||
if spellName and not CleveRoids.hasPfUI76 then
|
||||
if spellName then
|
||||
CleveRoids._allCasterAuraDirty = true
|
||||
if not CleveRoids.AllCasterAuraTracking[targetGuid] then
|
||||
CleveRoids.AllCasterAuraTracking[targetGuid] = {}
|
||||
@@ -1378,7 +1370,7 @@ autoAttackFrame:SetScript("OnEvent", function()
|
||||
if spellId and spellId > 0 and durationMs and durationMs > 0 then
|
||||
local playerGUID = CleveRoids.GetGUID("player")
|
||||
local durSpellName = C_Spell.GetSpellName(spellId)
|
||||
if playerGUID and durSpellName and not CleveRoids.hasPfUI76 then
|
||||
if playerGUID and durSpellName then
|
||||
CleveRoids._allCasterAuraDirty = true
|
||||
if not CleveRoids.AllCasterAuraTracking[playerGUID] then
|
||||
CleveRoids.AllCasterAuraTracking[playerGUID] = {}
|
||||
|
||||
Reference in New Issue
Block a user