Пример #1
0
        private void OnTaskNewAccepted(CEventBaseArgs args)
        {
            object arg    = args.arg;
            uint   taskId = 0;

            if (arg != null)
            {
                taskId = (uint)arg;
            }
            RefreshCurrentInteractNpcs(taskId);
            CreateAcceptedTaskNpcs(taskId);
            DeleteAcceptedTaskNpcs(taskId);

            TaskHelper.CheckTaskAndActiveNpcFollowAI(taskId, true);
        }
Пример #2
0
        private void OnTaskCanSubmit(CEventBaseArgs args)
        {
            object      arg       = args.arg;
            List <Task> doneTasks = arg as List <Task>;

            if (doneTasks != null && doneTasks.Count > 0)
            {
                foreach (Task task in doneTasks)
                {
                    CreateDoneTaskNpcs(task.Define.Id);
                    DeleteDoneTaskNpcs(task.Define.Id);

                    TaskHelper.CheckTaskAndActiveNpcFollowAI(task.Define.Id, false);
                }
            }
        }