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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue