Skip to content

Commit

Permalink
Scripts/Naxxramas: Fix an edge case crash in Gothik. Closes #16575.
Browse files Browse the repository at this point in the history
(cherry picked from commit a23ccc1)
  • Loading branch information
Treeston authored and Shauren committed Apr 10, 2016
1 parent d0dce8c commit dc07c24
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/server/scripts/Northrend/Naxxramas/boss_gothik.cpp
Expand Up @@ -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
Expand Down

0 comments on commit dc07c24

Please sign in to comment.