From 4364d87bf7826c6ce04207c70df1bef909ae875f Mon Sep 17 00:00:00 2001 From: PhatPhuckDave Date: Wed, 1 Jan 2025 21:08:51 +0100 Subject: [PATCH] Fix inviter infinite loop --- Heimdall.zip | 4 ++-- Modules/Inviter.lua | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Heimdall.zip b/Heimdall.zip index 25298a5..43ca1ed 100644 --- a/Heimdall.zip +++ b/Heimdall.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:eab96a54ac4e4cee3281e8fe47693646ce9456ad651f21e9f1223c021cae179c -size 17258 +oid sha256:2be96f59f67fcceb4a0c2b007082e8eb6076d005a36705e4373147bdb67514bc +size 17294 diff --git a/Modules/Inviter.lua b/Modules/Inviter.lua index eb119cc..8709009 100644 --- a/Modules/Inviter.lua +++ b/Modules/Inviter.lua @@ -15,7 +15,10 @@ function shared.Inviter.Init() if Heimdall_Data.config.inviter.agentsAssist then shared.dumpTable(Heimdall_Data.config.agents) for name, _ in pairs(Heimdall_Data.config.agents) do - if not UnitIsRaidOfficer(name) then + if UnitInParty(name) + and not UnitIsGroupLeader(name) + and not UnitIsRaidOfficer(name) then + print("Promoting " .. name .. " to assistant") PromoteToAssistant(name, true) end end @@ -56,3 +59,4 @@ function shared.Inviter.Init() print("Heimdall - Inviter loaded") end +end