diff options
author | megamage <none@none> | 2009-02-18 11:01:21 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-02-18 11:01:21 -0600 |
commit | 7bff1c1d60b78ba78f2ab0a9c67bdde80427ea30 (patch) | |
tree | f7e130e4b18d1d80d8e92f3d88031a9dac257557 /src/game/ThreatManager.cpp | |
parent | 3ea5417336b8bd271bb33e616c2dbdc6a2331734 (diff) |
*Fix a crash caused by misdirection.
--HG--
branch : trunk
Diffstat (limited to 'src/game/ThreatManager.cpp')
-rw-r--r-- | src/game/ThreatManager.cpp | 3 |
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; |