Renamed TSPlayer.CheckIgnores() -> TSPlayer.IsBeingDisabled()
Since all of the flags it was checking have been demystified, this is pretty self explanatory now.
This commit is contained in:
parent
8e5ee7d286
commit
97f48d6d41
4 changed files with 31 additions and 28 deletions
|
|
@ -69,7 +69,7 @@ namespace TShockAPI
|
|||
/// <param name="args">The packet arguments that the event has.</param>
|
||||
internal void OnPlaceItemFrame(object sender, GetDataHandlers.PlaceItemFrameEventArgs args)
|
||||
{
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
NetMessage.SendData((int)PacketTypes.UpdateTileEntity, -1, -1, NetworkText.Empty, args.ItemFrame.ID, 0, 1);
|
||||
args.Handled = true;
|
||||
|
|
@ -108,7 +108,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Handled = true;
|
||||
return;
|
||||
|
|
@ -126,7 +126,7 @@ namespace TShockAPI
|
|||
/// <param name="args">The packet arguments that the event has.</param>
|
||||
internal void OnPlaceTileEntity(object sender, GetDataHandlers.PlaceTileEntityEventArgs args)
|
||||
{
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Handled = true;
|
||||
return;
|
||||
|
|
@ -177,7 +177,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Handled = true;
|
||||
return;
|
||||
|
|
@ -196,7 +196,7 @@ namespace TShockAPI
|
|||
/// <param name="args">args</param>
|
||||
internal void OnPlayerAnimation(object sender, GetDataHandlers.PlayerAnimationEventArgs args)
|
||||
{
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendData(PacketTypes.PlayerAnimation, "", args.Player.Index);
|
||||
args.Handled = true;
|
||||
|
|
@ -245,7 +245,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendData(PacketTypes.NpcUpdate, "", id);
|
||||
args.Handled = true;
|
||||
|
|
@ -311,7 +311,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendData(PacketTypes.PlayerHp, "", id);
|
||||
args.Player.SendData(PacketTypes.PlayerUpdate, "", id);
|
||||
|
|
@ -421,7 +421,7 @@ namespace TShockAPI
|
|||
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendData(PacketTypes.ItemDrop, "", id);
|
||||
args.Handled = true;
|
||||
|
|
@ -444,7 +444,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendData(PacketTypes.PlayerAddBuff, "", id);
|
||||
args.Handled = true;
|
||||
|
|
@ -503,7 +503,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendData(PacketTypes.ChestItem, "", id, slot);
|
||||
args.Handled = true;
|
||||
|
|
@ -558,7 +558,7 @@ namespace TShockAPI
|
|||
/// <param name="args">The packet arguments that the event has.</param>
|
||||
internal void OnChestOpen(object sender, GetDataHandlers.ChestOpenEventArgs args)
|
||||
{
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Handled = true;
|
||||
return;
|
||||
|
|
@ -595,7 +595,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendTileSquare(tileX, tileY, 3);
|
||||
args.Handled = true;
|
||||
|
|
@ -656,7 +656,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendTileSquare(tileX, tileY, 1);
|
||||
args.Handled = true;
|
||||
|
|
@ -791,7 +791,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.RemoveProjectile(args.ProjectileIdentity, args.ProjectileOwner);
|
||||
args.Handled = true;
|
||||
|
|
@ -841,7 +841,7 @@ namespace TShockAPI
|
|||
float distance = Vector2.Distance(new Vector2(pos.X / 16f, pos.Y / 16f),
|
||||
new Vector2(args.Player.LastNetPosition.X / 16f, args.Player.LastNetPosition.Y / 16f));
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
// If the player has moved outside the disabled zone...
|
||||
if (distance > TShock.Config.MaxRangeForDisabled)
|
||||
|
|
@ -982,7 +982,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.RemoveProjectile(ident, owner);
|
||||
args.Handled = true;
|
||||
|
|
@ -1115,7 +1115,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendTileSquare(x, y, 4);
|
||||
args.Handled = true;
|
||||
|
|
@ -1470,7 +1470,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||
args.Handled = true;
|
||||
|
|
@ -1586,7 +1586,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores() || args.Player.IsBouncerThrottled())
|
||||
if (args.Player.IsBeingDisabled() || args.Player.IsBouncerThrottled())
|
||||
{
|
||||
args.Handled = true;
|
||||
return;
|
||||
|
|
@ -1627,7 +1627,7 @@ namespace TShockAPI
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.Player.CheckIgnores())
|
||||
if (args.Player.IsBeingDisabled())
|
||||
{
|
||||
args.Player.SendTileSquare(tileX, tileY, size);
|
||||
args.Handled = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue