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:
parent
25a75fdf24
commit
7d9bc9ff0a
31 changed files with 190 additions and 157 deletions
|
|
@ -28,7 +28,7 @@ public static class IncomingMobilePackets
|
|||
IncomingPackets.Register(0x6F, 0, true, &SecureTrade);
|
||||
}
|
||||
|
||||
public static void RenameRequest(NetState state, SpanReader reader, int packetLength)
|
||||
public static void RenameRequest(NetState state, SpanReader reader)
|
||||
{
|
||||
var from = state.Mobile;
|
||||
var targ = World.FindMobile((Serial)reader.ReadUInt32());
|
||||
|
|
@ -39,7 +39,7 @@ public static class IncomingMobilePackets
|
|||
}
|
||||
}
|
||||
|
||||
public static void MobileNameRequest(NetState state, SpanReader reader, int packetLength)
|
||||
public static void MobileNameRequest(NetState state, SpanReader reader)
|
||||
{
|
||||
var m = World.FindMobile((Serial)reader.ReadUInt32());
|
||||
|
||||
|
|
@ -49,7 +49,7 @@ public static class IncomingMobilePackets
|
|||
}
|
||||
}
|
||||
|
||||
public static void ProfileReq(NetState state, SpanReader reader, int packetLength)
|
||||
public static void ProfileReq(NetState state, SpanReader reader)
|
||||
{
|
||||
int type = reader.ReadByte();
|
||||
var serial = (Serial)reader.ReadUInt32();
|
||||
|
|
@ -89,7 +89,7 @@ public static class IncomingMobilePackets
|
|||
}
|
||||
}
|
||||
|
||||
public static void SecureTrade(NetState state, SpanReader reader, int packetLength)
|
||||
public static void SecureTrade(NetState state, SpanReader reader)
|
||||
{
|
||||
switch (reader.ReadByte())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue