diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 807a1b75..a9ba102b 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2026,7 +2026,7 @@ namespace TShockAPI if (TShock.Players[id] == null) return true; - if (dmg > TShock.Config.MaxDamage) + if (dmg > TShock.Config.MaxDamage && !args.Player.Group.HasPermission(Permissions.ignoredamagecap)) { args.Player.Disable(String.Format("Player damage exceeded {0}", TShock.Config.MaxDamage ) ); args.Player.SendData(PacketTypes.PlayerHp, "", id); @@ -2079,7 +2079,7 @@ namespace TShockAPI if (Main.npc[id] == null) return true; - if (dmg > TShock.Config.MaxDamage) + if (dmg > TShock.Config.MaxDamage && !args.Player.Group.HasPermission(Permissions.ignoredamagecap)) { args.Player.Disable(String.Format("NPC damage exceeded {0}", TShock.Config.MaxDamage ) ); args.Player.SendData(PacketTypes.NpcUpdate, "", id); diff --git a/TShockAPI/Permissions.cs b/TShockAPI/Permissions.cs index 93df1ca0..06421b93 100644 --- a/TShockAPI/Permissions.cs +++ b/TShockAPI/Permissions.cs @@ -63,6 +63,9 @@ namespace TShockAPI [Description("Prevents you from being kicked by hacked health detection")] public static readonly string ignorestathackdetection; + [Description("Prevents your attacks from being ignored if your damage is too high")] public static readonly string + ignoredamagecap; + [Description("Specific log messages are sent to users with this permission")] public static readonly string logs; [Description("Allows you to bypass the max slots for up to 5 slots above your max")] public static readonly string