2024-09-18 04:21:17 +08:00
|
|
|
|
using PSO2SERVER.Models;
|
|
|
|
|
using System;
|
2024-09-10 00:31:40 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2024-09-10 01:13:20 +08:00
|
|
|
|
namespace PSO2SERVER.Packets.PSOPackets
|
2024-09-10 00:31:40 +08:00
|
|
|
|
{
|
2024-09-18 04:21:17 +08:00
|
|
|
|
public class SetQuestInfoPacket : Packet
|
2024-09-10 00:31:40 +08:00
|
|
|
|
{
|
2024-09-18 04:21:17 +08:00
|
|
|
|
|
2024-09-10 00:31:40 +08:00
|
|
|
|
QuestDefiniton questdef;
|
2024-09-20 21:58:37 +08:00
|
|
|
|
Database.Account p;
|
2024-09-10 00:31:40 +08:00
|
|
|
|
|
2024-09-20 21:58:37 +08:00
|
|
|
|
public SetQuestInfoPacket(QuestDefiniton questdef, Database.Account p)
|
2024-09-10 00:31:40 +08:00
|
|
|
|
{
|
|
|
|
|
this.questdef = questdef;
|
|
|
|
|
this.p = p;
|
|
|
|
|
}
|
|
|
|
|
public override byte[] Build()
|
|
|
|
|
{
|
|
|
|
|
PacketWriter writer = new PacketWriter();
|
|
|
|
|
writer.Write(questdef.questNameString);
|
|
|
|
|
writer.Write(0);
|
|
|
|
|
writer.Write((ushort)0);
|
|
|
|
|
writer.Write((ushort)0);
|
|
|
|
|
writer.Write((ushort)0);
|
|
|
|
|
writer.Write((ushort)1);
|
2024-09-20 21:58:37 +08:00
|
|
|
|
writer.WriteStruct(new ObjectHeader((uint)p.AccountId, EntityType.Player));
|
2024-09-10 00:31:40 +08:00
|
|
|
|
writer.Write(0);
|
|
|
|
|
writer.Write((ushort)0);
|
|
|
|
|
writer.Write((ushort)0);
|
|
|
|
|
writer.Write((ushort)0);
|
|
|
|
|
writer.Write((ushort)0);
|
|
|
|
|
writer.Write(0);
|
|
|
|
|
writer.Write(0);
|
|
|
|
|
return writer.ToArray();
|
|
|
|
|
}
|
|
|
|
|
public override PacketHeader GetHeader()
|
|
|
|
|
{
|
2024-09-18 04:21:17 +08:00
|
|
|
|
return new PacketHeader(0x0E, 0x25, PacketFlags.None);
|
2024-09-10 00:31:40 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
2024-09-18 04:21:17 +08:00
|
|
|
|
}
|