Allow players to ignore the damage caps.
This commit is contained in:
parent
e06588a8de
commit
564d5f0cb1
2 changed files with 5 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue