Core/PetAI: Change an assert to a TC_LOG_ERROR

This commit is contained in:
Giacomo Pozzoni
2019-07-31 16:13:27 +02:00
parent 7fa990edc6
commit c3619f42a5

View File

@@ -487,7 +487,11 @@ bool PetAI::CanAttack(Unit* target)
return false;
}
ASSERT(me->GetCharmInfo());
if (!me->GetCharmInfo())
{
TC_LOG_ERROR("scripts.ai.petai", "me->GetCharmInfo() is NULL in PetAI::CanAttack(). Debug info: %s", GetDebugInfo().c_str());
return false;
}
// Passive - passive pets can attack if told to
if (me->HasReactState(REACT_PASSIVE))