Fixes #1254
This commit is contained in:
parent
e3df970c50
commit
6ffb485803
1 changed files with 17 additions and 0 deletions
|
|
@ -1252,6 +1252,7 @@ namespace TShockAPI
|
|||
{ PacketTypes.MassWireOperation, HandleMassWireOperation },
|
||||
{ PacketTypes.GemLockToggle, HandleGemLockToggle },
|
||||
{ PacketTypes.CatchNPC, HandleCatchNpc },
|
||||
{ PacketTypes.KillPortal, HandleKillPortal },
|
||||
{ PacketTypes.ToggleParty, HandleToggleParty }
|
||||
};
|
||||
}
|
||||
|
|
@ -4017,6 +4018,22 @@ namespace TShockAPI
|
|||
return false;
|
||||
}
|
||||
|
||||
private static bool HandleKillPortal(GetDataHandlerArgs args)
|
||||
{
|
||||
short projectileIndex = args.Data.ReadInt16();
|
||||
|
||||
Projectile projectile = Main.projectile[projectileIndex];
|
||||
if (projectile != null && projectile.active)
|
||||
{
|
||||
if (projectile.owner != args.TPlayer.whoAmI)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static bool HandleToggleParty(GetDataHandlerArgs args)
|
||||
{
|
||||
if (args.Player != null && !args.Player.HasPermission(Permissions.toggleparty))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue