Did same kind of protection with mana

This commit is contained in:
Maverick Motherfucker 2011-06-02 21:35:58 -07:00
parent bb8cf74ec0
commit 79c0bddf5e

View file

@ -197,6 +197,21 @@ namespace TShockAPI
Tools.HandleCheater(ply);
}
}
else if (e.MsgID == 0x2a)
{
byte ply;
Int16 life, maxLife;
using (var br = new BinaryReader(new MemoryStream(e.Msg.readBuffer, e.Index, e.Length)))
{
ply = br.ReadByte();
life = br.ReadInt16();
maxLife = br.ReadInt16();
}
if (maxLife > Main.player[ply].statLifeMax + 20 || life > maxLife)
{
Tools.HandleCheater(ply);
}
}
}
void OnGreetPlayer(int who, HandledEventArgs e)