mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Scripts/Naxxramas: Fix an edge case crash in Gothik. Closes #16575.
(cherry picked from commit a23ccc1b83)
This commit is contained in:
@@ -369,8 +369,12 @@ class boss_gothik : public CreatureScript
|
||||
_gateIsOpen = true;
|
||||
|
||||
for (ObjectGuid summonGuid : summons)
|
||||
{
|
||||
if (Creature* summon = ObjectAccessor::GetCreature(*me, summonGuid))
|
||||
summon->AI()->DoAction(ACTION_GATE_OPENED);
|
||||
if (summons.empty()) // ACTION_GATE_OPENED may cause an evade, despawning summons and invalidating our iterator
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* /*who*/, uint32& damage) override
|
||||
|
||||
Reference in New Issue
Block a user