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

(cherry picked from commit 50e8de103b)
This commit is contained in:
Treeston
2017-09-11 16:13:35 +02:00
committed by Shauren
parent 1108164f1b
commit bece27ef3f

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;
}