예제 #1
0
        public override bool ExternalCondition(BehaviorInputData Input)
        {
            if (!CombatHelper.InAttackRange(Input.Attacker, Input.Attacker.Action.TargetNpc))
            {
                return(true);
            }

            return(false);
        }
예제 #2
0
        protected override BehaviorRunningState OnExecute(BehaviorInputData Input)
        {
            if (Input.Attacker.Actor.IsFsmState(FsmStateName.Walk) && Input.Attacker.Action.IsValidTarget())
            {
                if (!CombatHelper.InAttackRange(Input.Attacker, Input.Attacker.Action.TargetNpc))
                {
                    Input.Attacker.Action.MoveTo(Input.Attacker.Action.TargetNpc.Position);
                }

                return(BehaviorRunningState.Running);
            }

            return(BehaviorRunningState.Finish);
        }