Skip to content

Commit

Permalink
SpawnGroup: Disallow aggro of same group member through CREATURE_GROU…
Browse files Browse the repository at this point in the history
…P_AGGRO_TOGETHER
  • Loading branch information
killerwife committed Sep 25, 2023
1 parent e512fc1 commit 94a49ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/game/Maps/SpawnGroup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 94a49ea

Please sign in to comment.