aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2020-04-05 20:23:46 +0200
committerjackpoz <giacomopoz@gmail.com>2020-04-05 20:23:46 +0200
commit0844ad2ff00fef9fe90633eea3df8afc8a58e6d1 (patch)
treee7e90d67b2775a9b5c8fabeba61deec712add5e5 /src
parentcb41c8828fe450e78fad0300fe0cb154d57cae9f (diff)
Scripts/Guards: Fix spell cast spam after killing npc_air_force_bots guards
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/World/npcs_special.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp
index efa2e1fde2f..f1f7bc973cf 100644
--- a/src/server/scripts/World/npcs_special.cpp
+++ b/src/server/scripts/World/npcs_special.cpp
@@ -132,6 +132,10 @@ public:
if (!guard)
return;
+ // Keep the list of targets for later on when the guards will be alive
+ if (!guard->IsAlive())
+ return;
+
for (ObjectGuid guid : _toAttack)
{
Unit* target = ObjectAccessor::GetUnit(*me, guid);