package org.l2jmobius.gameserver.network.serverpackets;
import org.l2jmobius.commons.network.WritableBuffer;
import org.l2jmobius.gameserver.network.GameClient;
import org.l2jmobius.gameserver.network.ServerPackets;
public class ExDamagePopUp extends ServerPacket
{
public static final byte NOMAKE = 0;
public static final byte NORMAL_ATTACK = 1;
public static final byte CONSECUTIVE_ATTACK = 2;
public static final byte CRITICAL = 3;
public static final byte OVERHIT = 4;
public static final byte RECOVER_HP = 5;
public static final byte RECOVER_MP = 6;
public static final byte GET_SP = 7;
public static final byte GET_EXP = 8;
public static final byte MAGIC_DEFIANCE = 9;
public static final byte SHIELD_GUARD = 10;
public static final byte DODGE = 11;
public static final byte IMMUNE = 12;
public static final byte SKILL_HIT = 13;
private final int _caster;
private final int _target;
private final int _damage;
private final byte _type;
public ExDamagePopUp(int caster, int target, int damage, byte type)
{
_caster = caster;
_target = target;
_damage = damage;
_type = type;
}
@Override
public void writeImpl(GameClient client, WritableBuffer buffer)
{
ServerPackets.EX_DAMAGE_POPUP.writeId(this, buffer);
buffer.writeInt(_caster);
buffer.writeInt(_target);
buffer.writeInt(-_damage);
buffer.writeByte(_type);
}
}