*Fix misdirection.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-17 20:07:25 -06:00
parent 5244d4986a
commit ac5bf63acd
6 changed files with 35 additions and 10 deletions
+8
View File
@@ -357,6 +357,14 @@ void ThreatManager::addThreat(Unit* pVictim, float pThreat, SpellSchoolMask scho
float threat = ThreatCalcHelper::calcThreat(pVictim, iOwner, pThreat, schoolMask, pThreatSpell);
if(pVictim->GetReducedThreatPercent())
{
float reducedThreat = threat * pVictim->GetReducedThreatPercent() / 100;
threat -= reducedThreat;
if(pVictim->GetMisdirectionTarget())
iThreatContainer.addThreat(pVictim->GetMisdirectionTarget(), reducedThreat);
}
HostilReference* ref = iThreatContainer.addThreat(pVictim, threat);
// Ref is not in the online refs, search the offline refs next
if(!ref)