Merge pull request #805 from atom0s/general-devel
Some misc changes for player purposes.
This commit is contained in:
commit
d01c22add2
1 changed files with 6 additions and 1 deletions
|
|
@ -807,10 +807,12 @@ namespace TShockAPI
|
|||
string check = "none";
|
||||
foreach (Item item in player.TPlayer.inventory)
|
||||
{
|
||||
if (!player.Group.HasPermission(Permissions.ignorestackhackdetection) && item.stack > item.maxStack &&
|
||||
if (!player.Group.HasPermission(Permissions.ignorestackhackdetection) && (item.stack > item.maxStack || item.stack < 0) &&
|
||||
item.type != 0)
|
||||
{
|
||||
check = "Remove item " + item.name + " (" + item.stack + ") exceeds max stack of " + item.maxStack;
|
||||
player.SendErrorMessage(check);
|
||||
break;
|
||||
}
|
||||
}
|
||||
player.IgnoreActionsForCheating = check;
|
||||
|
|
@ -822,6 +824,9 @@ namespace TShockAPI
|
|||
player.SetBuff(30, 120); //Bleeding
|
||||
player.SetBuff(36, 120); //Broken Armor
|
||||
check = "Remove armor/accessory " + item.name;
|
||||
|
||||
player.SendErrorMessage(string.Format("You are wearing banned equipment. {0}", check));
|
||||
break;
|
||||
}
|
||||
}
|
||||
player.IgnoreActionsForDisabledArmor = check;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue