Change duration to actual max value in seconds
This commit is contained in:
parent
9418e4304f
commit
0d686ea80f
1 changed files with 3 additions and 2 deletions
|
|
@ -5985,8 +5985,9 @@ namespace TShockAPI
|
|||
int.TryParse(args.Parameters[1], out time);
|
||||
if (id > 0 && id < Main.maxBuffTypes)
|
||||
{
|
||||
if (time < 0 || time > int.MaxValue)
|
||||
time = 60;
|
||||
// Max possible buff duration as of 1.4.2.2 is 35791393 seconds (415 days).
|
||||
if (time < 0 || time > 35791393)
|
||||
time = 35791393;
|
||||
args.Player.SetBuff(id, time * 60);
|
||||
args.Player.SendSuccessMessage(string.Format("You have buffed yourself with {0}({1}) for {2} seconds!",
|
||||
TShock.Utils.GetBuffName(id), TShock.Utils.GetBuffDescription(id), (time)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue