Пример #1
0
 public override void SetTask(Package.Task task, bool isRecycle = true)
 {
     base.SetTask(task, isRecycle);
     this.IsCollecting = false;
     this.InitCollect();
     this.RefreshCollect();
 }
Пример #2
0
    private void RefreshDescUI(Package.Task data = null)
    {
        if (!base.get_gameObject().get_activeInHierarchy())
        {
            return;
        }
        if (MainTaskManager.Instance.CurTaskId != TaskDescUI.OpenByTaskId)
        {
            return;
        }
        this.HideGuideTips();
        BaseTask task = MainTaskManager.Instance.GetTask(TaskDescUI.OpenByTaskId, true);

        if (task != null)
        {
            if (data != null && (task.Data.quickReceive == 1 || task.Data.quickComplete == 1))
            {
                this.Show(false);
            }
            else
            {
                this.RefreshReward(task);
                this.RefreshInfo(task);
            }
        }
    }
Пример #3
0
 public virtual void SetTask(Package.Task task, bool isRecycle = true)
 {
     if (isRecycle)
     {
         this.IsActive = true;
     }
     this.Task = task;
 }
Пример #4
0
 public BaseTask(Package.Task task)
 {
     if (task != null && task.taskId > 0)
     {
         this.SetData(task);
         this.SetTask(task, true);
         this.AddListeners();
     }
 }
Пример #5
0
 private void OnRefreshNpc(Package.Task task)
 {
     if (this.IsActive && task != null && task.taskId == base.Task.taskId && task.taskType == Package.Task.TaskType.MainTask && task.status == Package.Task.TaskStatus.TaskReceived)
     {
         TaskNPCManager.Instance.UpdateNPC(this.mBeginNpc, new NPCInformation
         {
             id       = this.mBeginNpc,
             position = Vector3.get_zero(),
             status   = NPCStatus.FOLLOW
         });
     }
 }
Пример #6
0
    protected virtual void SetData(Package.Task task)
    {
        this.Data = DataReader <RenWuPeiZhi> .Get(task.taskId);

        if (this.Data != null && this.Data.target != null && this.Data.target.get_Count() > 0)
        {
            this.Targets = this.Data.target;
        }
        else
        {
            Debug.LogError(string.Format("任务[{0}]目标配表有误!!!", task.taskId));
        }
    }
Пример #7
0
 public ProtectTask(Package.Task task) : base(task)
 {
     if (base.Data != null && base.Targets != null)
     {
         if (base.Targets.get_Count() > 1)
         {
             this.mBeginNpc = base.Targets.get_Item(0);
             this.mEndNpc   = base.Targets.get_Item(1);
         }
         else
         {
             Debug.LogError(string.Format("护送任务[{0}]配置参数[{1}]有误!", base.Data.id, base.Data.target));
         }
     }
 }
Пример #8
0
 private void RefreshUI(Package.Task task)
 {
     if (task != null && this.mTask != null && this.mTask.Task != null && this.mTask.Task.taskId == task.taskId)
     {
         this.mTask.SetTask(task, false);
         this.SetData(this.mTask);
         if (this.mIsTop)
         {
             this.SetGuide();
         }
         else
         {
             this.HideGuide();
         }
     }
 }
Пример #9
0
    protected override void SetData(Package.Task task)
    {
        base.SetData(task);
        if (base.Data != null)
        {
            this.mGoodsList.Clear();
            if (base.Targets != null && base.Targets.get_Count() > 0)
            {
                for (int i = 0; i < base.Targets.get_Count(); i++)
                {
                    CaiJiPeiZhi caiJiPeiZhi = DataReader <CaiJiPeiZhi> .Get(base.Targets.get_Item(i));

                    if (caiJiPeiZhi != null)
                    {
                        this.mGoodsList.Add(caiJiPeiZhi);
                    }
                }
            }
            else
            {
                Debug.LogError(string.Format("驯服任务[{0}]配置参数[{1}]有误!", base.Data.id, base.Data.target));
            }
        }
    }
Пример #10
0
 public FightTask(Package.Task task) : base(task)
 {
 }
Пример #11
0
 public CollectTask(Package.Task task) : base(task)
 {
 }
Пример #12
0
 private void RefreshTaskList(Package.Task task = null)
 {
     this.CheckTaskGroupState(MainTaskManager.Instance.ZeroTaskId);
     this.CreateTaskList(MainTaskManager.Instance.ZeroTaskId);
 }
Пример #13
0
 public TameTask(Package.Task task) : base(task)
 {
 }