Improve HealOtherPlayer 0.2 check
Since this check is based on damage and healing amount is based on 20% of the damage, it makes more sense to skip the check if the player has ignoredamagecap (trustedadmin and higher).
This commit is contained in:
parent
563c439aee
commit
10318f032a
1 changed files with 3 additions and 0 deletions
|
|
@ -1605,10 +1605,13 @@ namespace TShockAPI
|
|||
// and the healing you can do with that is 20% of your damage.
|
||||
if (amount >= TShock.Config.Settings.MaxDamage * 0.2)
|
||||
{
|
||||
if (!args.Player.HasPermission(Permissions.ignoredamagecap)
|
||||
{
|
||||
TShock.Log.ConsoleDebug("Bouncer / OnHealOtherPlayer 0.2 check from {0}", args.Player.Name);
|
||||
args.Player.Disable("HealOtherPlayer cheat attempt!", DisableFlags.WriteToLogAndConsole);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (args.Player.HealOtherThreshold >= TShock.Config.Settings.HealOtherThreshold)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue