2024-09-18 00:55:35 +08:00
|
|
|
|
using Mysqlx.Crud;
|
|
|
|
|
using PSO2SERVER.Models;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
2024-11-27 18:05:53 +08:00
|
|
|
|
namespace PSO2SERVER.Protocol.Packets
|
2024-09-18 00:55:35 +08:00
|
|
|
|
{
|
|
|
|
|
public class DespawnPlayerPacket : Packet
|
|
|
|
|
{
|
2024-12-10 01:23:49 +08:00
|
|
|
|
/// Player that receives this packet.
|
|
|
|
|
public ObjectHeader receiver { get; set; } = new ObjectHeader();
|
|
|
|
|
/// Player that got removed.
|
|
|
|
|
public ObjectHeader removed_player { get; set; } = new ObjectHeader();
|
|
|
|
|
|
2024-09-18 00:55:35 +08:00
|
|
|
|
public DespawnPlayerPacket(int other_playerid, int user_playerid)
|
|
|
|
|
{
|
2024-12-10 01:23:49 +08:00
|
|
|
|
receiver = new ObjectHeader((uint)other_playerid, ObjectType.Player);
|
|
|
|
|
removed_player = new ObjectHeader((uint)user_playerid, ObjectType.Player);
|
2024-09-18 00:55:35 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region implemented abstract members of Packet
|
|
|
|
|
|
|
|
|
|
public override byte[] Build()
|
|
|
|
|
{
|
|
|
|
|
PacketWriter writer = new PacketWriter();
|
2024-12-10 01:23:49 +08:00
|
|
|
|
receiver.WriteObjectHeaderToStream(writer);
|
|
|
|
|
removed_player.WriteObjectHeaderToStream(writer);
|
2024-09-18 00:55:35 +08:00
|
|
|
|
return writer.ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override PacketHeader GetHeader()
|
|
|
|
|
{
|
|
|
|
|
return new PacketHeader(0x04, 0x3B, PacketFlags.OBJECT_RELATED);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|