fix(core): Removes 6017 handler (#411)
- [X] Removes 6017 handler since it is only used in one place - [X] Exposes a ref int to modify the packet length. This is acceptable since we technically have access to the entire reader/buffer.
This commit is contained in:
parent
dc44142d29
commit
97f311d7be
24 changed files with 126 additions and 129 deletions
|
|
@ -51,18 +51,18 @@ namespace Server.Network
|
|||
IncomingPackets.RegisterEncoded(0x32, true, QuestGumpRequest);
|
||||
}
|
||||
|
||||
public static void DeathStatusResponse(NetState state, CircularBufferReader reader)
|
||||
public static void DeathStatusResponse(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
// Ignored
|
||||
}
|
||||
|
||||
public static void RequestScrollWindow(NetState state, CircularBufferReader reader)
|
||||
public static void RequestScrollWindow(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
int lastTip = reader.ReadInt16();
|
||||
int type = reader.ReadByte();
|
||||
}
|
||||
|
||||
public static void AttackReq(NetState state, CircularBufferReader reader)
|
||||
public static void AttackReq(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var from = state.Mobile;
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public static void HuePickerResponse(NetState state, CircularBufferReader reader)
|
||||
public static void HuePickerResponse(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var serial = reader.ReadUInt32();
|
||||
_ = reader.ReadInt16(); // Item ID
|
||||
|
|
@ -96,7 +96,7 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public static void SystemInfo(NetState state, CircularBufferReader reader)
|
||||
public static void SystemInfo(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
int v1 = reader.ReadByte();
|
||||
int v2 = reader.ReadUInt16();
|
||||
|
|
@ -112,7 +112,7 @@ namespace Server.Network
|
|||
var v8 = reader.ReadInt32();
|
||||
}
|
||||
|
||||
public static void TextCommand(NetState state, CircularBufferReader reader)
|
||||
public static void TextCommand(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var from = state.Mobile;
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public static void AsciiPromptResponse(NetState state, CircularBufferReader reader)
|
||||
public static void AsciiPromptResponse(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var from = state.Mobile;
|
||||
|
||||
|
|
@ -243,7 +243,7 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public static void UnicodePromptResponse(NetState state, CircularBufferReader reader)
|
||||
public static void UnicodePromptResponse(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var from = state.Mobile;
|
||||
|
||||
|
|
@ -280,7 +280,7 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public static void MenuResponse(NetState state, CircularBufferReader reader)
|
||||
public static void MenuResponse(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var serial = reader.ReadUInt32();
|
||||
int menuID = reader.ReadInt16(); // unused in our implementation
|
||||
|
|
@ -310,33 +310,33 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public static void Disconnect(NetState state, CircularBufferReader reader)
|
||||
public static void Disconnect(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var minusOne = reader.ReadInt32();
|
||||
}
|
||||
|
||||
public static void ConfigurationFile(NetState state, CircularBufferReader reader)
|
||||
public static void ConfigurationFile(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
}
|
||||
|
||||
public static void LogoutReq(NetState state, CircularBufferReader reader)
|
||||
public static void LogoutReq(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
state.SendLogoutAck();
|
||||
}
|
||||
|
||||
public static void ChangeSkillLock(NetState state, CircularBufferReader reader)
|
||||
public static void ChangeSkillLock(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var s = state.Mobile.Skills[reader.ReadInt16()];
|
||||
|
||||
s?.SetLockNoRelay((SkillLock)reader.ReadByte());
|
||||
}
|
||||
|
||||
public static void HelpRequest(NetState state, CircularBufferReader reader)
|
||||
public static void HelpRequest(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
EventSink.InvokeHelpRequest(state.Mobile);
|
||||
}
|
||||
|
||||
public static void DisplayGumpResponse(NetState state, CircularBufferReader reader)
|
||||
public static void DisplayGumpResponse(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var serial = reader.ReadUInt32();
|
||||
var typeID = reader.ReadInt32();
|
||||
|
|
@ -458,13 +458,13 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public static void SetWarMode(NetState state, CircularBufferReader reader)
|
||||
public static void SetWarMode(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
state.Mobile?.DelayChangeWarmode(reader.ReadBoolean());
|
||||
}
|
||||
|
||||
// TODO: Throttle/make this more safe
|
||||
public static void Resynchronize(NetState state, CircularBufferReader reader)
|
||||
public static void Resynchronize(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var from = state.Mobile;
|
||||
|
||||
|
|
@ -481,17 +481,17 @@ namespace Server.Network
|
|||
state.Sequence = 0;
|
||||
}
|
||||
|
||||
public static void PingReq(NetState state, CircularBufferReader reader)
|
||||
public static void PingReq(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
state.SendPingAck(reader.ReadByte());
|
||||
}
|
||||
|
||||
public static void SetUpdateRange(NetState state, CircularBufferReader reader)
|
||||
public static void SetUpdateRange(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
state.SendChangeUpdateRange(18);
|
||||
}
|
||||
|
||||
public static void MobileQuery(NetState state, CircularBufferReader reader)
|
||||
public static void MobileQuery(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var from = state.Mobile;
|
||||
if (from == null)
|
||||
|
|
@ -528,7 +528,7 @@ namespace Server.Network
|
|||
}
|
||||
}
|
||||
|
||||
public static void CrashReport(NetState state, CircularBufferReader reader)
|
||||
public static void CrashReport(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var clientMaj = reader.ReadByte();
|
||||
var clientMin = reader.ReadByte();
|
||||
|
|
@ -577,7 +577,7 @@ namespace Server.Network
|
|||
EventSink.InvokeQuestGumpRequest(state.Mobile);
|
||||
}
|
||||
|
||||
public static void EncodedCommand(NetState state, CircularBufferReader reader)
|
||||
public static void EncodedCommand(NetState state, CircularBufferReader reader, ref int packetLength)
|
||||
{
|
||||
var e = World.FindEntity(reader.ReadUInt32());
|
||||
int packetId = reader.ReadUInt16();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue