return;
}
getListeners().onAttack(target);
int sAtk = Math.max(calculateAttackDelay(), 333);
int ssGrade = 0;
WeaponTemplate weaponItem = getActiveWeaponItem();
if (weaponItem != null)
{
if (isPlayer() && (weaponItem.getAttackReuseDelay() > 0))
{
int reuse = (int) ((weaponItem.getAttackReuseDelay() * getReuseModifier(target) * 666 * calcStat(Stats.ATK_BASE, 0, target, null)) / 293. / getPAtkSpd());
if (reuse > 0)
{
sendPacket(new SetupGauge(this, SetupGauge.RED_MINI, reuse));
_attackReuseEndTime = (reuse + System.currentTimeMillis()) - 75;
if (reuse > sAtk)
{
ThreadPoolManager.getInstance().schedule(new NotifyAITask(this, CtrlEvent.EVT_READY_TO_ACT, null, null), reuse);
}
}
}
ssGrade = weaponItem.getCrystalType().externalOrdinal;
}
_attackEndTime = (sAtk + System.currentTimeMillis()) - 10;
_isAttackAborted = false;
Attack attack = new Attack(this, target, getChargedSoulShot(), ssGrade);
setHeading(PositionUtils.calculateHeadingFrom(this, target));
if (weaponItem == null)
{
doAttackHitSimple(attack, target, 1., !isPlayer(), sAtk, true);
}
else
{
switch (weaponItem.getItemType())
{
case BOW:
case CROSSBOW:
doAttackHitByBow(attack, target, sAtk);
break;