Created
September 14, 2017 19:43
-
-
Save Sar777/b019b3e514d080ff6e67e8f58af816e5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp | |
index eeb5f7b..2bbdf42 100644 | |
--- a/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp | |
+++ b/src/server/scripts/Northrend/Naxxramas/boss_patchwerk.cpp | |
@@ -127,16 +127,19 @@ public: | |
auto list = mgr.GetModifiableThreatList(); | |
auto it = list.begin(), end = list.end(); | |
if (it == end) | |
+ { | |
EnterEvadeMode(EVADE_REASON_NO_HOSTILES); | |
+ return; | |
+ } | |
if ((*it)->GetVictim() != currentVictim) | |
secondThreat = *it; | |
- if ((!secondThreat || Is25ManRaid()) && (++it != end)) | |
+ if ((!secondThreat || Is25ManRaid()) && (std::next(it) != end)) | |
{ | |
if ((*it)->GetVictim() != currentVictim) | |
- (secondThreat ? thirdThreat : secondThreat) = *it; | |
- if (!thirdThreat && Is25ManRaid() && (++it != end)) | |
- thirdThreat = *it; | |
+ (secondThreat ? thirdThreat : secondThreat) = *(++it); | |
+ if (!thirdThreat && Is25ManRaid() && (std::next(it) != end)) | |
+ thirdThreat = *(++it); | |
} | |
Unit* pHatefulTarget = nullptr; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment