mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Core/Pet: Change assert to error log
Change assert added in 43dec9e4d0 to error log since charmed creatures lose their AI until next map update
This commit is contained in:
@@ -10943,7 +10943,12 @@ bool Unit::InitTamedPet(Pet* pet, uint8 level, uint32 spell_id)
|
||||
{
|
||||
Pet* pet = player->GetPet();
|
||||
if (pet && pet->IsAlive() && pet->isControlled())
|
||||
ASSERT_NOTNULL(pet->AI())->KilledUnit(victim);
|
||||
{
|
||||
if (pet->IsAIEnabled())
|
||||
pet->AI()->KilledUnit(victim);
|
||||
else
|
||||
TC_LOG_ERROR("entities.unit", "Pet doesn't have any AI in Unit::Kill(). %s", pet->GetDebugInfo());
|
||||
}
|
||||
}
|
||||
|
||||
// 10% durability loss on death
|
||||
|
||||
Reference in New Issue
Block a user