PSO2SERVER/Server/Protocol/Packets/04-ObjectRelatedPacket/04-0F-EnemyKilledPacket.cs

59 lines
1.8 KiB
C#

using PSO2SERVER.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace PSO2SERVER.Protocol.Packets
{
public class EnemyKilledPacket : Packet
{
/// Player that receives this packet.
public ObjectHeader Receiver { get; set; } = new ObjectHeader();
/// Object that receives this damage.
public ObjectHeader Dmg_target { get; set; } = new ObjectHeader();
/// Object that deals this damage.
public ObjectHeader Dmg_inflicter { get; set; } = new ObjectHeader();
/// Inflicted damage ID.
public uint Damage_id { get; set; } = 0;
/// How much damage was inflicted.
public int Dmg_amount { get; set; } = 0;
/// New HP.
public uint New_hp { get; set; } = 0;
/// Hitbox ID (?).
public uint Hitbox_id { get; set; } = 0;
/// Hit x position.
public Half X_pos { get; set; } = 0;
/// Hit y position.
public Half Y_pos { get; set; } = 0;
/// Hit z position.
public Half Z_pos { get; set; } = 0;
public ushort unk1 { get; set; } = 0;
public ushort unk2 { get; set; } = 0;
public ushort unk3 { get; set; } = 0;
public ushort unk4 { get; set; } = 0;
public ushort unk5 { get; set; } = 0;
public ushort unk6 { get; set; } = 0;
public ushort unk7 { get; set; } = 0;
public EnemyKilledPacket()
{
}
#region implemented abstract members of Packet
public override byte[] Build()
{
var pkt = new PacketWriter();
pkt.Write(X_pos);
return pkt.ToArray();
}
public override PacketHeader GetHeader()
{
return new PacketHeader(0x04, 0x0F, PacketFlags.OBJECT_RELATED);
}
#endregion
}
}