Updated NPC and Item methods for the new items.
This commit is contained in:
parent
daf56053c8
commit
ff5c47a57c
2 changed files with 5 additions and 5 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue