PSO2SERVER/Server/Packets/PSOPackets/SetQuestPacket.cs

45 lines
1.2 KiB
C#
Raw Normal View History

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
2024-09-10 01:13:20 +08:00
namespace PSO2SERVER.Packets.PSOPackets
2024-09-10 00:31:40 +08:00
{
class SetQuestPacket : Packet
{
QuestDefiniton questdef;
Database.Player p;
public SetQuestPacket(QuestDefiniton questdef, Database.Player p)
{
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);
writer.WriteStruct(new ObjectHeader((uint)p.PlayerId, EntityType.Player));
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()
{
return new PacketHeader(0xE, 0x25);
}
}
}