Change max buff limit from short to int

This commit is contained in:
stacey 2021-05-12 13:47:27 -04:00 committed by GitHub
parent 563c439aee
commit 9418e4304f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5985,7 +5985,7 @@ namespace TShockAPI
int.TryParse(args.Parameters[1], out time); int.TryParse(args.Parameters[1], out time);
if (id > 0 && id < Main.maxBuffTypes) if (id > 0 && id < Main.maxBuffTypes)
{ {
if (time < 0 || time > short.MaxValue) if (time < 0 || time > int.MaxValue)
time = 60; time = 60;
args.Player.SetBuff(id, time * 60); args.Player.SetBuff(id, time * 60);
args.Player.SendSuccessMessage(string.Format("You have buffed yourself with {0}({1}) for {2} seconds!", args.Player.SendSuccessMessage(string.Format("You have buffed yourself with {0}({1}) for {2} seconds!",