From 0b7fd55948ece9707a56b6311ab1c8c97c75bd38 Mon Sep 17 00:00:00 2001 From: Deathmax Date: Sun, 4 Dec 2011 23:10:30 +0800 Subject: [PATCH] Do not allow users to spawn WoF. --- TShockAPI/Commands.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index cec8a66e..49dd4a04 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -1096,11 +1096,13 @@ namespace TShockAPI else { var npc = npcs[0]; - if (npc.type >= 1 && npc.type < Main.maxNPCTypes) + if (npc.type >= 1 && npc.type < Main.maxNPCTypes && npc.type != 113) //Do not allow WoF to spawn, in certain conditions may cause loops in client { TSPlayer.Server.SpawnNPC(npc.type, npc.name, amount, args.Player.TileX, args.Player.TileY, 50, 20); TShock.Utils.Broadcast(string.Format("{0} was spawned {1} time(s).", npc.name, amount)); } + else if (npc.type == 113) + args.Player.SendMessage("Sorry, you can't spawn Wall of Flesh!"); // Maybe perhaps do something with WorldGen.SpawnWoF? else args.Player.SendMessage("Invalid mob type!", Color.Red); }