2024-11-27 18:05:53 +08:00
|
|
|
|
using System;
|
|
|
|
|
using PSO2SERVER.Models;
|
|
|
|
|
using PSO2SERVER.Protocol.Packets;
|
|
|
|
|
|
|
|
|
|
namespace PSO2SERVER.Protocol.Handlers
|
|
|
|
|
{
|
|
|
|
|
[PacketHandlerAttr(0x0B, 0x20)]
|
2024-12-03 13:18:58 +08:00
|
|
|
|
public class AcceptQuest : PacketHandler
|
2024-11-27 18:05:53 +08:00
|
|
|
|
{
|
|
|
|
|
public ObjectHeader quest_obj { get; set; }
|
|
|
|
|
public ushort diff { get; set; }
|
|
|
|
|
public ushort unk1 { get; set; }
|
|
|
|
|
public uint[] unk2 { get; set; } = new uint[7];
|
|
|
|
|
|
|
|
|
|
public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
|
|
|
|
|
{
|
|
|
|
|
var info = string.Format("[<--] 接收到的数据 (hex): {0} 字节", data.Length);
|
|
|
|
|
Logger.WriteHex(info, data);
|
|
|
|
|
|
|
|
|
|
var reader = new PacketReader(data, position, size);
|
|
|
|
|
try
|
|
|
|
|
{
|
2024-12-10 01:23:49 +08:00
|
|
|
|
quest_obj = reader.ReadObjectHeader();
|
2024-11-27 18:05:53 +08:00
|
|
|
|
diff = reader.ReadUInt16();
|
|
|
|
|
unk1 = reader.ReadUInt16();
|
|
|
|
|
for (int i = 0; i < 7; i++) { unk2[i] = reader.ReadUInt32(); }
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
Logger.WriteError("Error while processing AcceptQuest packet: " + ex.Message);
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-10 01:23:49 +08:00
|
|
|
|
Logger.Write($"PartyQuest Object: {quest_obj}, Difficulty: {diff}, unk1: {unk1}, unk2: {string.Join(", ", unk2)}");
|
2024-11-27 18:05:53 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|