mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-18 06:00:10 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user