mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Combat: some more detailed assertions to possibly shed light on #21187.
This commit is contained in:
@@ -308,13 +308,13 @@ void CombatManager::PutReference(ObjectGuid const& guid, CombatReference* ref)
|
||||
if (ref->_isPvP)
|
||||
{
|
||||
auto& inMap = _pvpRefs[guid];
|
||||
ASSERT(!inMap && "Duplicate combat state detected - memory leak!");
|
||||
ASSERT(!inMap, "Duplicate combat state at %p being inserted for %s vs %s - memory leak!", ref, _owner->GetGUID().ToString().c_str(), guid.ToString().c_str());
|
||||
inMap = static_cast<PvPCombatReference*>(ref);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto& inMap = _pveRefs[guid];
|
||||
ASSERT(!inMap && "Duplicate combat state detected - memory leak!");
|
||||
ASSERT(!inMap, "Duplicate combat state at %p being inserted for %s vs %s - memory leak!", ref, _owner->GetGUID().ToString().c_str(), guid.ToString().c_str());
|
||||
inMap = ref;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -684,7 +684,7 @@ void ThreatManager::SendNewVictimToClients(ThreatReference const* victimRef) con
|
||||
void ThreatManager::PutThreatListRef(ObjectGuid const& guid, ThreatReference* ref)
|
||||
{
|
||||
auto& inMap = _myThreatListEntries[guid];
|
||||
ASSERT(!inMap && "Duplicate threat list entry being inserted - memory leak!");
|
||||
ASSERT(!inMap, "Duplicate threat reference at %p being inserted on %s for %s - memory leak!", ref, _owner->GetGUID().ToString().c_str(), guid.ToString().c_str());
|
||||
inMap = ref;
|
||||
ref->_handle = _sortedThreatList.push(ref);
|
||||
}
|
||||
@@ -708,7 +708,7 @@ void ThreatManager::PurgeThreatListRef(ObjectGuid const& guid, bool sendRemove)
|
||||
void ThreatManager::PutThreatenedByMeRef(ObjectGuid const& guid, ThreatReference* ref)
|
||||
{
|
||||
auto& inMap = _threatenedByMe[guid];
|
||||
ASSERT(!inMap && "Duplicate entry being inserted into threatened by me list - potential memory leak!");
|
||||
ASSERT(!inMap, "Duplicate threatened-by-me reference at %p being inserted on %s for %s - memory leak!", ref, _owner->GetGUID().ToString().c_str(), guid.ToString().c_str());
|
||||
inMap = ref;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user