fix: Fixes thread guard and cleans up incoming packet reader (#1641)

### Summary
* Fixes syntax compile error when THREADGUARD is enabled.
* Removes `int packetLength` from incoming packet handles since they aren't needed.

### Developer Notes
Incoming packet handler `SpanReader` is now properly scoped to that packet by length.
This commit is contained in:
Kamron Batman 2023-12-19 17:04:09 -08:00 committed by GitHub
parent 25a75fdf24
commit 7d9bc9ff0a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 190 additions and 157 deletions

View file

@ -28,7 +28,7 @@ public static class IncomingMessagePackets
IncomingPackets.Register(0xAD, 0, true, &UnicodeSpeech);
}
public static void AsciiSpeech(NetState state, SpanReader reader, int packetLength)
public static void AsciiSpeech(NetState state, SpanReader reader)
{
var from = state.Mobile;
@ -55,7 +55,7 @@ public static class IncomingMessagePackets
from.DoSpeech(text, Array.Empty<int>(), type, Utility.ClipDyedHue(hue));
}
public static void UnicodeSpeech(NetState state, SpanReader reader, int packetLength)
public static void UnicodeSpeech(NetState state, SpanReader reader)
{
var from = state.Mobile;