Skip to content

Commit

Permalink
AI: Prevent crash when killing a guard with a gameobject (like a trap) (
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlikely4r authored Nov 12, 2024
1 parent ef58a4f commit 3f9e706
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/game/AI/ScriptDevAI/base/guard_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ void guardAI::Aggro(Unit* who)

void guardAI::JustDied(Unit* killer)
{
if (!killer)
return;

// Send Zone Under Attack message to the LocalDefense and WorldDefense Channels
if (Player* pPlayer = killer->GetBeneficiaryPlayer())
m_creature->SendZoneUnderAttackMessage(pPlayer);
Expand Down

0 comments on commit 3f9e706

Please sign in to comment.