mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-10-10 07:06:38 +08:00
fix(Core/GuardAI): crash when killer is null (#20100)
This commit is contained in:
@@ -60,6 +60,9 @@ void GuardAI::EnterEvadeMode(EvadeReason /*why*/)
|
||||
|
||||
void GuardAI::JustDied(Unit* killer)
|
||||
{
|
||||
if (!killer)
|
||||
return;
|
||||
|
||||
if (Player* player = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
me->SendZoneUnderAttackMessage(player);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user