PSO2SERVER/Server/Protocol/Handlers/4A-ARKSMisionsHandler/4A-00-MissionListRequest.cs

47 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using PSO2SERVER.Models;
using PSO2SERVER.Protocol.Packets;
namespace PSO2SERVER.Protocol.Handlers
{
[PacketHandlerAttr(0x4A, 0x00)]
public class MissionListRequest : PacketHandler
{
public override void HandlePacket(Client context, byte flags, byte[] data, uint position, uint size)
{
if(context.Character == null)
return;
var info = string.Format("[<--] 接收到的数据 (hex): {0} 字节", data.Length);
Logger.WriteHex(info, data);
var mission = new Mission
{
MissionType = 5,
StartDate = 0,
EndDate = 0,
Id = 6040309,
Unk5 = 0,
CompletionDate = 1615045153,
Unk7 = 0,
Unk8 = 0,
Unk9 = 0,
Unk10 = 1,
Unk11 = 1023,
Unk12 = 0,
Unk13 = 0,
Unk14 = 1,
Unk15 = 0,
};
List<Mission> Missions = new List<Mission>
{
mission
};
context.SendPacket(new ARKSMissionListPacket(Missions));
}
}
}