Allow players to ignore the damage caps.

This commit is contained in:
Deathmax 2012-01-19 22:10:34 +08:00
parent e06588a8de
commit 564d5f0cb1
2 changed files with 5 additions and 2 deletions

View file

@ -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);

View file

@ -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