aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiacomo Pozzoni <giacomopoz@gmail.com>2019-02-15 20:03:26 +0100
committerGitHub <noreply@github.com>2019-02-15 20:03:26 +0100
commitcb8ff7976b1419c6a1334bb49783480d543aff16 (patch)
tree011f2ee8e013c8f32be3650fbfeb3f5587b1c1e7 /src
parentc79811de4fbf2b22cd74f55853516c7fc307055f (diff)
3.3.5 threat assert (#23034)
* Core/Creature: Change assert about Threat to log
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 66a2af3e655..6074cf0316c 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -2264,7 +2264,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);