3.3.5 threat assert (#23034)

* Core/Creature: Change assert about Threat to log

(cherry picked from commit cb8ff7976b)
This commit is contained in:
Giacomo Pozzoni
2019-02-15 20:03:26 +01:00
committed by Shauren
parent 24f9b41622
commit 31dca39c05

View File

@@ -2440,7 +2440,12 @@ void Creature::CallForHelp(float radius)
target = GetThreatManager().GetAnyTarget();
if (!target)
target = GetCombatManager().GetAnyTarget();
ASSERT(target, "Creature %u (%s) is engaged without threat list", GetEntry(), GetName().c_str());
if (!target)
{
TC_LOG_ERROR("entities.unit", "Creature %u (%s) is engaged without threat list", GetEntry(), GetName().c_str());
return;
}
Trinity::CallOfHelpCreatureInRangeDo u_do(this, target, radius);
Trinity::CreatureWorker<Trinity::CallOfHelpCreatureInRangeDo> worker(this, u_do);