2024-09-18 01:50:29 +08:00
|
|
|
|
using PSO2SERVER.Models;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2024-09-21 15:40:13 +08:00
|
|
|
|
using static PSO2SERVER.Models.Flags;
|
2024-09-18 01:50:29 +08:00
|
|
|
|
|
2024-11-27 18:05:53 +08:00
|
|
|
|
namespace PSO2SERVER.Protocol.Packets
|
2024-09-18 01:50:29 +08:00
|
|
|
|
{
|
|
|
|
|
public class ServerSetParamPacket : Packet
|
|
|
|
|
{
|
2024-09-21 15:40:13 +08:00
|
|
|
|
/// Flag type.
|
|
|
|
|
public FlagType _param_type { get; set; }
|
|
|
|
|
/// Flag ID.
|
|
|
|
|
public uint _id { get; set; }
|
|
|
|
|
/// Flag value.
|
|
|
|
|
public uint _value { get; set; }
|
2024-09-18 01:50:29 +08:00
|
|
|
|
|
2024-09-21 15:40:13 +08:00
|
|
|
|
public ServerSetParamPacket(uint flag, uint value)
|
2024-09-18 01:50:29 +08:00
|
|
|
|
{
|
2024-09-21 15:40:13 +08:00
|
|
|
|
_param_type = FlagType.Account;
|
|
|
|
|
_id = flag;
|
|
|
|
|
_value = value;
|
2024-09-18 01:50:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region implemented abstract members of Packet
|
|
|
|
|
|
|
|
|
|
public override byte[] Build()
|
|
|
|
|
{
|
|
|
|
|
var pkt = new PacketWriter();
|
2024-09-21 15:40:13 +08:00
|
|
|
|
pkt.Write((uint)_param_type);
|
|
|
|
|
pkt.Write((uint)_id);
|
|
|
|
|
pkt.Write((uint)_value);
|
2024-09-18 01:50:29 +08:00
|
|
|
|
return pkt.ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override PacketHeader GetHeader()
|
|
|
|
|
{
|
|
|
|
|
return new PacketHeader(0x23, 0x05, PacketFlags.None);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|