2024-09-18 01:50:29 +08:00
|
|
|
|
using PSO2SERVER.Models;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2024-11-27 18:05:53 +08:00
|
|
|
|
namespace PSO2SERVER.Protocol.Packets
|
2024-09-18 01:50:29 +08:00
|
|
|
|
{
|
|
|
|
|
public class CharacterFlagsPacket : Packet
|
|
|
|
|
{
|
|
|
|
|
|
2024-09-21 12:35:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Character flags.
|
|
|
|
|
/// </summary>
|
2024-12-10 21:54:32 +08:00
|
|
|
|
public FixedList<byte> Flags { get; set; } = new FixedList<byte>(0xC00, 0);
|
2024-09-21 12:35:09 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Character parameters.
|
|
|
|
|
/// </summary>
|
2024-12-10 21:54:32 +08:00
|
|
|
|
public FixedList<uint> Params { get; set; } = new FixedList<uint>(0x100, 0);
|
2024-09-21 12:35:09 +08:00
|
|
|
|
|
2024-09-18 01:50:29 +08:00
|
|
|
|
public CharacterFlagsPacket()
|
|
|
|
|
{
|
2024-12-10 21:54:32 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public CharacterFlagsPacket(FixedList<byte> Flags, FixedList<uint> Params)
|
|
|
|
|
{
|
|
|
|
|
this.Flags = Flags;
|
|
|
|
|
this.Params = Params;
|
2024-09-18 01:50:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region implemented abstract members of Packet
|
|
|
|
|
|
|
|
|
|
public override byte[] Build()
|
|
|
|
|
{
|
|
|
|
|
var pkt = new PacketWriter();
|
2024-12-10 21:54:32 +08:00
|
|
|
|
pkt.WriteList(Flags);
|
|
|
|
|
pkt.WriteList(Params);
|
2024-09-18 01:50:29 +08:00
|
|
|
|
return pkt.ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override PacketHeader GetHeader()
|
|
|
|
|
{
|
|
|
|
|
return new PacketHeader(0x23, 0x07, PacketFlags.None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|