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 (Main.netMode != 2) { return; }
|
||||||
if (e.MsgID == 17)
|
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)))
|
using (var br = new BinaryReader(new MemoryStream(e.Msg.readBuffer, e.Index, e.Length)))
|
||||||
{
|
{
|
||||||
type = br.ReadByte();
|
byte type = br.ReadByte();
|
||||||
x = br.ReadInt32();
|
int x = br.ReadInt32();
|
||||||
y = br.ReadInt32();
|
int y = br.ReadInt32();
|
||||||
}
|
|
||||||
if (type == 0 && BlacklistTiles[Main.tile[x, y].type] && Main.player[e.Msg.whoAmI].active)
|
if (type == 0 && BlacklistTiles[Main.tile[x, y].type] && Main.player[e.Msg.whoAmI].active)
|
||||||
{
|
{
|
||||||
players[e.Msg.whoAmI].tileThreshold++;
|
players[e.Msg.whoAmI].tileThreshold++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -182,6 +180,15 @@ namespace TShockAPI
|
||||||
Tools.Kick(e.Msg.whoAmI, "Spawn NPC abuse");
|
Tools.Kick(e.Msg.whoAmI, "Spawn NPC abuse");
|
||||||
e.Handled = true;
|
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)
|
else if (e.MsgID == 0x10)
|
||||||
{
|
{
|
||||||
byte ply;
|
byte ply;
|
||||||
|
|
|
||||||
|
|
@ -45,11 +45,12 @@
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="TerrariaServer">
|
<Reference Include="TerrariaServer">
|
||||||
<HintPath>..\TerrariaServer.exe</HintPath>
|
<HintPath>.\TerrariaServer.exe</HintPath>
|
||||||
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="TerrariaServerAPI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
<Reference Include="TerrariaServerAPI">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>.\TerrariaServerAPI.dll</HintPath>
|
||||||
<HintPath>..\..\Program Files (x86)\Steam\steamapps\common\terraria\TerrariaServerAPI.dll</HintPath>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
@ -68,7 +69,8 @@
|
||||||
</PreBuildEvent>
|
</PreBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PostBuildEvent>$(SolutionDir)\myass.bat</PostBuildEvent>
|
<PostBuildEvent>
|
||||||
|
</PostBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue