From e89467ea580dac356d74bcf83cba5d1a25b3a309 Mon Sep 17 00:00:00 2001 From: Treeston Date: Mon, 11 Sep 2017 16:13:35 +0200 Subject: [PATCH] Scripts/Naxxramas: Fix an edge case crash with people teleporting out of the dungeon during the Patchwerk encounter (tagging #20247) --- src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp index 86452942d28..45e0d7420c8 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp @@ -126,11 +126,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; }