*Fix a crash caused by misdirection.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-02-18 11:01:21 -06:00
parent 3ea5417336
commit 7bff1c1d60
+2 -1
View File
@@ -357,7 +357,8 @@ void ThreatManager::addThreat(Unit* pVictim, float pThreat, SpellSchoolMask scho
float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, pThreat, schoolMask, pThreatSpell); 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; float reducedThreat = threat * pVictim->GetReducedThreatPercent() / 100;
threat -= reducedThreat; threat -= reducedThreat;