diff options
Diffstat (limited to 'src/game/ThreatManager.cpp')
-rw-r--r-- | src/game/ThreatManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp index 05d8c70da60..b9711b8a2e7 100644 --- a/src/game/ThreatManager.cpp +++ b/src/game/ThreatManager.cpp @@ -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) |