Add bestiary handler

This commit is contained in:
Chris 2020-06-02 14:06:18 +09:30
parent 1c0a649a0c
commit 3b6a9ffcc2
3 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,28 @@
using System.IO;
namespace TShockAPI.Handlers.NetModules
{
/// <summary>
/// Rejects client->server bestiary net modules as the client should never send this to the server
/// </summary>
internal class BestiaryHandler : INetModuleHandler
{
/// <summary>
/// No deserialization needed. This should never be received by the server
/// </summary>
/// <param name="data"></param>
public void Deserialize(MemoryStream data)
{
}
/// <summary>
/// This should never be received by the server
/// </summary>
/// <param name="player"></param>
/// <param name="rejectPacket"></param>
public void HandlePacket(TSPlayer player, out bool rejectPacket)
{
rejectPacket = true;
}
}
}