示例#1
0
 public void ClearPlayerTaskSystem()
 {
     if (this.m_playerTaskSystem != null)
     {
         this.m_playerTaskSystem.Dispose();
         this.m_playerTaskSystem = null;
     }
 }
示例#2
0
        public void InitPlayerTaskSystem()
        {
            this.m_playerTaskSystem = new TaskSystem(this);

            CSTaskIdListRequest reqSyncTask = new CSTaskIdListRequest();

            //TODO : 没有任务,游戏就没法进行,所以初始化任务,要用同步。
            //GameEvents.NetWorkEvents.SendAsyncMsg.SafeInvoke(reqSyncTask);
            GameEvents.NetWorkEvents.SendMsg.SafeInvoke(reqSyncTask);
        }
        public long GetCurrentMainTask()
        {
            TaskSystem taskSystem = GlobalInfo.MY_PLAYER_INFO.PlayerTaskSystem;

            if (taskSystem == null)
            {
                return(ERRORID);
            }
            for (int i = 0; i < taskSystem.CurrentTaskList.Count; i++)
            {
                NormalTask normalTask = taskSystem.CurrentTaskList[i] as NormalTask;
                if (normalTask.TaskData.type == 1)
                {
                    return(normalTask.TaskConfID);
                }
            }
            return(ERRORID);
        }
        public long CheckBuildIsInTask(long sceneID)
        {
            TaskSystem taskSystem = GlobalInfo.MY_PLAYER_INFO.PlayerTaskSystem;

            if (taskSystem == null)
            {
                return(ERRORID);
            }
            for (int i = 0; i < taskSystem.CurrentTaskList.Count; i++)
            {
                NormalTask normalTask = taskSystem.CurrentTaskList[i] as NormalTask;
                if (normalTask.TaskData.type == 1)
                {
                    //目前只有场景寻物
                    if (normalTask.TaskData.conditionSceneId / 1000 == sceneID)
                    {
                        return(normalTask.TaskData.conditionSceneId);
                    }
                }
            }
            return(ERRORID);
        }