PSO2SERVER/Server/Protocol/Packets/04-ObjectRelatedPacket/04-81-ActionUpdateServerPacket.cs

43 lines
1.1 KiB
C#
Raw Normal View History

2024-09-18 01:50:29 +08:00
using Mysqlx.Crud;
using Mysqlx.Session;
using PSO2SERVER.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
namespace PSO2SERVER.Protocol.Packets
2024-09-18 01:50:29 +08:00
{
public class ActionUpdateServerPacket : Packet
{
private readonly int _user_playerid;
private readonly ObjectHeader _actor;
private readonly byte[] _rest;
public ActionUpdateServerPacket(int user_playerid, ObjectHeader actor, byte[] rest)
{
_user_playerid = user_playerid;
_actor = actor;
_rest = rest;
}
#region implemented abstract members of Packet
public override byte[] Build()
{
PacketWriter writer = new PacketWriter();
writer.WriteObjectHeader(new ObjectHeader((uint)_user_playerid, ObjectType.Player));
writer.WriteObjectHeader(_actor);
2024-09-18 01:50:29 +08:00
writer.Write(_rest);
return writer.ToArray();
}
public override PacketHeader GetHeader()
{
return new PacketHeader(0x04, 0x81, PacketFlags.OBJECT_RELATED);
}
#endregion
}
}