using PSO2SERVER.Models; using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace PSO2SERVER.Protocol.Packets { public enum BusyState { NotBusy, Busy, } public class NewBusyStatePacket : Packet { public ObjectHeader @object { get; set; } = new ObjectHeader(); /// New busy state. public BusyState state { get; set; } = new BusyState(); public NewBusyStatePacket(int user_playerid, BusyState state) { @object = new ObjectHeader((uint)user_playerid, ObjectType.Player); this.state = state; } #region implemented abstract members of Packet public override byte[] Build() { var pkt = new PacketWriter(); pkt.WriteObjectHeader(@object); pkt.Write((uint)state); return pkt.ToArray(); } public override PacketHeader GetHeader() { return new PacketHeader(0x0E, 0x2B, PacketFlags.None); } #endregion } }