From 94a49ea9fa6b089ee0f1d8b13b5e4cc0e6e7c5dc Mon Sep 17 00:00:00 2001 From: killerwife Date: Mon, 25 Sep 2023 19:21:29 +0200 Subject: [PATCH] SpawnGroup: Disallow aggro of same group member through CREATURE_GROUP_AGGRO_TOGETHER --- src/game/Maps/SpawnGroup.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/Maps/SpawnGroup.cpp b/src/game/Maps/SpawnGroup.cpp index 0754e0e30a..685cc4bd80 100644 --- a/src/game/Maps/SpawnGroup.cpp +++ b/src/game/Maps/SpawnGroup.cpp @@ -419,6 +419,10 @@ void CreatureGroup::TriggerLinkingEvent(uint32 event, Unit* target) if ((m_entry.Flags & CREATURE_GROUP_AGGRO_TOGETHER) == 0) return; + // disallow aggro of a group member + if (m_objects.find(target->GetDbGuid()) != m_objects.end()) + return; + for (auto& data : m_objects) { uint32 dbGuid = data.first;