Fix items and NPCs not being searched for properly.

This commit is contained in:
Deathmax 2011-12-18 23:23:07 +08:00
parent 283dec89a0
commit 383633a823

View file

@ -248,7 +248,7 @@ namespace TShockAPI
}
//Method #2 - allows impartial matching
var found = new List<Item>();
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<NPC> 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);