From 0d686ea80f5737212da409a085c065a0120d19d1 Mon Sep 17 00:00:00 2001 From: stacey <57187883+moisterrific@users.noreply.github.com> Date: Wed, 12 May 2021 15:39:11 -0400 Subject: [PATCH] Change duration to actual max value in seconds --- TShockAPI/Commands.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 5b27ebd7..5c356d04 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -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)));