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 committed Nov 12, 2024
1 parent dc062a5 commit 1d585be
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 @@ -54,6 +54,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 1d585be

Please sign in to comment.