Implement Handler.LandGolfBalInCupHandler and handle packet exploits.
Added multiple checks to prevent clients from sending the golfball packet directly, without having golf play actions.
This commit is contained in:
parent
26773f61a2
commit
4944ee3144
3 changed files with 120 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ namespace TShockAPI
|
|||
internal sealed class Bouncer
|
||||
{
|
||||
internal Handlers.SendTileSquareHandler STSHandler { get; set; }
|
||||
internal Handlers.LandGolfBallInCupHandler LandGolfBallInCupHandler { get; set; }
|
||||
|
||||
/// <summary>Constructor call initializes Bouncer and related functionality.</summary>
|
||||
/// <returns>A new Bouncer.</returns>
|
||||
|
|
@ -45,6 +46,9 @@ namespace TShockAPI
|
|||
STSHandler = new Handlers.SendTileSquareHandler();
|
||||
GetDataHandlers.SendTileSquare += STSHandler.OnReceiveSendTileSquare;
|
||||
|
||||
LandGolfBallInCupHandler = new Handlers.LandGolfBallInCupHandler();
|
||||
GetDataHandlers.LandGolfBallInCup += LandGolfBallInCupHandler.OnLandGolfBallInCup;
|
||||
|
||||
// Setup hooks
|
||||
GetDataHandlers.GetSection += OnGetSection;
|
||||
GetDataHandlers.PlayerUpdate += OnPlayerUpdate;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue