Update Utils.cs

Item stack can be 9999.
This commit is contained in:
hufang360 2023-01-09 10:56:17 +08:00 committed by GitHub
parent 6e589ffaee
commit 2f7a807201
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -330,7 +330,7 @@ namespace TShockAPI
/// <returns>The item represented by the tag.</returns>
public Item GetItemFromTag(string tag)
{
Regex regex = new Regex(@"\[i(tem)?(?:\/s(?<Stack>\d{1,3}))?(?:\/p(?<Prefix>\d{1,3}))?:(?<NetID>-?\d{1,4})\]");
Regex regex = new Regex(@"\[i(tem)?(?:\/s(?<Stack>\d{1,4}))?(?:\/p(?<Prefix>\d{1,3}))?:(?<NetID>-?\d{1,4})\]");
Match match = regex.Match(tag);
if (!match.Success)
return null;