Send right id
This commit is contained in:
parent
55262e6108
commit
e868cc52e9
1 changed files with 7 additions and 5 deletions
|
|
@ -3632,7 +3632,7 @@ namespace TShockAPI
|
||||||
type = 168;
|
type = 168;
|
||||||
else if (args.Parameters[1].ToLower() == "blue")
|
else if (args.Parameters[1].ToLower() == "blue")
|
||||||
type = 169;
|
type = 169;
|
||||||
else if (args.Parameters[1].ToLower() == "yello")
|
else if (args.Parameters[1].ToLower() == "yellow")
|
||||||
type = 170;
|
type = 170;
|
||||||
}
|
}
|
||||||
var ply = players[0];
|
var ply = players[0];
|
||||||
|
|
@ -3646,12 +3646,13 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
if (args.Parameters.Count == 0)
|
if (args.Parameters.Count == 0)
|
||||||
{
|
{
|
||||||
foreach (Projectile p in Main.projectile)
|
for (int i = Main.projectile.Length - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
|
Projectile p = Main.projectile[i];
|
||||||
if (p != null && p.active)
|
if (p != null && p.active)
|
||||||
{
|
{
|
||||||
p.Kill();
|
p.Kill();
|
||||||
TSPlayer.All.SendData(PacketTypes.ProjectileDestroy, "", p.whoAmI);
|
TSPlayer.All.SendData(PacketTypes.ProjectileDestroy, "", i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3660,12 +3661,13 @@ namespace TShockAPI
|
||||||
int id;
|
int id;
|
||||||
if (int.TryParse(args.Parameters[0], out id))
|
if (int.TryParse(args.Parameters[0], out id))
|
||||||
{
|
{
|
||||||
foreach (Projectile p in Main.projectile)
|
for (int i = Main.projectile.Length-1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
|
Projectile p = Main.projectile[i];
|
||||||
if (p != null && p.active && p.type == id)
|
if (p != null && p.active && p.type == id)
|
||||||
{
|
{
|
||||||
p.Kill();
|
p.Kill();
|
||||||
TSPlayer.All.SendData(PacketTypes.ProjectileDestroy, "", p.whoAmI);
|
TSPlayer.All.SendData(PacketTypes.ProjectileDestroy, "", i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue