2024-09-10 00:31:40 +08:00
|
|
|
|
using System;
|
2024-09-10 01:13:20 +08:00
|
|
|
|
using PSO2SERVER.Models;
|
2024-09-10 00:31:40 +08:00
|
|
|
|
|
2024-11-27 18:05:53 +08:00
|
|
|
|
namespace PSO2SERVER.Protocol.Packets
|
2024-09-10 00:31:40 +08:00
|
|
|
|
{
|
2024-12-06 03:42:25 +08:00
|
|
|
|
public class QuestCategoryPacket : Packet
|
2024-09-10 00:31:40 +08:00
|
|
|
|
{
|
|
|
|
|
private QuestDefiniton[] questdefs;
|
|
|
|
|
|
2024-12-06 03:42:25 +08:00
|
|
|
|
public QuestCategoryPacket(QuestDefiniton[] questdefs)
|
2024-09-10 00:31:40 +08:00
|
|
|
|
{
|
|
|
|
|
this.questdefs = questdefs;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override byte[] Build()
|
|
|
|
|
{
|
|
|
|
|
PacketWriter writer = new PacketWriter();
|
|
|
|
|
writer.WriteMagic((uint)questdefs.Length, 0x1DB0, 0xC5);
|
|
|
|
|
foreach (QuestDefiniton d in questdefs)
|
|
|
|
|
{
|
|
|
|
|
writer.WriteStruct(d);
|
|
|
|
|
}
|
|
|
|
|
return writer.ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override PacketHeader GetHeader()
|
|
|
|
|
{
|
2024-09-17 11:29:41 +08:00
|
|
|
|
return new PacketHeader(0x0B, 0x18, PacketFlags.PACKED);
|
2024-09-10 00:31:40 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Hoo boy, this is 468 bytes!
|
|
|
|
|
// TODO: Map out this struct.
|
|
|
|
|
// Most of this is WRONG!!! Needs serious investigation.
|
|
|
|
|
/*
|
|
|
|
|
[K873] What I've currently mapped out
|
|
|
|
|
24 -> Start
|
2024-12-08 11:33:06 +08:00
|
|
|
|
38 -> Quest name/Type Index?
|
2024-09-10 00:31:40 +08:00
|
|
|
|
100 -> Bitfield 1
|
|
|
|
|
102 -> Estimated Play Time
|
|
|
|
|
103 -> Party Type
|
|
|
|
|
104 -> Difficulties Available
|
|
|
|
|
105 -> Difficulties Completed
|
|
|
|
|
108 -> Starting Level
|
|
|
|
|
120 -> Item Data 1?
|
|
|
|
|
12C -> Item Data 2?
|
|
|
|
|
*/
|
|
|
|
|
}
|
|
|
|
|
}
|