HackedHealth method now takes in TSPlayer instead of int
This commit is contained in:
parent
c2d8461fb8
commit
5a0b00b398
1 changed files with 6 additions and 6 deletions
|
|
@ -361,7 +361,7 @@ namespace TShockAPI
|
|||
Log.Info(string.Format("{0} ({1}) from '{2}' group joined.", player.Name, player.IP, player.Group.Name));
|
||||
|
||||
Tools.ShowFileToUser(player, "motd.txt");
|
||||
if (HackedHealth(who))
|
||||
if (HackedHealth(player))
|
||||
{
|
||||
Tools.HandleCheater(player, "Hacked health.");
|
||||
}
|
||||
|
|
@ -538,12 +538,12 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
public static bool HackedHealth(int ply)
|
||||
public static bool HackedHealth(TSPlayer player)
|
||||
{
|
||||
return (Main.player[ply].statManaMax > 200) ||
|
||||
(Main.player[ply].statMana > 200) ||
|
||||
(Main.player[ply].statLifeMax > 400) ||
|
||||
(Main.player[ply].statLife > 400);
|
||||
return (player.TPlayer.statManaMax > 200) ||
|
||||
(player.TPlayer.statMana > 200) ||
|
||||
(player.TPlayer.statLifeMax > 400) ||
|
||||
(player.TPlayer.statLife > 400);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue