nextAction nextAction = _nextAction;
Object nextAction_arg0 = _nextAction_arg0;
Object nextAction_arg1 = _nextAction_arg1;
boolean nextAction_arg2 = _nextAction_arg2;
boolean nextAction_arg3 = _nextAction_arg3;
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;
}
setIntention(AI_INTENTION_CAST, skill, target);
break;
case MOVE:
if(nextAction_arg0 == null || nextAction_arg1 == null)
{
return false;
}
Location loc = (Location) nextAction_arg0;
Integer offset = (Integer) nextAction_arg1;
clearNextAction();
actor.moveToLocation(loc, offset, nextAction_arg2);
break;
case REST:
actor.sitDown();
break;
case INTERACT:
if(nextAction_arg0 == null)
{
return false;