fix(core): Converts BB packets (#406)

- [X] Organizes and splits up bulletin boards
- [X] Converts packets
This commit is contained in:
Kamron Batman 2021-01-13 22:28:31 -08:00 committed by GitHub
parent bae568d856
commit c58aad733d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 952 additions and 737 deletions

View file

@ -20,6 +20,7 @@ using System.IO;
using System.Net;
using System.Runtime.CompilerServices;
using System.Text;
using Server.Network;
using Server.Text;
namespace Server
@ -222,7 +223,7 @@ namespace Server
Span<byte> stack = stackalloc byte[16];
value.TryWriteBytes(stack, out var bytesWritten);
Write((byte)bytesWritten);
Write(stack.Slice(0, bytesWritten));
Write(stack.SliceToLength(bytesWritten));
}
public void Write(TimeSpan value)
@ -438,7 +439,7 @@ namespace Server
charsLeft -= charCount;
current += charCount;
Write(span.Slice(0, bytesWritten));
Write(span.SliceToLength(bytesWritten));
}
}
}