From 109d2ad889a98346973afc75d28ff87a3bb2010c Mon Sep 17 00:00:00 2001 From: ckknight Date: Wed, 16 Jul 2008 17:34:39 +0000 Subject: [PATCH] - don't mess with the faction thingy when in combat. --- Categories/TooltipScanning.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) 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)