2024-09-21 15:40:13 +08:00
|
|
|
|
using System;
|
|
|
|
|
using PSO2SERVER.Models;
|
2024-11-27 18:05:53 +08:00
|
|
|
|
using PSO2SERVER.Protocol.Packets;
|
2024-09-21 15:40:13 +08:00
|
|
|
|
using PSO2SERVER.Party;
|
|
|
|
|
|
2024-11-27 18:05:53 +08:00
|
|
|
|
namespace PSO2SERVER.Protocol.Handlers
|
2024-09-21 15:40:13 +08:00
|
|
|
|
{
|
|
|
|
|
[PacketHandlerAttr(0x0B, 0xCD)]
|
2024-12-03 13:18:58 +08:00
|
|
|
|
public class AcceptStoryQuestHandler : PacketHandler
|
2024-09-21 15:40:13 +08:00
|
|
|
|
{
|
2024-12-10 01:23:49 +08:00
|
|
|
|
public struct AcceptStoryQuestPacket
|
|
|
|
|
{
|
|
|
|
|
public uint name_id;
|
|
|
|
|
public uint unk;
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-21 15:40:13 +08:00
|
|
|
|
public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
|
|
|
|
|
{
|
2024-09-22 00:08:44 +08:00
|
|
|
|
//var info = string.Format("[<--] 接收到的数据 (hex): {0} 字节", data.Length);
|
2024-09-21 15:40:13 +08:00
|
|
|
|
//Logger.WriteHex(info, data);
|
|
|
|
|
|
2024-12-10 01:23:49 +08:00
|
|
|
|
var reader = new PacketReader(data, position, size);
|
|
|
|
|
var pkt = reader.ReadStruct<AcceptStoryQuestPacket>();
|
2024-09-21 15:40:13 +08:00
|
|
|
|
|
2024-12-10 01:23:49 +08:00
|
|
|
|
Logger.Write("任务编号: " + pkt.name_id + " unk: " + pkt.unk);
|
2024-09-21 15:40:13 +08:00
|
|
|
|
|
2024-11-27 18:05:53 +08:00
|
|
|
|
PartyManager.Instance.CreateNewParty(context);
|
2024-09-21 15:40:13 +08:00
|
|
|
|
|
|
|
|
|
// 告诉客户端切换到加载界面
|
2024-12-10 01:23:49 +08:00
|
|
|
|
//context.SendPacket(new LoadingScreenTransitionPacket());
|
2024-09-21 15:40:13 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|