PSO2SERVER/Server/Protocol/Packets/0E-PartyPacket/0E-2B-NewBusyStatePacket.cs

43 lines
990 B
C#
Raw Normal View History

2024-09-16 17:09:36 +08:00
using PSO2SERVER.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PSO2SERVER.Protocol.Packets
2024-09-16 17:09:36 +08:00
{
2024-09-20 16:10:43 +08:00
public enum BusyState
{
NotBusy,
Busy,
}
2024-09-18 04:21:17 +08:00
public class NewBusyStatePacket : Packet
2024-09-16 17:09:36 +08:00
{
2024-09-20 16:10:43 +08:00
private int _user_playerid;
private BusyState _state;
2024-09-16 17:09:36 +08:00
2024-09-20 16:10:43 +08:00
public NewBusyStatePacket(int user_playerid, BusyState state)
2024-09-16 17:09:36 +08:00
{
2024-09-20 16:10:43 +08:00
_user_playerid = user_playerid;
_state = state;
2024-09-16 17:09:36 +08:00
}
#region implemented abstract members of Packet
public override byte[] Build()
{
2024-09-17 11:29:41 +08:00
var pkt = new PacketWriter();
2024-09-21 13:11:22 +08:00
pkt.WriteStruct(new ObjectHeader((uint)_user_playerid, ObjectType.Player));
2024-09-20 16:10:43 +08:00
pkt.Write((uint)_state);
2024-09-17 11:29:41 +08:00
return pkt.ToArray();
2024-09-16 17:09:36 +08:00
}
public override PacketHeader GetHeader()
{
2024-09-18 04:21:17 +08:00
return new PacketHeader(0x0E, 0x2B, PacketFlags.None);
2024-09-16 17:09:36 +08:00
}
#endregion
}
}