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

@ -40,6 +40,12 @@ namespace Server.Network
writer.Seek(0, SeekOrigin.End);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static Span<T> SliceToLength<T>(this Span<T> span, int length) => span.Slice(0, length);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ReadOnlySpan<T> SliceToLength<T>(this ReadOnlySpan<T> span, int length) => span.Slice(0, length);
// If LOCAL INIT is off, then stack/heap allocations have garbage data
// Initializes the first byte (Packet ID) so it can be used as a flag.
[MethodImpl(MethodImplOptions.AggressiveInlining)]