From f5b28a0b243be251678d6fa510520376ac5fe67f Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 21 Jan 2019 02:30:05 -0600 Subject: [PATCH] Filter invis NPC's in #killallnpcs --- zone/command.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/zone/command.cpp b/zone/command.cpp index 196a97463..8c64c44a4 100755 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -5260,7 +5260,15 @@ void command_killallnpcs(Client *c, const Seperator *sep) continue; } - if (entity->IsInvisible() || !entity->IsAttackAllowed(c)) { + bool is_not_attackable = + ( + entity->IsInvisible() || + !entity->IsAttackAllowed(c) || + entity->GetRace() == 127 || + entity->GetRace() == 240 + ); + + if (is_not_attackable) { continue; }