Core/Pet: Add assert

Add additional assert to check if it's possible for a Pet not to have an active AI when the Player owner kills an enemy.
Ref #23036

(cherry picked from commit 43dec9e4d0)
This commit is contained in:
jackpoz
2019-02-16 19:06:56 +01:00
committed by Shauren
parent 0ea3fe545c
commit ef04a26bf4
+1 -1
View File
@@ -10483,7 +10483,7 @@ void Unit::SetMeleeAnimKitId(uint16 animKitId)
{
Pet* pet = player->GetPet();
if (pet && pet->IsAlive() && pet->isControlled())
pet->AI()->KilledUnit(victim);
ASSERT_NOTNULL(pet->AI())->KilledUnit(victim);
}
// 10% durability loss on death