2024-09-10 00:31:40 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2024-09-10 01:13:20 +08:00
|
|
|
|
using PSO2SERVER.Models;
|
2024-09-10 00:31:40 +08:00
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
|
|
2024-11-27 18:05:53 +08:00
|
|
|
|
namespace PSO2SERVER.Protocol.Packets
|
2024-09-10 00:31:40 +08:00
|
|
|
|
{
|
|
|
|
|
class QuestAvailablePacket : Packet
|
|
|
|
|
{
|
|
|
|
|
public short[] amount = new short[Enum.GetValues(typeof(QuestType)).Length];
|
|
|
|
|
QuestTypeAvailable available = QuestTypeAvailable.Arks;
|
|
|
|
|
|
|
|
|
|
public override byte[] Build()
|
|
|
|
|
{
|
|
|
|
|
PacketWriter writer = new PacketWriter();
|
|
|
|
|
|
|
|
|
|
// Filler/Padding?
|
|
|
|
|
writer.Write((UInt16)0);
|
|
|
|
|
|
|
|
|
|
// Amounts
|
|
|
|
|
for (int i = 0; i < amount.Length; i++)
|
|
|
|
|
{
|
|
|
|
|
amount[i] = 1; // Just for testing
|
|
|
|
|
writer.Write(amount[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Padding/Blank entries?
|
|
|
|
|
for (int i = 0; i < 2; i++)
|
|
|
|
|
writer.Write((int)0);
|
|
|
|
|
|
|
|
|
|
// Available Bitfield
|
|
|
|
|
writer.Write((UInt64)available);
|
|
|
|
|
|
|
|
|
|
// Filler/Padding?
|
|
|
|
|
for (int i = 0; i < 2; i++)
|
|
|
|
|
writer.Write((int)0);
|
|
|
|
|
|
|
|
|
|
return writer.ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override PacketHeader GetHeader()
|
|
|
|
|
{
|
2024-09-16 02:56:02 +08:00
|
|
|
|
return new PacketHeader(0x0B, 0x16);
|
2024-09-10 00:31:40 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|