Removed killFriendly from Butcher
Upon further inspection, friendly NPCs are non-existent as far as actually being set in game goes. Maybe this was originally supposed to denote a removed NPC type or a town npc?
This commit is contained in:
parent
c84f2b6055
commit
bccb4b4e4e
1 changed files with 2 additions and 6 deletions
|
|
@ -3109,14 +3109,10 @@ namespace TShockAPI
|
|||
{
|
||||
if (args.Parameters.Count > 2)
|
||||
{
|
||||
args.Player.SendMessage("Invalid syntax! Proper syntax: /butcher [killFriendly(true/false)] [killTownNPCs(true/false)]", Color.Red);
|
||||
args.Player.SendMessage("Invalid syntax! Proper syntax: /butcher [killTownNPCs(true/false)]", Color.Red);
|
||||
return;
|
||||
}
|
||||
|
||||
bool killFriendly = true;
|
||||
if (args.Parameters.Count == 1)
|
||||
bool.TryParse(args.Parameters[0], out killFriendly);
|
||||
|
||||
bool killTownNPCs = false;
|
||||
if (args.Parameters.Count == 2)
|
||||
bool.TryParse(args.Parameters[1], out killTownNPCs);
|
||||
|
|
@ -3124,7 +3120,7 @@ namespace TShockAPI
|
|||
int killcount = 0;
|
||||
for (int i = 0; i < Main.npc.Length; i++)
|
||||
{
|
||||
if (Main.npc[i].active && Main.npc[i].type != 0 && (!Main.npc[i].townNPC || killTownNPCs) && (!Main.npc[i].friendly || killFriendly))
|
||||
if (Main.npc[i].active && Main.npc[i].type != 0 && (!Main.npc[i].townNPC || killTownNPCs))
|
||||
{
|
||||
TSPlayer.Server.StrikeNPC(i, 99999, 90f, 1);
|
||||
killcount++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue