diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 1dac0977..3e7afd5c 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -149,18 +149,16 @@ namespace TShockAPI if (Main.netMode != 2) { return; } if (e.MsgID == 17) { - byte type; - int x = 0; - int y = 0; using (var br = new BinaryReader(new MemoryStream(e.Msg.readBuffer, e.Index, e.Length))) { - type = br.ReadByte(); - x = br.ReadInt32(); - y = br.ReadInt32(); - } - if (type == 0 && BlacklistTiles[Main.tile[x, y].type] && Main.player[e.Msg.whoAmI].active) - { - players[e.Msg.whoAmI].tileThreshold++; + byte type = br.ReadByte(); + int x = br.ReadInt32(); + int y = br.ReadInt32(); + + if (type == 0 && BlacklistTiles[Main.tile[x, y].type] && Main.player[e.Msg.whoAmI].active) + { + players[e.Msg.whoAmI].tileThreshold++; + } } return; } @@ -182,6 +180,15 @@ namespace TShockAPI Tools.Kick(e.Msg.whoAmI, "Spawn NPC abuse"); e.Handled = true; } + else if (e.MsgID == 0x0D) //Update Player + { + byte plr = e.Msg.readBuffer[e.Index]; + if (plr != e.Msg.whoAmI) + { + Tools.Kick(e.Msg.whoAmI, "Update Player abuse"); + e.Handled = true; + } + } else if (e.MsgID == 0x10) { byte ply; diff --git a/TShockAPI/TShockAPI.csproj b/TShockAPI/TShockAPI.csproj index 3e0daba2..11aebcc5 100644 --- a/TShockAPI/TShockAPI.csproj +++ b/TShockAPI/TShockAPI.csproj @@ -1,80 +1,82 @@ - - - - Debug - AnyCPU - 8.0.30703 - 2.0 - {49606449-072B-4CF5-8088-AA49DA586694} - Library - Properties - TShockAPI - TShockAPI - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - .\Newtonsoft.Json.dll - - - - - - - - - - ..\TerrariaServer.exe - - - False - ..\..\Program Files (x86)\Steam\steamapps\common\terraria\TerrariaServerAPI.dll - - - - - - - - - - - - - - - - - - - $(SolutionDir)\myass.bat - + + + + Debug + AnyCPU + 8.0.30703 + 2.0 + {49606449-072B-4CF5-8088-AA49DA586694} + Library + Properties + TShockAPI + TShockAPI + v4.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + .\Newtonsoft.Json.dll + + + + + + + + + + .\TerrariaServer.exe + False + + + .\TerrariaServerAPI.dll + False + + + + + + + + + + + + + + + + + + + + + + --> \ No newline at end of file