L2Playable actor = getActor();
if(nextAction == null || actor == null)
{
return false;
}
L2Skill skill;
L2Character target;
L2Object object;
switch(nextAction)
{
case ATTACK:
if(nextAction_arg0 == null)
{
return false;
}
target = (L2Character) nextAction_arg0;
_forceUse = nextAction_arg2;
_dontMove = nextAction_arg3;
clearNextAction();
setIntention(AI_INTENTION_ATTACK, target);
break;
case CAST:
if(nextAction_arg0 == null || nextAction_arg1 == null)
{
return false;
}
skill = (L2Skill) nextAction_arg0;
target = (L2Character) nextAction_arg1;
_forceUse = nextAction_arg2;
_dontMove = nextAction_arg3;
clearNextAction();
if(!skill.checkCondition(actor, target, _forceUse, _dontMove, true))
{
if(skill.getNextAction() == NextAction.ATTACK && !actor.equals(target))
{
setNextAction(l2p.gameserver.ai.L2PlayableAI.nextAction.ATTACK, target, null, _forceUse, false);
return setNextIntention();
}
return false;