Update player exploit patched
This commit is contained in:
parent
100d7d10f3
commit
1e1216f090
2 changed files with 92 additions and 83 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -45,11 +45,12 @@
|
|||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="TerrariaServer">
|
||||
<HintPath>..\TerrariaServer.exe</HintPath>
|
||||
<HintPath>.\TerrariaServer.exe</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="TerrariaServerAPI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\Program Files (x86)\Steam\steamapps\common\terraria\TerrariaServerAPI.dll</HintPath>
|
||||
<Reference Include="TerrariaServerAPI">
|
||||
<HintPath>.\TerrariaServerAPI.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
@ -68,7 +69,8 @@
|
|||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>$(SolutionDir)\myass.bat</PostBuildEvent>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue