From 10318f032a894e38be27ec9ef00a5eda7be273bb Mon Sep 17 00:00:00 2001 From: stacey <57187883+moisterrific@users.noreply.github.com> Date: Wed, 12 May 2021 12:09:11 -0400 Subject: [PATCH] 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). --- TShockAPI/Bouncer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index c2ea252e..e61019df 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -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)