From 16f7c876e135a4e816438f05be363280cba702ec Mon Sep 17 00:00:00 2001 From: tru321 <84877585+tru321@users.noreply.github.com> Date: Wed, 8 Dec 2021 14:44:03 +0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Lucas Nicodemus --- TShockAPI/Bouncer.cs | 4 ++-- TShockAPI/GetDataHandlers.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index e8a2b43c..cdb4e3c6 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1843,7 +1843,7 @@ namespace TShockAPI byte style = args.Style; // if npc released outside allowed tile - if ( x >= Main.maxTilesX * 16 - 16 || x < 0 || y >= Main.maxTilesY * 16 - 16 || y < 0) + if (x >= Main.maxTilesX * 16 - 16 || x < 0 || y >= Main.maxTilesY * 16 - 16 || y < 0) { TShock.Log.ConsoleDebug("Bouncer / OnReleaseNPC rejected out of bounds from {0}", args.Player.Name); args.Handled = true; @@ -1860,7 +1860,7 @@ namespace TShockAPI // if released npc not from its item (from crafted packet) // e.g. using bunny item to release golden bunny - if(args.Player.TPlayer.lastVisualizedSelectedItem.makeNPC != type && args.Player.TPlayer.lastVisualizedSelectedItem.placeStyle != style) + if (args.Player.TPlayer.lastVisualizedSelectedItem.makeNPC != type && args.Player.TPlayer.lastVisualizedSelectedItem.placeStyle != style) { TShock.Log.ConsoleDebug("Bouncer / OnReleaseNPC rejected npc release from {0}", args.Player.Name); args.Player.Kick("Trying to release different critter exploit!", true); diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 4e1ae400..a3da07f8 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -1666,7 +1666,7 @@ namespace TShockAPI } /// - /// Called when player release a NPC, for checking critter released from item. + /// Called when player release a NPC, for checking critter released from item. /// public static HandlerList ReleaseNPC = new HandlerList(); private static bool OnReleaseNpc(TSPlayer player, MemoryStream data, int _x, int _y, short _type, byte _style)