Health and Mana hacks now kick, since there is no option for recovery.

This commit is contained in:
Zidonuke 2011-12-27 14:40:40 -05:00
parent 23ddd4e891
commit 0763dce4e6
2 changed files with 7 additions and 11 deletions

View file

@ -157,9 +157,10 @@ namespace TShockAPI
int cur = args.Data.ReadInt16();
int max = args.Data.ReadInt16();
if (cur > 600 || max > 600)
if (cur > 500 || max > 500)
{
args.Player.IgnoreActionsForCheating = true;
TShock.Utils.ForceKick(args.Player, "You have Hacked Health/Mana, Please use a different character.");
return false;
}
if (args.Player.IsLoggedIn)
@ -176,9 +177,9 @@ namespace TShockAPI
int cur = args.Data.ReadInt16();
int max = args.Data.ReadInt16();
if (cur > 600 || max > 600)
if (cur > 500 || max > 500)
{
args.Player.IgnoreActionsForCheating = true;
TShock.Utils.ForceKick(args.Player, "You have Hacked Health/Mana, Please use a different character.");
}
return false;
@ -616,11 +617,7 @@ namespace TShockAPI
float distance = Vector2.Distance(new Vector2((pos.X / 16f), (pos.Y / 16f)), new Vector2(Main.spawnTileX, Main.spawnTileY));
if (TShock.CheckIgnores(args.Player) && distance > 6f)
{
if (args.Player.IgnoreActionsForCheating)
{
args.Player.SendMessage("You have been disabled for cheating! Please login with a new character!", Color.Red);
}
else if (TShock.Config.RequireLogin && !args.Player.IsLoggedIn)
if (TShock.Config.RequireLogin && !args.Player.IsLoggedIn)
{
args.Player.SendMessage("Please /register or /login to play!", Color.Red);
}

View file

@ -749,8 +749,7 @@ namespace TShockAPI
TShock.Utils.ShowFileToUser(player, "motd.txt");
if (HackedHealth(player))
{
player.IgnoreActionsForCheating = true;
player.SendMessage("You are using a health/mana cheat. Please choose a different character.");
TShock.Utils.ForceKick(player, "You have Hacked Health/Mana, Please use a different character.");
}
if (HackedInventory(player))