diff options
Diffstat (limited to 'src/game/ThreatManager.cpp')
-rw-r--r-- | src/game/ThreatManager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp index 8807dff64f8..111da6bff48 100644 --- a/src/game/ThreatManager.cpp +++ b/src/game/ThreatManager.cpp @@ -368,7 +368,8 @@ void ThreatManager::addThreat(Unit* pVictim, float pThreat, SpellSchoolMask scho float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, pThreat, schoolMask, pThreatSpell); - if(pVictim->GetReducedThreatPercent()) + // must check > 0.0f, otherwise dead loop + if(threat > 0.0f && pVictim->GetReducedThreatPercent()) { float reducedThreat = threat * pVictim->GetReducedThreatPercent() / 100; threat -= reducedThreat; @@ -511,3 +512,4 @@ bool ThreatManager::processThreatEvent(const UnitBaseEvent* pUnitBaseEvent) } return consumed; } + |