Fix /spawnmob not spawning negative IDs again.
This commit is contained in:
parent
331eeb8cec
commit
9ad63c37a6
2 changed files with 2 additions and 7 deletions
|
|
@ -2300,7 +2300,7 @@ namespace TShockAPI
|
||||||
var npc = npcs[0];
|
var npc = npcs[0];
|
||||||
if (npc.type >= 1 && npc.type < Main.maxNPCTypes && npc.type != 113)
|
if (npc.type >= 1 && npc.type < Main.maxNPCTypes && npc.type != 113)
|
||||||
{
|
{
|
||||||
TSPlayer.Server.SpawnNPC(npc.type, npc.FullName, amount, args.Player.TileX, args.Player.TileY, 50, 20);
|
TSPlayer.Server.SpawnNPC(npc.netID, npc.FullName, amount, args.Player.TileX, args.Player.TileY, 50, 20);
|
||||||
if (args.Silent)
|
if (args.Silent)
|
||||||
{
|
{
|
||||||
args.Player.SendSuccessMessage("Spawned {0} {1} time(s).", npc.FullName, amount);
|
args.Player.SendSuccessMessage("Spawned {0} {1} time(s).", npc.FullName, amount);
|
||||||
|
|
|
||||||
|
|
@ -152,12 +152,7 @@ namespace TShockAPI
|
||||||
int spawnTileY;
|
int spawnTileY;
|
||||||
TShock.Utils.GetRandomClearTileWithInRange(startTileX, startTileY, tileXRange, tileYRange, out spawnTileX,
|
TShock.Utils.GetRandomClearTileWithInRange(startTileX, startTileY, tileXRange, tileYRange, out spawnTileX,
|
||||||
out spawnTileY);
|
out spawnTileY);
|
||||||
int npcid = NPC.NewNPC(spawnTileX * 16, spawnTileY * 16, type, 0);
|
NPC.NewNPC(spawnTileX * 16, spawnTileY * 16, type);
|
||||||
|
|
||||||
// TODO: If special slimes break look at the git blame for this spot
|
|
||||||
// It's probably because I removed something that didn't work
|
|
||||||
Main.npc[npcid].SetDefaults(type);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue