aboutsummaryrefslogtreecommitdiff
path: root/src/game/ThreatManager.cpp
diff options
context:
space:
mode:
authorTrazom62 <none@none>2010-05-27 21:11:38 +0200
committerTrazom62 <none@none>2010-05-27 21:11:38 +0200
commit452675e500bddc0446a05c1bbb0b61aa366d361d (patch)
treea62189e5a1e27332055e43b805d260b04e57f9f9 /src/game/ThreatManager.cpp
parent73c627829f55743053c653a39378d3a833ed7622 (diff)
Fix Vigilance.
Implements Glyph of Vigilance. Fixes issue #1134. Thanks Bodompelle for the idea, even thought the fix is rather different. --HG-- branch : trunk
Diffstat (limited to 'src/game/ThreatManager.cpp')
-rw-r--r--src/game/ThreatManager.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp
index 3cf9f5d435d..d64cb96f510 100644
--- a/src/game/ThreatManager.cpp
+++ b/src/game/ThreatManager.cpp
@@ -384,9 +384,16 @@ void ThreatManager::addThreat(Unit* pVictim, float fThreat, SpellSchoolMask scho
// must check > 0.0f, otherwise dead loop
if (threat > 0.0f && pVictim->GetReducedThreatPercent())
{
- float reducedThreat = threat * pVictim->GetReducedThreatPercent() / 100;
+ uint32 reducedThreadPercent = pVictim->GetReducedThreatPercent();
+
+ Unit *unit = pVictim->GetMisdirectionTarget();
+ if (unit)
+ if (Aura* pAura = unit->GetAura(63326)) // Glyph of Vigilance
+ reducedThreadPercent += pAura->GetSpellProto()->EffectBasePoints[0];
+
+ float reducedThreat = threat * reducedThreadPercent / 100;
threat -= reducedThreat;
- if (Unit *unit = pVictim->GetMisdirectionTarget())
+ if (unit)
_addThreat(unit, reducedThreat);
}