Core/Combat: Some more sanity check asserts to try and track down #21187.

Also, some anti-annoyance treatment for dot tele.

(cherry picked from commit fdacf12739)
This commit is contained in:
Treeston
2018-01-06 01:40:31 +01:00
committed by Shauren
parent 2a7bb9b404
commit dce39aedc2
6 changed files with 16 additions and 3 deletions

View File

@@ -125,6 +125,12 @@ void PvPCombatReference::SuppressFor(Unit* who)
who->GetAI()->JustExitedCombat();
}
CombatManager::~CombatManager()
{
ASSERT(_pveRefs.empty(), "CombatManager::~CombatManager - %s: we still have %zu PvE combat references, one of them is with %s", _owner->GetGUID().ToString().c_str(), _pveRefs.size(), _pveRefs.begin()->first.ToString().c_str());
ASSERT(_pvpRefs.empty(), "CombatManager::~CombatManager - %s: we still have %zu PvP combat references, one of them is with %s", _owner->GetGUID().ToString().c_str(), _pvpRefs.size(), _pvpRefs.begin()->first.ToString().c_str());
}
void CombatManager::Update(uint32 tdiff)
{
auto it = _pvpRefs.begin(), end = _pvpRefs.end();