mirror of
https://github.com/parnic/LibDogTag-Unit-3.0.git
synced 2025-06-16 21:41:53 -05:00
- don't mess with the faction thingy when in combat.
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user