diff --git a/Categories/TooltipScanning.lua b/Categories/TooltipScanning.lua index d1ef00d..f501c3a 100644 --- a/Categories/TooltipScanning.lua +++ b/Categories/TooltipScanning.lua @@ -102,10 +102,15 @@ local function FigureZone(unit) end end +local should_UPDATE_FACTION = false local in_UNIT_FACTION = false local function UPDATE_FACTION() if in_UNIT_FACTION then return end in_UNIT_FACTION = true + if InCombatLockdown() then + should_UPDATE_FACTION = true + return + end for i = 1, GetNumFactions() do local name,_,_,_,_,_,_,_,isHeader,isCollapsed = GetFactionInfo(i) if isHeader == 1 then @@ -127,6 +132,12 @@ local function UPDATE_FACTION() end DogTag:AddEventHandler("Unit", "UPDATE_FACTION", UPDATE_FACTION) DogTag:AddEventHandler("Unit", "PLAYER_LOGIN", UPDATE_FACTION) +DogTag:AddEventHandler("Unit", "PLAYER_REGEN_ENABLED", function() + if should_UPDATE_FACTION then + should_UPDATE_FACTION = false + UPDATE_FACTION() + end +end) DogTag:AddTag("Unit", "Guild", { code = function(unit)