From 383633a8230f8d6b326776f980b94d6752545d8e Mon Sep 17 00:00:00 2001 From: Deathmax Date: Sun, 18 Dec 2011 23:23:07 +0800 Subject: [PATCH] Fix items and NPCs not being searched for properly. --- TShockAPI/Utils.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index c62a4dc7..b1dd1445 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -248,7 +248,7 @@ namespace TShockAPI } //Method #2 - allows impartial matching var found = new List(); - for (int i = 1; i < Main.maxItemTypes; i++) + for (int i = -24; i < Main.maxItemTypes; i++) { try { @@ -284,7 +284,7 @@ namespace TShockAPI public List GetNPCByName(string name) { //Method #1 - must be exact match, allows support for different coloured slimes - for (int i = 1; i < Main.maxNPCTypes; i++) + for (int i = -17; i < Main.maxNPCTypes; i++) { NPC npc = new NPC(); npc.SetDefaults(name);