aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-18 11:01:21 -0600
committermegamage <none@none>2009-02-18 11:01:21 -0600
commit7bff1c1d60b78ba78f2ab0a9c67bdde80427ea30 (patch)
treef7e130e4b18d1d80d8e92f3d88031a9dac257557 /src
parent3ea5417336b8bd271bb33e616c2dbdc6a2331734 (diff)
*Fix a crash caused by misdirection.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/ThreatManager.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp
index f093d06ad1b..ac124da6951 100644
--- a/src/game/ThreatManager.cpp
+++ b/src/game/ThreatManager.cpp
@@ -357,7 +357,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;