fix: Fixes the wrong unit used for BuffIcon Timers (#2093)

This commit is contained in:
Kamron Batman 2025-01-26 22:17:03 -08:00 • committed by GitHub
parent ea364237f0
commit f241a9dec0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 11 deletions

View file

@ -6,7 +6,13 @@ namespace Server.Engines.BuffIcons;
public static class BuffIconPackets
{
public static void SendAddBuffPacket(
this NetState ns, Serial mob, BuffIcon iconID, int titleCliloc, int secondaryCliloc, TextDefinition args, long ticks
this NetState ns,
Serial mob,
BuffIcon iconID,
int titleCliloc,
int secondaryCliloc,
TextDefinition args,
long seconds
)
{
if (ns.CannotSendPackets())
@ -28,8 +34,7 @@ public static class BuffIconPackets
writer.Write((short)0x1); // command (0 = remove, 1 = add, 2 = data)
writer.Write(0);
// Truncate to whole seconds - The packet should be delayed by the partial seconds and then sent "on the second"
writer.Write((short)(ticks / 1000));
writer.Write((short)seconds);
writer.Clear(3);
writer.Write(titleCliloc);
writer.Write(secondaryCliloc);