From 563188fe4bdf94065241da2c2815d236b192802f Mon Sep 17 00:00:00 2001 From: Treeston Date: Tue, 9 Jan 2018 23:55:57 +0100 Subject: 3dcd49e v2, slightly cheaper (cherry picked from commit b53cbf467b445a9b57a5567f88a26f77289f7fe1) --- src/server/game/Combat/ThreatManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/server') diff --git a/src/server/game/Combat/ThreatManager.cpp b/src/server/game/Combat/ThreatManager.cpp index 63606ddb307..b6d6e7ffe7c 100644 --- a/src/server/game/Combat/ThreatManager.cpp +++ b/src/server/game/Combat/ThreatManager.cpp @@ -342,10 +342,10 @@ void ThreatManager::AddThreat(Unit* target, float amount, SpellInfo const* spell if (!redirInfo.empty()) { float const origAmount = amount; - // intentional copy - there's a nested AddThreat call further down that might cause AI calls which cast spells - auto const redirects = redirInfo; - for (auto const& pair : redirects) // (victim,pct) + // intentional iteration by index - there's a nested AddThreat call further down that might cause AI calls which might modify redirect info through spells + for (size_t i=0; i