Merge branch 'azerothcore:master' into Playerbot

This commit is contained in:
ZhengPeiRu21
2022-05-23 09:04:16 -06:00
committed by GitHub
67 changed files with 339 additions and 201 deletions
+7
View File
@@ -406,6 +406,13 @@ ThreatMgr::ThreatMgr(Unit* owner) : iCurrentVictim(nullptr), iOwner(owner), iUpd
{
}
void ThreatMgr::ClearAllThreat()
{
if (iOwner->CanHaveThreatList() && !isThreatListEmpty())
iOwner->SendClearThreatListOpcode();
clearReferences();
}
//============================================================
void ThreatMgr::clearReferences()
+2
View File
@@ -236,6 +236,8 @@ public:
// -- compatibility layer for combat rewrite
void ResetAllThreat() { resetAllAggro(); }
void ClearAllThreat();
// Reset all aggro of unit in threadlist satisfying the predicate.
template<class PREDICATE> void resetAggro(PREDICATE predicate)
{