refactor: improve Nampower aura tracking and GUID management integration

This commit is contained in:
Bluewhale1337
2026-11-02 17:13:37 +01:00
parent 7b8c0251fc
commit 5a77b2298d
6 changed files with 375 additions and 200 deletions
+19 -25
View File
@@ -197,34 +197,22 @@ function HealBot_OnUpdate(this, arg1)
if HealBot_Config.HealBot_Integrations_ShowHoTTimers == 1 then
if not HealBot_HoT_Update_Timer or GetTime() >= HealBot_HoT_Update_Timer then
HealBot_HoT_Update_Timer = GetTime() + 0.25
local displayMode = HealBot_Config.HealBot_Integrations_HoTTimerDisplayMode or 0
if displayMode == 1 then
-- Icon Overlay mode: dirty-flag units with active Nampower auras
if HealBot_Integrations_Nampower_Active and HealBot_Nampower_Auras then
local now = GetTime()
for guid, auras in pairs(HealBot_Nampower_Auras) do
local hasActive = false
for _, exp in pairs(auras) do
if exp > now then hasActive = true; break end
end
if hasActive then
local unitID = (HealBot_Model and HealBot_Model:GetUnitByGUID(guid))
if not unitID and HealBot_PlayerGUID and guid == HealBot_PlayerGUID then
unitID = "player"
end
if unitID and not string.find(unitID, "pet") then
HealBot_View_DirtyUnits[unitID] = true
end
end
end
end
end
if HealBot_Action_UpdatePlayerHoTs then
if HealBot_UpdateActiveHoTTimers then
HealBot_UpdateActiveHoTTimers()
elseif HealBot_Action_UpdatePlayerHoTs then
HealBot_Action_UpdatePlayerHoTs()
end
end
elseif HealBot_PlayerHoTsListFrame and HealBot_PlayerHoTsListFrame:IsVisible() then
HealBot_PlayerHoTsListFrame:Hide()
else
if (HealBot_PlayerHoTsListFrame and HealBot_PlayerHoTsListFrame:IsVisible()) or HealBot_Overlays_Active then
if HealBot_PlayerHoTsListFrame and HealBot_PlayerHoTsListFrame:IsVisible() then
HealBot_PlayerHoTsListFrame:Hide()
end
if HealBot_ClearHoTOverlays then
HealBot_ClearHoTOverlays()
end
HealBot_Overlays_Active = false
end
end
HealBot_Timer1 = HealBot_Timer1 + arg1;
@@ -315,6 +303,9 @@ local HealBot_EventHandlers = {
for _, unit in ipairs(HealBot_Model.raidMembers) do
HealBot_Model:RefreshUnit(unit)
end
if HealBot_Model and HealBot_Model.PopulateAllGUIDs then
HealBot_Model:PopulateAllGUIDs()
end
HealBot_Model:NotifyObservers("ROSTER_CHANGED")
HealBot_OnEvent_PartyMembersChanged(this)
end,
@@ -326,6 +317,9 @@ local HealBot_EventHandlers = {
for _, unit in ipairs(HealBot_Model.raidMembers) do
HealBot_Model:RefreshUnit(unit)
end
if HealBot_Model and HealBot_Model.PopulateAllGUIDs then
HealBot_Model:PopulateAllGUIDs()
end
HealBot_Model:NotifyObservers("ROSTER_CHANGED")
HealBot_OnEvent_PartyMembersChanged(this)
end,