aboutsummaryrefslogtreecommitdiff
path: root/src/game/ThreatManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/ThreatManager.cpp')
-rw-r--r--src/game/ThreatManager.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/game/ThreatManager.cpp b/src/game/ThreatManager.cpp
index cf688cf163a..ad22ba6b5c1 100644
--- a/src/game/ThreatManager.cpp
+++ b/src/game/ThreatManager.cpp
@@ -537,3 +537,17 @@ bool ThreatManager::isNeedUpdateToClient(uint32 time)
return false;
}
+// Reset all aggro without modifying the threadlist.
+void ThreatManager::resetAllAggro()
+{
+ std::list<HostilReference*> &threatlist = getThreatList();
+ if (threatlist.empty())
+ return;
+
+ for (std::list<HostilReference*>::iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
+ {
+ (*itr)->setThreat(0);
+ }
+
+ setDirty(true);
+}