*Fix a crash caused by misdirection.
--HG-- branch : trunk
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user