Added Moon Lord to SpawnBoss
This commit is contained in:
parent
e4722c8c2f
commit
1ab66128ab
2 changed files with 10 additions and 4 deletions
|
|
@ -2014,7 +2014,7 @@ namespace TShockAPI
|
|||
{
|
||||
case "*":
|
||||
case "all":
|
||||
int[] npcIds = { 4, 13, 35, 50, 125, 126, 127, 134, 222, 245, 262, 266, 370 };
|
||||
int[] npcIds = { 4, 13, 35, 50, 125, 126, 127, 134, 222, 245, 262, 266, 370, 398 };
|
||||
TSPlayer.Server.SetTime(false, 0.0);
|
||||
foreach (int i in npcIds)
|
||||
{
|
||||
|
|
@ -2057,7 +2057,6 @@ namespace TShockAPI
|
|||
return;
|
||||
case "golem":
|
||||
npc.SetDefaults(245);
|
||||
TSPlayer.Server.SetTime(false, 0.0);
|
||||
TSPlayer.Server.SpawnNPC(npc.type, npc.name, amount, args.Player.TileX, args.Player.TileY);
|
||||
TSPlayer.All.SendSuccessMessage("{0} has spawned Golem {1} time(s).", args.Player.Name, amount);
|
||||
return;
|
||||
|
|
@ -2082,7 +2081,6 @@ namespace TShockAPI
|
|||
case "queen":
|
||||
case "queen bee":
|
||||
npc.SetDefaults(222);
|
||||
TSPlayer.Server.SetTime(false, 0.0);
|
||||
TSPlayer.Server.SpawnNPC(npc.type, npc.name, amount, args.Player.TileX, args.Player.TileY);
|
||||
TSPlayer.All.SendSuccessMessage("{0} has spawned Queen Bee {1} time(s).", args.Player.Name, amount);
|
||||
return;
|
||||
|
|
@ -2115,6 +2113,12 @@ namespace TShockAPI
|
|||
NPC.SpawnWOF(new Vector2(args.Player.X, args.Player.Y));
|
||||
TSPlayer.All.SendSuccessMessage("{0} has spawned the Wall of Flesh.", args.Player.Name);
|
||||
return;
|
||||
case "moon":
|
||||
case "moon lord":
|
||||
npc.SetDefaults(398);
|
||||
TSPlayer.Server.SpawnNPC(npc.type, npc.name, amount, args.Player.TileX, args.Player.TileY);
|
||||
TSPlayer.All.SendSuccessMessage("{0} has spawned the Moon Lord {1} time(s).", args.Player.Name, amount);
|
||||
return;
|
||||
default:
|
||||
args.Player.SendErrorMessage("Invalid boss type!");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -243,6 +243,9 @@ namespace TShockAPI
|
|||
return found;
|
||||
}
|
||||
|
||||
//Random should not be generated in a method
|
||||
Random r = new Random();
|
||||
|
||||
/// <summary>
|
||||
/// Gets a random clear tile in range
|
||||
/// </summary>
|
||||
|
|
@ -264,7 +267,6 @@ namespace TShockAPI
|
|||
tileY = startTileY;
|
||||
break;
|
||||
}
|
||||
Random r = new Random();
|
||||
tileX = startTileX + r.Next(tileXRange*-1, tileXRange);
|
||||
tileY = startTileY + r.Next(tileYRange*-1, tileYRange);
|
||||
j++;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue