Scripts/Naxxramas: Fix an edge case crash with people teleporting out of the dungeon during the Patchwerk encounter (tagging #20247)

This commit is contained in:
Treeston
2017-09-11 16:13:35 +02:00
parent 62f7debffd
commit 50e8de103b

View File

@@ -131,11 +131,11 @@ public:
if ((*it)->GetVictim() != currentVictim)
secondThreat = *it;
if ((!secondThreat || Is25ManRaid()) && (++it != end))
if ((!secondThreat || Is25ManRaid()) && (++it != end && (*it)->IsAvailable()))
{
if ((*it)->GetVictim() != currentVictim)
(secondThreat ? thirdThreat : secondThreat) = *it;
if (!thirdThreat && Is25ManRaid() && (++it != end))
if (!thirdThreat && Is25ManRaid() && (++it != end && (*it)->IsAvailable()))
thirdThreat = *it;
}