更新数据包记录

更新11B0
This commit is contained in:
Longfeng Qin 2024-11-25 10:22:08 +08:00
parent b4aa3532b1
commit 650d64b922
3 changed files with 11 additions and 6 deletions

View File

@ -196,8 +196,7 @@ namespace PSO2SERVER
SendPacket(h.Type, h.Subtype, h.Flags1, packet.Build(), packet.GetType().Name); SendPacket(h.Type, h.Subtype, h.Flags1, packet.Build(), packet.GetType().Name);
} }
private void HandlePacket(byte typeA, byte typeB, byte flags1, byte flags2, byte[] data, uint position, private void HandlePacket(byte typeA, byte typeB, byte flags1, byte flags2, byte[] data, uint position, uint size)
uint size)
{ {
var handler = PacketHandlers.GetHandlerFor(typeA, typeB); var handler = PacketHandlers.GetHandlerFor(typeA, typeB);
string packetName; string packetName;
@ -253,7 +252,7 @@ namespace PSO2SERVER
{ {
// 生成格式化日期和时间 // 生成格式化日期和时间
var datePart = _server.StartTime.ToString("yyyy-MM-dd"); var datePart = _server.StartTime.ToString("yyyy-MM-dd");
var timePart = _server.StartTime.ToString("HH-mm-ss"); var timePart = _server.StartTime.ToString("HH-mm-ss-fff");
// Check for and create packets directory if it doesn't exist // Check for and create packets directory if it doesn't exist
var packetPath = Path.Combine(directory, $"0x{typeA:X2}-0x{typeB:X2}", datePart); var packetPath = Path.Combine(directory, $"0x{typeA:X2}-0x{typeB:X2}", datePart);
@ -269,7 +268,7 @@ namespace PSO2SERVER
// 确保文件名不包含不允许的字符 // 确保文件名不包含不允许的字符
var safePrefix = string.Join("_", prefix.Split(Path.GetInvalidFileNameChars())); var safePrefix = string.Join("_", prefix.Split(Path.GetInvalidFileNameChars()));
var filename = Path.Combine(packetPath, $"0x{typeA:X2}-0x{typeB:X2}-此处加入字节显示-{safePrefix}-{timePart}.bin"); var filename = Path.Combine(packetPath, $"0x{typeA:X2}-0x{typeB:X2}-{packet.Length}-{safePrefix}-{timePart}.bin");
try try
{ {

View File

@ -5,8 +5,14 @@ using PSO2SERVER.Packets.PSOPackets;
namespace PSO2SERVER.Packets.Handlers namespace PSO2SERVER.Packets.Handlers
{ {
[PacketHandlerAttr(0x11, 0xB0)] [PacketHandlerAttr(0x11, 0xB0)]
class Unk11B0Packet : PacketHandler class Unk11B0 : PacketHandler
{ {
public struct Unk11B0Packet
{
public uint unk1;
public uint unk2;
}
public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size) public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
{ {
var info = string.Format("[<--] 接收到的数据 (hex): {0} 字节", data.Length); var info = string.Format("[<--] 接收到的数据 (hex): {0} 字节", data.Length);

View File

@ -212,7 +212,7 @@
<Compile Include="Packets\Handlers\03-ServerHandler\03-34-TeleportCasinoToLobby.cs" /> <Compile Include="Packets\Handlers\03-ServerHandler\03-34-TeleportCasinoToLobby.cs" />
<Compile Include="Packets\Handlers\11-ClientHandler\11-41-CreateCharacterOne.cs" /> <Compile Include="Packets\Handlers\11-ClientHandler\11-41-CreateCharacterOne.cs" />
<Compile Include="Packets\Handlers\11-ClientHandler\11-2D-SystemInformation.cs" /> <Compile Include="Packets\Handlers\11-ClientHandler\11-2D-SystemInformation.cs" />
<Compile Include="Packets\Handlers\11-ClientHandler\11-B0-Unk11B0Packet.cs" /> <Compile Include="Packets\Handlers\11-ClientHandler\11-B0-Unk11B0.cs" />
<Compile Include="Packets\Handlers\19-UnkHandler\19-1C-Unk191CPacketHandler.cs" /> <Compile Include="Packets\Handlers\19-UnkHandler\19-1C-Unk191CPacketHandler.cs" />
<Compile Include="Packets\Handlers\19-UnkHandler\19-06-UNK.cs" /> <Compile Include="Packets\Handlers\19-UnkHandler\19-06-UNK.cs" />
<Compile Include="Packets\Handlers\19-UnkHandler\19-04-UNK.cs" /> <Compile Include="Packets\Handlers\19-UnkHandler\19-04-UNK.cs" />