Changes account packets to functional (#284)

- [X] Moved packets from objects to functions
- [X] Fixed bug where characters were showing up with their modded names in the character list

Bumps release version
This commit is contained in:
Kamron Batman 2020-10-25 23:47:29 -07:00 • committed by GitHub
parent 90220feb41
commit 0e02cf0821
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 866 additions and 631 deletions

View file

@ -141,7 +141,7 @@ namespace System.Buffers
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteAscii(this Span<byte> span, ref int pos, string value, int max)
{
var length = value.Length <= max ? value.Length : max;
var length = Math.Min(value.Length, max);
pos += Encoding.ASCII.GetBytes(value.AsSpan(0, length), span.Slice(pos, length));
}
@ -160,7 +160,7 @@ namespace System.Buffers
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteAsciiNull(this Span<byte> span, ref int pos, string value, int max)
{
var length = value.Length < max ? value.Length : max - 1;
var length = Math.Min(value.Length, max - 1);
pos += Encoding.ASCII.GetBytes(value.AsSpan(0, length), span.Slice(pos, length));
#if NO_LOCAL_INIT
@ -172,7 +172,7 @@ namespace System.Buffers
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteAsciiFixed(this Span<byte> span, ref int pos, string value, int amount)
{
var length = value.Length <= amount ? value.Length : amount;
var length = Math.Min(value.Length, amount);
#if NO_LOCAL_INIT
int bytesWritten = Encoding.ASCII.GetBytes(value.AsSpan(0, length), span.Slice(pos, length));