using ODMO.Commons.Writers;
namespace ODMO.Commons.Packets.GameServer.Combat
{
public class HitPacket : PacketWriter
{
private const int PacketNumber = 1013;
///
/// Attack the target with default hit.
///
/// The source of the hit
/// The target of the hit
/// The final damage of the hit
/// The target hp before the hit
/// The target hp after the hit
/// Type of the hit (2-Block 1-Crit 0-Normal)
public HitPacket(int attackerHandler, int targetHandler, int finalDamage, int hpBeforeHit, int hpAfterHit, int hitType = 0)
{
Type(PacketNumber);
WriteInt(attackerHandler);
WriteInt(targetHandler);
WriteInt(finalDamage * -1);
WriteInt(hitType);
WriteInt(hpAfterHit);
WriteInt(hpBeforeHit);
WriteShort(0);
}
}
}