From 24f8b2b994bb22f460bf304936cfc8a57e1c1220 Mon Sep 17 00:00:00 2001 From: Sebastian Valle Date: Tue, 3 Sep 2013 15:09:37 -0500 Subject: Core/Misc: Fixed some more issues found by code analysis tools. --- src/server/game/AI/CreatureAI.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/server/game/AI/CreatureAI.cpp') diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp index cbb79b47958..75a1488ed45 100644 --- a/src/server/game/AI/CreatureAI.cpp +++ b/src/server/game/AI/CreatureAI.cpp @@ -75,6 +75,8 @@ void CreatureAI::DoZoneInCombat(Creature* creature /*= NULL*/, float maxRangeToN } } + // Intended duplicated check, the code above this should select a victim + // If it can't find a suitable attack target then we should error out. if (!creature->HasReactState(REACT_PASSIVE) && !creature->GetVictim()) { TC_LOG_ERROR(LOG_FILTER_GENERAL, "DoZoneInCombat called for creature that has empty threat list (creature entry = %u)", creature->GetEntry()); -- cgit v1.2.3