aboutsummaryrefslogtreecommitdiff
path: root/src/game/HostilRefManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/HostilRefManager.cpp')
-rw-r--r--src/game/HostilRefManager.cpp21
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;