PSO2SERVER/Server/Protocol/Packets/23-FlagPackets/23-05-ServerSetParamPacket.cs
2024-11-27 18:05:53 +08:00

44 lines
1.1 KiB
C#

using PSO2SERVER.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using static PSO2SERVER.Models.Flags;
namespace PSO2SERVER.Protocol.Packets
{
public class ServerSetParamPacket : Packet
{
/// Flag type.
public FlagType _param_type { get; set; }
/// Flag ID.
public uint _id { get; set; }
/// Flag value.
public uint _value { get; set; }
public ServerSetParamPacket(uint flag, uint value)
{
_param_type = FlagType.Account;
_id = flag;
_value = value;
}
#region implemented abstract members of Packet
public override byte[] Build()
{
var pkt = new PacketWriter();
pkt.Write((uint)_param_type);
pkt.Write((uint)_id);
pkt.Write((uint)_value);
return pkt.ToArray();
}
public override PacketHeader GetHeader()
{
return new PacketHeader(0x23, 0x05, PacketFlags.None);
}
#endregion
}
}