diff options
author | thenecromancer <none@none> | 2010-01-21 16:25:09 +0100 |
---|---|---|
committer | thenecromancer <none@none> | 2010-01-21 16:25:09 +0100 |
commit | 76102c1cdd0fc8bb473f9b3fd3965cea5a3794f6 (patch) | |
tree | 39d67aec6ba7d1008dd01529e7c27b1e92721919 /src/game/HostilRefManager.cpp | |
parent | 3b29a4e6f47b3fccfd05e8ebf707c1b425c8c2da (diff) |
Change temp threat aura mods to use temp threat modifier instead of "asisting" it's threat value over all references.
--HG--
branch : trunk
Diffstat (limited to 'src/game/HostilRefManager.cpp')
-rw-r--r-- | src/game/HostilRefManager.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/game/HostilRefManager.cpp b/src/game/HostilRefManager.cpp index e3fdcf4fb4e..8da2e566d24 100644 --- a/src/game/HostilRefManager.cpp +++ b/src/game/HostilRefManager.cpp @@ -53,6 +53,27 @@ void HostilRefManager::threatAssist(Unit *pVictim, float fThreat, SpellEntry con //================================================= +void HostilRefManager::addTempThreat(float fThreat, bool apply) +{ + HostilReference* ref = getFirst(); + + while(ref != NULL) + { + if (apply) + { + if (ref->getTempThreatModifier() == 0.0f) + ref->addTempThreat(fThreat); + } + else + ref->resetTempThreat(); + + ref = ref->next(); + } +} + + +//================================================= + void HostilRefManager::addThreatPercent(int32 iPercent) { HostilReference* ref; |