/** * Launch actions corresponding to the Event Sleeping.<br> * <br> * <B><U> Actions</U> :</B><br> * <br> * <li>Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop * (broadcast) * <li>Stop the actor movement server side AND client side by sending Server->Client packet * StopMove/StopRotation (broadcast) * <li>Break an attack and send Server->Client ActionFailed packet and a System Message to the * L2Character * <li>Break a cast and send Server->Client ActionFailed packet and a System Message to the * L2Character <br> * <br> */ @Override protected void onEvtSleeping(L2Character attacker) { // Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop // (broadcast) _actor.broadcastPacket(new AutoAttackStop(_actor.getObjectId())); if (AttackStanceTaskManager.getInstance().getAttackStanceTask(_actor)) AttackStanceTaskManager.getInstance().removeAttackStanceTask(_actor); // stop Server AutoAttack also setAutoAttacking(false); // Stop the actor movement server side AND client side by sending Server->Client packet // StopMove/StopRotation (broadcast) clientStopMoving(null); }
@Override protected void onEvtParalyzed(L2Character attacker) { // Stop the actor auto-attack client side by sending Server->Client packet AutoAttackStop // (broadcast) _actor.broadcastPacket(new AutoAttackStop(_actor.getObjectId())); if (AttackStanceTaskManager.getInstance().getAttackStanceTask(_actor)) AttackStanceTaskManager.getInstance().removeAttackStanceTask(_actor); // Stop Server AutoAttack also setAutoAttacking(false); // Stop the actor movement server side AND client side by sending Server->Client packet // StopMove/StopRotation (broadcast) clientStopMoving(null); // Launch actions corresponding to the Event onAttacked (only for L2AttackableAI after the // stunning periode) notifyEvent(CtrlEvent.EVT_ATTACKED, attacker); }
/** * Launch actions corresponding to the Event Cancel.<br> * <br> * <B><U> Actions</U> :</B><br> * <br> * <li>Stop an AI Follow Task * <li>Launch actions corresponding to the Event Think<br> * <br> */ @Override protected void onEvtCancel() { clearNextIntention(); _actor.abortCast(); // Stop an AI Follow Task stopFollow(); if (!AttackStanceTaskManager.getInstance().getAttackStanceTask(_actor)) _actor.broadcastPacket(new AutoAttackStop(_actor.getObjectId())); // Launch actions corresponding to the Event Think notifyEvent(CtrlEvent.EVT_THINK); }