From ff5c47a57c5064f34d8a436071c9d9dcefa8ea84 Mon Sep 17 00:00:00 2001 From: Deathmax Date: Fri, 3 Jun 2011 10:57:43 +0800 Subject: [PATCH] Updated NPC and Item methods for the new items. --- TShockAPI/Commands.cs | 6 +++--- TShockAPI/TShock.cs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 9519e965..71032dc7 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -233,7 +233,7 @@ namespace TShockAPI if (!int.TryParse(inputtype, out type)) type = TShock.GetNPCID(inputtype); - if (type >= 1 && type <= 43) + if (type >= 1 && type <= 45) { for (int i = 0; i < amount; i++) npcid = NPC.NewNPC(x, y, type, 0); @@ -254,7 +254,7 @@ namespace TShockAPI int type = 0; if (!int.TryParse(msgargs, out type)) type = TShock.GetItemID(msgargs); - if (type >= 1 && type <= 235) + if (type >= 1 && type <= 238) { for (int i = 0; i < 40; i++) { @@ -290,7 +290,7 @@ namespace TShockAPI int player = -1; if (!int.TryParse(msgargs[1], out type)) type = TShock.GetItemID(msgargs[1]); - if (type >= 1 && type <= 235) + if (type >= 1 && type <= 238) { player = Tools.FindPlayer(msgargs[2]); if (player != -1) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 87b11fe0..9317f28a 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -430,7 +430,7 @@ namespace TShockAPI public static int GetNPCID(string name, bool exact = false) { NPC npc = new NPC(); - for (int i = 1; i <= 43; i++) + for (int i = 1; i <= 45; i++) { if (exact) { @@ -455,7 +455,7 @@ namespace TShockAPI { Item item = new Item(); name = name.ToLower(); - for (int i = 1; i <= 235; i++) + for (int i = 1; i <= 238; i++) { item.SetDefaults(i); if (item.name.ToLower().StartsWith(name))