Exemplo n.º 1
0
        private static void ShowSceneInBigWorld(long task_config_id_)
        {
            var task = ConfTask.Get(task_config_id_);

            if (3 == task.type)
            {
                GameEvents.UIEvents.UI_GameEntry_Event.OnMaskBGVisible.SafeInvoke(false);
                if (task.sceneids.Length > 0)
                {
                    List <long> all_scene_pre_ids = new List <long>();

                    foreach (var s_id in task.sceneids)
                    {
                        string pre_id_str = s_id.ToString().Substring(0, 5);
                        long   pre_id     = long.Parse(pre_id_str);
                        all_scene_pre_ids.Add(pre_id);
                    }

                    foreach (var id in all_scene_pre_ids)
                    {
                        GameEvents.BigWorld_Event.OpenBuildTopByHead5NumInSceneID.SafeInvoke(id);
                    }
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 此主线任务是否能完成
        /// </summary>
        private static void OnCheckMainTaskCanStart(NormalTask taskInfo)
        {
            ConfTask confTask = ConfTask.Get(taskInfo.TaskConfID);

            if (confTask == null)
            {
                return;
            }

            if (confTask.building != null && confTask.building.Length > 0)
            {
                ConfBuilding building = ConfBuilding.Get(confTask.building[0]);
                if (building == null)
                {
                    return;
                }

                if (!GameEvents.BigWorld_Event.OnCheckBuildStatusByID(building.id))
                {
                    PopUpManager.OpenNormalOnePop("task_unlock_tips", LocalizeModule.Instance.GetString(building.name));
                    return;
                }
            }

            GameEntryUILogic.S_CUR_EXCUTE_TASK_ID = taskInfo.TaskConfID;
            OnExcuteTask(taskInfo);
        }
Exemplo n.º 3
0
 public static void OnReponse(object obj, NormalTask taskInfo)
 {
     if (obj is SCCanTaskResponse)
     {
         SCCanTaskResponse res = (SCCanTaskResponse)obj;
         if (res.TaskId == taskInfo.TaskConfID)
         {
             if (res.CanTask)
             {
                 GameEntryUILogic.S_CUR_EXCUTE_TASK_ID = res.TaskId;
                 OnExcuteTask(taskInfo);
             }
             else
             {
                 ConfTask confTask = ConfTask.Get(res.TaskId);
                 if (confTask == null)
                 {
                     return;
                 }
                 if (confTask.building != null && confTask.building.Length > 0)
                 {
                     ConfBuilding building = ConfBuilding.Get(confTask.building[0]);
                     if (building == null)
                     {
                         return;
                     }
                     PopUpManager.OpenNormalOnePop("task_unlock_tips", LocalizeModule.Instance.GetString(building.name));
                 }
             }
         }
     }
 }
Exemplo n.º 4
0
        public static bool GetConfig(string fieldName, object fieldValue, out ConfTask config)
        {
            DataTable sqReader = SQLiteHelper.Instance().GetSelectWhereCondition("conf_Task", fieldName, fieldValue);

            if (sqReader != null)
            {
                try
                {
                    sqReader.Read();
                    if (sqReader.HasRows)
                    {
                        config = GetConfByDic(sqReader);
                    }
                    else
                    {
                        config = null;
                        return(false);
                    }
                    return(true);
                }
                catch (Exception ex)
                {
                    SqliteDriver.SQLiteHelper.OnError(string.Format("Task 表找不到列={0} 值={1}的数据\n{2}", fieldName, fieldValue, ex));
                }
                config = null;
                return(false);
            }
            config = null;
            return(false);
        }
Exemplo n.º 5
0
        private bool OnClickBuildIcon()
        {
            if (m_achorData == null)
            {
                return(false);
            }
            if (m_achorData.BuildStatus == 2)
            {
                if (IsChapterValid())
                {
                    FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_UNLOCK);
                    param.Param = m_achorData.m_buidID;
                    EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);
                    return(false);
                }
                else
                {
                    GameEvents.ChapterEvents.OnChapterDownloadFinish += OnChapterDownloaded;
                    FrameMgr.OpenUIParams uiParams = new FrameMgr.OpenUIParams(UIDefine.UI_ChapterMap);
                    uiParams.Param = m_confBuilding.id;

                    EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(uiParams);

                    return(false);
                }
            }
            else if (m_achorData.BuildStatus == 3)
            {
                if (m_confBuilding.unlockTask > 0)
                {
                    GlobalInfo.MY_PLAYER_INFO.PlayerTaskSystem.IsCompleteTaskByConfigID(m_confBuilding.unlockTask, (bool taskComplete) =>
                    {
                        if (!taskComplete)
                        {
                            string taskName   = string.Empty;
                            ConfTask confTask = ConfTask.Get(m_confBuilding.unlockTask);
                            if (confTask != null)
                            {
                                taskName = LocalizeModule.Instance.GetString(confTask.name);
                            }
                            if (GlobalInfo.MY_PLAYER_INFO.Level < m_confBuilding.unlockLevel)
                            {
                                PopUpManager.OpenNormalOnePop(LocalizeModule.Instance.GetString("map_clock_level_mission", m_confBuilding.unlockLevel, taskName));
                            }
                            else
                            {
                                PopUpManager.OpenNormalOnePop(LocalizeModule.Instance.GetString("group_unlock_tips", taskName));
                            }
                            return;
                        }
                    });
                }
                else
                {
                    PopUpManager.OpenNormalOnePop(LocalizeModule.Instance.GetString("map_clock_level", m_confBuilding.unlockLevel));
                }
                return(false);
            }
            return(true);
        }
Exemplo n.º 6
0
            public void SetTaskIntro(long taskId, bool status)
            {
                this.m_taskId = taskId;
                ConfTask confTaskData = ConfTask.Get(taskId);

                this.m_isTaskComplete.Checked  = !status;
                this.m_TaskBgImg.Visible       = status;
                this.m_lbTaskName.Text         = LocalizeModule.Instance.GetString(confTaskData.name);
                this.m_lbTaskIntroContent.Text = LocalizeModule.Instance.GetString(confTaskData.descs);
            }
Exemplo n.º 7
0
        /// <summary>
        /// 解析任务配置-任务触发条件
        /// </summary>
        /// <param name="taskConfig"></param>
        /// <returns></returns>
        private List <TaskCreaterParams> ParseTaskTriggerConditions(ConfTask taskConfig)
        {
            List <TaskCreaterParams> taskTriggerCreaterParamList = new List <TaskCreaterParams>();
            TaskCreaterParams        triggerParam = new TaskCreaterParams()
            {
                Condition = taskConfig.triggerKey, Data = taskConfig.triggerValue
            };

            taskTriggerCreaterParamList.Add(triggerParam);

            return(taskTriggerCreaterParamList);
        }
Exemplo n.º 8
0
        public void OnBuildClick()
        {
            //if (!SeekerGame.NewGuid.GuidNewManager.Instance.GetProgressByIndex(4))
            //{
            //    return;
            //}
            //todo//////////////////////////临时注释
            if (m_BuildID >= 4)
            {
                PopUpManager.OpenNormalOnePop(LocalizeModule.Instance.GetString("group_unlock_future_tips"));
                return;
            }

            if (status == 2)
            {
                FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_UNLOCK);
                param.Param = m_BuildID;
                EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param);
            }
            else if (status == 0)
            {
                if (m_confBuild.unlockTask > 0)
                {
                    GlobalInfo.MY_PLAYER_INFO.PlayerTaskSystem.IsCompleteTaskByConfigID(m_confBuild.unlockTask, (bool taskComplete) =>
                    {
                        if (!taskComplete)
                        {
                            string taskName   = string.Empty;
                            ConfTask confTask = ConfTask.Get(m_confBuild.unlockTask);
                            if (confTask != null)
                            {
                                taskName = LocalizeModule.Instance.GetString(confTask.name);
                            }
                            if (GlobalInfo.MY_PLAYER_INFO.Level < m_confBuild.unlockLevel)
                            {
                                PopUpManager.OpenNormalOnePop(LocalizeModule.Instance.GetString("map_clock_level_mission", m_confBuild.unlockLevel, taskName));
                            }
                            else
                            {
                                PopUpManager.OpenNormalOnePop(LocalizeModule.Instance.GetString("group_unlock_tips", taskName));
                            }
                            return;
                        }
                    });
                    // bool taskComplete = true;//GlobalInfo.MY_PLAYER_INFO.PlayerTaskSystem.IsCompleteTaskByConfigID(m_confBuild.unlockTask);
                }
                else
                {
                    PopUpManager.OpenNormalOnePop(LocalizeModule.Instance.GetString("map_clock_level", m_confBuild.unlockLevel));
                }
            }
        }
Exemplo n.º 9
0
        public bool QueryTaskComplete(long task_id_)
        {
            ConfTask t = ConfTask.Get(task_id_);

            if ((int)EUNM_TASK_TYPE.E_MAIN == t.type)
            {
                return(AllCompleteTask.m_last_complete_main_task_id >= task_id_);
            }
            else
            {
                return(AllCompleteTask.m_last_complete_other_task_ids.Contains(task_id_));
            }
        }
Exemplo n.º 10
0
 private static void GetArrrayList()
 {
     if (cacheArray.Count <= 0)
     {
         DataTable sqReader = SQLiteHelper.Instance().GetReadFullTable("conf_Task");
         if (sqReader != null)
         {
             while (sqReader.Read())
             {
                 ConfTask _conf = GetConfByDic(sqReader);
                 cacheArray.Add(_conf);
                 dic[_conf.id] = _conf;
             }
             resLoaded = true;
         }
     }
 }
Exemplo n.º 11
0
        public static bool GetConfig(long id, out ConfTask config)
        {
            if (dic.TryGetValue(id, out config))
            {
                return(config != null);
            }
            if (cacheLoaded)
            {
                config = null;
                return(false);
            }
            DataTable sqReader = SQLiteHelper.Instance().GetSelectWhere("conf_Task", id);

            if (sqReader != null)
            {
                try
                {
                    sqReader.Read();
                    if (sqReader.HasRows)
                    {
                        config = GetConfByDic(sqReader);
                    }
                    else
                    {
                        dic[id] = null;
                        config  = null;
                        return(false);
                    }
                    dic[id] = config;
                    return(true);
                }
                catch (Exception ex)
                {
                    SqliteDriver.SQLiteHelper.OnError(string.Format("Task 表找不到SN={0} 的数据\n{1}", id, ex));
                }
                config = null;
                return(false);
            }
            else
            {
                config = null;
                return(false);
            }
        }
Exemplo n.º 12
0
        /// <summary>
        /// 创建任务实体
        /// </summary>
        /// <param name="taskId"></param>
        /// <returns></returns>
        private NormalTask CreateNormalTaskInstance(long taskId)
        {
            ConfTask confTask = ConfTask.Get(taskId);

            if (confTask == null)
            {
                Debug.LogError($"create task error, no task config :{taskId}");
                return(null);
            }

            List <TaskCreaterParams> taskTriggerConditionParams  = ParseTaskTriggerConditions(confTask);
            List <TaskCreaterParams> taskCompleteConditionParams = ParseTaskCompleteConditions(confTask);
            List <TaskCreaterParams> taskRewardParams            = ParseTaskRewardInfo(confTask);

            NormalTask task = TaskFactory.Instance.CreateTask <NormalTask>(confTask.id, taskTriggerConditionParams, taskCompleteConditionParams, taskRewardParams);

            task.TaskData = confTask;

            return(task);
        }
Exemplo n.º 13
0
        public TaskAnchor DeBranchTaskAnchor(long pool_task_id_)
        {
            string anchor_name = ConfTask.Get(pool_task_id_).anchor;

            if (occupied_branch_anchor_task_dict.ContainsKey(anchor_name))
            {
                if (occupied_branch_anchor_task_dict[anchor_name] != pool_task_id_)
                {
                    //有其它分支任务占了
                    return(null);
                }
                else
                {
                    //我自己
                    return(all_branch_anchors_dict[anchor_name]);
                }
            }

            occupied_branch_anchor_task_dict.Add(anchor_name, pool_task_id_);

            return(all_branch_anchors_dict[anchor_name]);
        }
Exemplo n.º 14
0
 public static void Register()
 {
     ConfAchievement.Init();
     ConfActiveDrop.Init();
     ConfActivityBase.Init();
     ConfAssetManifest.Init();
     Confbranchtask.Init();
     ConfBuilding.Init();
     ConfCartoonScene.Init();
     ConfChapter.Init();
     ConfCharge.Init();
     ConfChat.Init();
     ConfChatItem.Init();
     ConfCheckIn.Init();
     ConfCombineFormula.Init();
     ConfDemoScene.Init();
     ConfDropOut.Init();
     ConfPropGiftItem0.Init();
     ConfPropGiftItem1.Init();
     ConfPropGiftItem2.Init();
     ConfDropOut2.Init();
     Confetl.Init();
     ConfEvent.Init();
     ConfEventAttribute.Init();
     ConfEventPhase.Init();
     Confexhibit.Init();
     ConfExpToLevel.Init();
     Conffailtips.Init();
     ConfFeedback.Init();
     ConfFind.Init();
     ConfFindClue.Init();
     ConfFindTypeIcon.Init();
     ConfGMCMD.Init();
     ConfGuid.Init();
     ConfGuidArt.Init();
     ConfGuidNew.Init();
     ConfGuidNewFunction.Init();
     Confinapppurchase.Init();
     ConfJigsawScene.Init();
     ConfKeyWords.Init();
     ConfLanguage.Init();
     ConfMsgCode.Init();
     ConfNode.Init();
     ConfNpc.Init();
     ConfOfficer.Init();
     ConfPath.Init();
     ConfPoliceRankIcon.Init();
     ConfProp.Init();
     ConfPropGift.Init();
     ConfPropGiftItem0.Init();
     ConfPropGiftItem1.Init();
     ConfPropGiftItem2.Init();
     ConfPush.Init();
     ConfReasoning.Init();
     ConfScene.Init();
     ConfSceneDifficulty.Init();
     ConfSceneSpecial.Init();
     ConfServiceConfig.Init();
     ConfSkill.Init();
     ConfSkyEye.Init();
     ConfSound.Init();
     ConfTask.Init();
     ConfTitle.Init();
 }
Exemplo n.º 15
0
        private List <RewardWrapper> GetAcceptTaskDropItem(ConfTask confTask)
        {
            List <RewardWrapper> task_rewards = new List <RewardWrapper>();

            long[] rewardItemIds  = confTask.rewardPropIds;
            int[]  rewardItemNums = confTask.rewardPropNums;

            for (int i = 0; i < rewardItemIds.Length; ++i)
            {
                var reward = ConfProp.Get(rewardItemIds[i]);

                task_rewards.Add(new RewardWrapper()
                {
                    m_icon = reward.icon,
                    m_num  = rewardItemNums[i],
                    m_id   = rewardItemIds[i],
                }
                                 );
            }

            var output = TaskHelper.GetReward(confTask);

            if (output.Item1 > 0)
            {
                RewardWrapper rw = new RewardWrapper()
                {
                    m_id   = 0,
                    m_icon = CommonHelper.GetOutputIconName(EUNM_BASE_REWARD.E_VIT),
                    m_num  = output.Item1,
                };
                task_rewards.Add(rw);
            }

            if (output.Item2 > 0)
            {
                RewardWrapper rw = new RewardWrapper()
                {
                    m_id   = 0,
                    m_icon = CommonHelper.GetOutputIconName(EUNM_BASE_REWARD.E_COIN),
                    m_num  = output.Item2,
                };
                task_rewards.Add(rw);
            }

            if (output.Item3 > 0)
            {
                RewardWrapper rw = new RewardWrapper()
                {
                    m_id   = 0,
                    m_icon = CommonHelper.GetOutputIconName(EUNM_BASE_REWARD.E_CASH),
                    m_num  = output.Item3,
                };
                task_rewards.Add(rw);
            }

            if (output.Item4 > 0)
            {
                RewardWrapper rw = new RewardWrapper()
                {
                    m_id   = 0,
                    m_icon = CommonHelper.GetOutputIconName(EUNM_BASE_REWARD.E_EXP),
                    m_num  = output.Item4,
                };
                task_rewards.Add(rw);
            }
            return(task_rewards);
        }
Exemplo n.º 16
0
 void ShowReward(ConfTask confTask)
 {
 }
Exemplo n.º 17
0
        void TaskCreateSceneByDifficult(long tsk_id_)
        {
            long scene_id = FindObjSceneDataManager.LoadSceneIDForTask(tsk_id_);

            if (scene_id < 0)
            {
                long   scene_difficult_id = FindObjSceneDataManager.GetSceneDifficultID(m_scene_group_id, m_group_data.m_lvl);
                long[] sceneid4random     = ConfSceneDifficulty.Get(scene_difficult_id).sceneIds;
                int[]  weights4random     = ConfSceneDifficulty.Get(scene_difficult_id).sceneWeights;

                FindObjSceneData my_difficult_data = FindObjSceneDataManager.Instance.GetDataBySceneGroupID(m_scene_group_id);
                int?my_difficult_lvl = my_difficult_data?.m_lvl;
                int?my_difficult_exp = my_difficult_data?.m_exp;

                if ((1 == my_difficult_lvl || 0 == my_difficult_lvl) && 0 == my_difficult_exp)
                {
                    //首次使用普通玩法
                    scene_id = sceneid4random[0];
                }
                else
                {
                    //二次随机
                    List <RateScene> scenes4rdm = new List <RateScene>();
                    for (int i = 0; i < sceneid4random.Length; ++i)
                    {
                        RateScene rs = new RateScene()
                        {
                            SceneID = sceneid4random[i],
                            Rate    = weights4random[i],
                        };
                        scenes4rdm.Add(rs);
                    }

                    int idx = randomGetIdex(scenes4rdm);

                    if (idx >= 0)
                    {
                        RateScene selected_scene = scenes4rdm[idx];
                        scene_id = selected_scene.SceneID;

                        FindObjSceneDataManager.SaveSceneIDForTask(tsk_id_, scene_id);

                        if (1 == ConfTask.Get(tsk_id_).type)
                        {
                            //主线任务,影响bulid top的场景id
                            FindObjSceneDataManager.SaveSceneIDForBuildTop(FindObjSceneDataManager.ConvertSceneIdToSceneGroupId(scene_id), scene_id);
                        }
                    }
                }
            }

            if (scene_id > 0)
            {
                this.m_scene_id   = scene_id;
                m_s_info          = ConfScene.Get(m_scene_id);
                m_time_cost_value = m_s_info.secondGain;
                m_vit_cost_value  = m_s_info.vitConsume;
            }
            else
            {
                m_s_info          = null;
                m_time_cost_value = 0;
                m_vit_cost_value  = 0;
            }
        }
Exemplo n.º 18
0
        public override void OnShow(object param)
        {
            base.OnShow(param);

            GameEvents.UIEvents.UI_GameEntry_Event.OnMaskBGVisible.SafeInvoke(true);
            //GameEvents.UIEvents.UI_Common_Event.OnCommonUIVisible.SafeInvoke(false);
            BgHideAlpha(false);
            PanelTurnToOne(false);

            m_btn.AddClickCallBack(OnClicked);
            m_tips_btn.AddClickCallBack(OnClicked);
            m_close_btn.AddClickCallBack(OnCloseClicked);
            if (null != param)
            {
                var input_param = param as AcceptTaskParam;
                m_taskInfo     = input_param.m_taskInfo;
                m_btn_act      = input_param.m_close_act;
                m_isAcceptTask = input_param.isAcceptTask;
            }
            this.m_completeTaskTipsLabel.Visible = !m_isAcceptTask;
            this.m_tips_txt.Visible = m_isAcceptTask;
            if (m_isAcceptTask)
            {
                this.m_btnLable.Text = "Action !";
            }
            else
            {
                this.m_btnLable.Text = "Complete !";
            }
            ConfTask confTask = ConfTask.Get(this.m_taskInfo.TaskConfID);

            this.m_desc_txt.Text = LocalizeModule.Instance.GetString(confTask.descs);
            this.m_name_txt.Text = LocalizeModule.Instance.GetString(confTask.name);
            this.m_tips_txt.Text = LocalizeModule.Instance.GetString("activity_drop_taskdec_1");


            List <RewardWrapper> task_rewards = new List <RewardWrapper>();

            if (m_isAcceptTask)
            {
                task_rewards = GetAcceptTaskDropItem(confTask);
            }
            else
            {
                task_rewards = GetCompleteTaskDropItem();
            }

            if (task_rewards.Count > 0)
            {
                m_reward_grid.EnsureSize <DropItemIcon>(task_rewards.Count);
                for (int i = 0; i < m_reward_grid.ChildCount; ++i)
                {
                    var view = m_reward_grid.GetChild <DropItemIcon>(i);
                    view.InitSprite(task_rewards[i].m_icon, task_rewards[i].m_num, task_rewards[i].m_id);
                    view.Visible = true;
                }
            }
            else
            {
                m_reward_grid.Clear();
            }



            List <iconAndName> conditions = new List <iconAndName>();

            if (m_taskInfo.CompleteConditionList.Count > 0)
            {
                foreach (var complete_condition in m_taskInfo.CompleteConditionList)
                {
                    if (complete_condition.GetType() == typeof(TaskCompleteItems))
                    {
                        //收集物品
                        TaskCompleteItems collectDataInfo = complete_condition as TaskCompleteItems;

                        List <ItemWrapper> collectItemList = collectDataInfo.TaskCompleteData;

                        string collect_icon, collect_name;
                        int    collect_type;

                        foreach (var collect in collectItemList)
                        {
                            GetIconAndName(collect.ItemID, out collect_icon, out collect_name, out collect_type);

                            conditions.Add(new iconAndName()
                            {
                                m_icon = collect_icon,
                                m_name = collect_name,
                                m_type = collect_type,
                            });
                        }
                    }
                    else if (complete_condition.GetType() == typeof(TaskCompleteByScan))
                    {
                        //尸检
                        TaskCompleteByScan collectDataInfo = complete_condition as TaskCompleteByScan;
                        long scan_id = (long)collectDataInfo.TaskCompleteData;

                        var all_types_clues = ScanDataManager.Instance.Examin_clue_datas(scan_id);

                        var all_clues = new HashSet <long>();

                        foreach (var kvp in all_types_clues)
                        {
                            all_clues.UnionWith(kvp.Value);
                        }

                        var scan_clues = from i in all_clues
                                         select new iconAndName()
                        {
                            m_icon = ConfFindClue.Get(i).icon,
                            m_name = LocalizeModule.Instance.GetString(ConfFindClue.Get(i).name),
                        };

                        foreach (var item in scan_clues)
                        {
                            conditions.Add(item);
                        }
                    }
                }
            }


            m_aim_grid.EnsureSize <AimItemView>(conditions.Count);

            for (int i = 0; i < m_aim_grid.ChildCount; ++i)
            {
                m_aim_grid.GetChild <AimItemView>(i).Refresh(conditions[i].m_icon, conditions[i].m_name);
                m_aim_grid.GetChild <AimItemView>(i).Visible = true;
            }

            if (m_isAcceptTask)
            {
                m_titleGet.Visible = false;
                ShowAcceptTaskTips();
                ShowTaskTitle(confTask.rewardTitleId);
            }
        }
Exemplo n.º 19
0
        private static ConfTask GetConfByDic(DataTable reader)
        {
            long   id           = reader.GetInt64(0);
            string keyClueIcon  = reader.GetString(1);
            string transactor   = reader.GetString(2);
            int    taskWeight   = reader.GetInt32(3);
            string loopManIcon  = reader.GetString(4);
            string loopBackIcon = reader.GetString(5);
            string anchor       = reader.GetString(6);
            bool   autoSkip     = reader.GetBoolean(7);

            long[] sceneids       = (long[])reader.GetArrayData(8, 17);
            string breviary       = reader.GetString(9);
            string backgroundIcon = reader.GetString(10);

            long[] building      = (long[])reader.GetArrayData(11, 17);
            long   nextTaskId    = reader.GetInt64(12);
            long   rewardTitleId = reader.GetInt64(13);

            int[]  rewardPropNums   = (int[])reader.GetArrayData(14, 11);
            long[] rewardPropIds    = (long[])reader.GetArrayData(15, 17);
            int    rewardVit        = reader.GetInt32(16);
            int    rewardExp        = reader.GetInt32(17);
            int    rewardCash       = reader.GetInt32(18);
            int    rewardCoin       = reader.GetInt32(19);
            int    rewardType       = reader.GetInt32(20);
            long   dialogEnd        = reader.GetInt64(21);
            long   dialogBegin      = reader.GetInt64(22);
            long   conditionCartoon = reader.GetInt64(23);
            long   conditionJigsaw  = reader.GetInt64(24);

            int[]  conditionExhibitsNum = (int[])reader.GetArrayData(25, 11);
            long[] conditionExhibits    = (long[])reader.GetArrayData(26, 17);
            long   conditionSceneId     = reader.GetInt64(27);
            long   conditionEventId     = reader.GetInt64(28);
            long   conditionDialogueId  = reader.GetInt64(29);
            long   conditionFindId      = reader.GetInt64(30);
            long   conditionReasoningId = reader.GetInt64(31);

            int[]  conditionPropNums  = (int[])reader.GetArrayData(32, 11);
            long[] conditionPropExIds = (long[])reader.GetArrayData(33, 17);
            long[] conditionPropIds   = (long[])reader.GetArrayData(34, 17);
            int    conditionLevel     = reader.GetInt32(35);
            string triggerValue       = reader.GetString(36);
            int    triggerKey         = reader.GetInt32(37);
            int    type       = reader.GetInt32(38);
            string levelLimit = reader.GetString(39);
            string remarks    = reader.GetString(40);
            string descs      = reader.GetString(41);
            string name       = reader.GetString(42);

            ConfTask new_obj_ConfTask = new ConfTask(id,
                                                     keyClueIcon,
                                                     transactor,
                                                     taskWeight,
                                                     loopManIcon,
                                                     loopBackIcon,
                                                     anchor,
                                                     autoSkip,
                                                     sceneids,
                                                     breviary,
                                                     backgroundIcon,
                                                     building,
                                                     nextTaskId,
                                                     rewardTitleId,
                                                     rewardPropNums,
                                                     rewardPropIds,
                                                     rewardVit,
                                                     rewardExp,
                                                     rewardCash,
                                                     rewardCoin,
                                                     rewardType,
                                                     dialogEnd,
                                                     dialogBegin,
                                                     conditionCartoon,
                                                     conditionJigsaw,
                                                     conditionExhibitsNum,
                                                     conditionExhibits,
                                                     conditionSceneId,
                                                     conditionEventId,
                                                     conditionDialogueId,
                                                     conditionFindId,
                                                     conditionReasoningId,
                                                     conditionPropNums,
                                                     conditionPropExIds,
                                                     conditionPropIds,
                                                     conditionLevel,
                                                     triggerValue,
                                                     triggerKey,
                                                     type,
                                                     levelLimit,
                                                     remarks,
                                                     descs,
                                                     name
                                                     );

            return(new_obj_ConfTask);
        }
Exemplo n.º 20
0
        public override void OnShow(object param)
        {
            base.OnShow(param);
            GameEvents.UIEvents.UI_GameEntry_Event.OnMaskBGVisible.SafeInvoke(true);
            GameEvents.UIEvents.UI_GameEntry_Event.OnInfiniteVit += OnInfiniteVit;
            MessageHandler.RegisterMessageHandler(MessageDefine.SCSceneEnterResponse, OnScResponse);
            this.m_action_btn.AddClickCallBack(OnBtnStartGameClick);
            this.m_exp_reward_icon.AddPressDownCallBack(OnSceneGroupGiftPressDown);
            this.m_exp_reward_icon.AddPressUpCallBack(OnSceneGroupGiftPressUp);

            EnterSceneData enterSceneData = null;

            m_scene_id       = -1;
            m_scene_group_id = -1;
            m_enter_msg      = null;
            if (null != param)
            {
                enterSceneData = param as EnterSceneData;
                //this.m_scene_id = (int)enterSceneData.SceneID;
                this.m_taskConfID = enterSceneData.taskConfID;
            }

            if (-1 == m_taskConfID)
            {
                //不是从任务展示界面来的,不用翻转
                BgShowAlpha(false);
                PanelDelayShowAlpha(0.0f);
                PanelDelayShowScale(0.0f);
                PanelTurnToOne(false);
                PanelGoDown(true);
            }
            else
            {
                //需要翻转
                BgShowAlpha(true);
                PanelDelayShowAlpha(0.2f);
                PanelDelayShowScale(0.5f);
                PanelGoDown(false);
                PanelTurnToZero(false);
                PanelTurnToOne(true);
            }

            ConfTask task = null;

            if (this.m_taskConfID < 0)
            {
                //build top 进入
                this.m_scene_group_id = FindObjSceneDataManager.ConvertSceneIdToSceneGroupId(enterSceneData.SceneID);
                m_group_data          = new FindObjSceneData(this.m_scene_group_id, 1, 0);
                BuildTopCreateSceneByDifficult(this.m_scene_group_id);
            }
            else
            {
                task = ConfTask.Get(m_taskConfID);

                long tsk_scene_id = null != task ? task.conditionSceneId : enterSceneData.SceneID;
                m_special_scene_id = 0;
                //初始化一个默认的group data;
                m_group_data = new FindObjSceneData(FindObjSceneDataManager.ConvertSceneIdToSceneGroupId(tsk_scene_id), 1, 0);

                this.m_scene_group_id = FindObjSceneDataManager.ConvertSceneIdToSceneGroupId(tsk_scene_id);
                var temp_data = FindObjSceneDataManager.Instance.GetDataBySceneGroupID(m_scene_group_id);
                if (null != temp_data)
                {
                    m_group_data = temp_data;
                }

                if (tsk_scene_id > 99999)
                {
                    //配置的场景id
                    if (1 == ConfScene.Get(tsk_scene_id).keyExhibit)
                    {
                        //关键证据关卡
                        CreateSceneBySpecial(tsk_scene_id);
                    }
                    else
                    {
                        //非关键关卡
                        //读取难度表
                        TaskCreateSceneByDifficult(this.m_taskConfID);
                    }
                }
                else
                {
                    //配置的场景组id,一定是非关键线索关卡
                    TaskCreateSceneByDifficult(this.m_taskConfID);
                }
            }

            m_play_mode_img.Sprite  = this.GetModeIconName(m_scene_id);
            m_scene_tex.TextureName = m_s_info.thumbnail;
            m_scene_name_label.Text = LocalizeModule.Instance.GetString(m_s_info.name);

            this.ShowOutPut(m_s_info.outputExp, m_s_info.outputMoney, m_s_info.outputCash, m_s_info.outputVit);
            List <long> ids = CommonHelper.GetDropOuts(m_s_info.dropId);

            var props = from id in ids
                        select new DropWrapper()
            {
                DropType = ENUM_DROP_TYPE.PROP,
                ItemID   = id,
                ItemNum  = 0,
                Icon     = ConfProp.Get(id).icon,
            };

            List <DropWrapper> totalToShow = new List <DropWrapper>();

            if (null != task && task.conditionExhibits.Length > 0)
            {
                var exhibits = from id in task.conditionExhibits
                               select new DropWrapper()
                {
                    DropType = ENUM_DROP_TYPE.EXHABIT,
                    ItemID   = id,
                    ItemNum  = 0,
                    Icon     = Confexhibit.Get(id).iconName,
                };

                totalToShow.AddRange(exhibits);
            }
            //DropWrapper te = new DropWrapper()
            //{
            //    DropType = ENUM_DROP_TYPE.EXHABIT,
            //    ItemID = 10972,
            //    ItemNum = 0,
            //    Icon = Confexhibit.Get(10972).iconName,
            //};
            //totalToShow.Add(te);
            totalToShow.AddRange(props);

            m_drop_grid.EnsureSize <DropItemIconEffect>(totalToShow.Count);
            for (int i = 0; i < m_drop_grid.ChildCount; ++i)
            {
                var show = totalToShow[i];

                DropItemIconEffect di = m_drop_grid.GetChild <DropItemIconEffect>(i);
                m_drop_grid.GetChild <DropItemIconEffect>(i).InitSprite(show.Icon, show.ItemNum, show.ItemID, ENUM_DROP_TYPE.EXHABIT == show.DropType);
                if (ENUM_DROP_TYPE.PROP == show.DropType)
                {
                    m_drop_grid.GetChild <DropItemIconEffect>(i).EnableTips(true);
                    m_drop_grid.GetChild <DropItemIconEffect>(i).InitToolTipOffset(new Vector2(-280.0f, 0.0f));
                }
                else
                {
                    m_drop_grid.GetChild <DropItemIconEffect>(i).EnableTips(false);
                }
                m_drop_grid.GetChild <DropItemIconEffect>(i).Visible = true;
            }
            m_drop_grid.Visible = false;

            long scene_difficult_id            = FindObjSceneDataManager.GetSceneDifficultID(m_scene_group_id, m_group_data.m_lvl);
            ConfSceneDifficulty difficult_data = ConfSceneDifficulty.Get(scene_difficult_id);

            m_gifts = new List <GroupToolTipsData>();
            for (int i = 0; i < difficult_data.rewards.Length; ++i)
            {
                GroupToolTipsData reward = new GroupToolTipsData()
                {
                    ItemID   = difficult_data.rewards[i],
                    CurCount = difficult_data.rewardNums[i],
                };

                m_gifts.Add(reward);
            }

            m_difficult_icon.Sprite = ConfPoliceRankIcon.Get(m_group_data.m_lvl).icon;
            m_difficlut_step.Text   = LocalizeModule.Instance.GetString(difficult_data.name);
            m_exp_progress.Value    = (float)m_group_data.m_exp / (float)m_group_data.m_full_exp;
            m_exp_txt.Text          = $"{m_group_data.m_exp}/{m_group_data.m_full_exp}";
            Debug.Log($"关卡进入 关卡组id{m_group_data.m_scene_group_id}");
            m_cost_time_num_label.Text = CommonTools.SecondToStringMMSS(this.m_time_cost_value);
            SetVitLabel();

            m_is_action_btn_touched  = false;
            this.m_action_btn.Enable = true;


            Dictionary <UBSParamKeyName, object> _params = new Dictionary <UBSParamKeyName, object>()
            {
                { UBSParamKeyName.Success, 1 },
                { UBSParamKeyName.SceneID, this.m_scene_id },
            };

            UserBehaviorStatisticsModules.Instance.LogEvent(UBSEventKeyName.game_start, null, _params);
        }
Exemplo n.º 21
0
        /// <summary>
        /// 解析任务配置-任务完成条件
        /// </summary>
        /// <param name="taskConfig"></param>
        /// <returns></returns>
        private List <TaskCreaterParams> ParseTaskCompleteConditions(ConfTask taskConfig)
        {
            List <TaskCreaterParams> taskCompleteCondition = new List <TaskCreaterParams>();

            if (taskConfig.conditionLevel > 0)
            {
                taskCompleteCondition.Add(new TaskCreaterParams()
                {
                    Condition = (int)TaskCompleteMode.CompleteByLevel, Data = taskConfig.conditionLevel
                });
            }

            if (taskConfig.conditionSceneId > 0)
            {
                taskCompleteCondition.Add(new TaskCreaterParams()
                {
                    Condition = (int)TaskCompleteMode.CompletedBySceneID, Data = taskConfig.conditionSceneId
                });
            }

            if (taskConfig.conditionDialogueId > 0)
            {
                taskCompleteCondition.Add(new TaskCreaterParams()
                {
                    Condition = (int)TaskCompleteMode.CompletedByDialog, Data = taskConfig.conditionDialogueId
                });
            }

            if (taskConfig.conditionReasoningId > 0)
            {
                taskCompleteCondition.Add(new TaskCreaterParams()
                {
                    Condition = (int)TaskCompleteMode.CompleteByReasonID, Data = taskConfig.conditionReasoningId
                });
            }

            if (taskConfig.conditionPropExIds.Length > 0)
            {
                long[] itemIds = taskConfig.conditionPropExIds;

                TaskCreaterParams taskCreaterParams = new TaskCreaterParams()
                {
                    Condition = (int)TaskCompleteMode.CompleteByCombinePropID, Data = itemIds
                };
                taskCompleteCondition.Add(taskCreaterParams);
            }

            //if (taskConfig.condition > 0)
            //    taskCompleteCondition.Add(new TaskCreaterParams() { Condition = (int)TaskCompleteMode.CompleteByReasonID, Data = taskConfig.conditionReasoningId });

            if (taskConfig.conditionFindId > 0)
            {
                taskCompleteCondition.Add(new TaskCreaterParams()
                {
                    Condition = (int)TaskCompleteMode.CompleteByScanID, Data = taskConfig.conditionFindId
                });
            }

            //if (taskConfig.conditionEventId > 0)
            //    taskCompleteCondition.Add(new TaskCreaterParams() { Condition = (int)TaskCompleteMode.CompletedByEvents, Data = taskConfig.conditionEventId });


            if (taskConfig.conditionPropIds.Length > 0 && taskConfig.conditionPropNums.Length > 0)
            {
                long[] itemIds  = taskConfig.conditionPropIds;
                long[] itemNums = new long[taskConfig.conditionPropNums.Length];
                Array.Copy(taskConfig.conditionPropNums, itemNums, itemNums.Length);

                if (itemIds.Length != itemNums.Length)
                {
                    Debug.LogWarning($"task: {taskConfig.id} error ,complete item nums error,item id:{itemIds.Length} ,item nums :{itemNums.Length}");

                    if (itemNums.Length > itemIds.Length)
                    {
                        itemNums = new ArraySegment <long>(itemNums, 0, itemIds.Length).Array;
                    }
                    else if (itemNums.Length < itemIds.Length)
                    {
                        long[] itemNumsCompatibility = new long[itemIds.Length];
                        Array.Copy(itemNums, itemNumsCompatibility, itemNums.Length);

                        for (int i = itemNums.Length - 1; i < itemIds.Length; ++i)
                        {
                            itemNumsCompatibility[i] = itemNums[itemNums.Length - 1];
                        }

                        itemNums = itemNumsCompatibility;
                    }
                }

                TaskCreaterParams taskCreaterParams = new TaskCreaterParams()
                {
                    Condition = (int)TaskCompleteMode.CompletedByItem, Data = new List <long[]> {
                        itemIds, itemNums
                    }
                };
                taskCompleteCondition.Add(taskCreaterParams);
            }
            else if (taskConfig.conditionExhibits.Length > 0 && taskConfig.conditionExhibitsNum.Length > 0)
            {
                long[] itemIds  = taskConfig.conditionExhibits;
                long[] itemNums = new long[taskConfig.conditionExhibitsNum.Length];
                Array.Copy(taskConfig.conditionExhibitsNum, itemNums, itemNums.Length);

                if (itemIds.Length != itemNums.Length)
                {
                    Debug.LogError($"task: {taskConfig.id} error ,complete exhibit nums error,item id:{itemIds.Length} ,item nums :{itemNums.Length}");
                }

                TaskCreaterParams taskCreaterParams = new TaskCreaterParams()
                {
                    Condition = (int)TaskCompleteMode.CompletedByItem, Data = new List <long[]> {
                        itemIds, itemNums
                    }
                };
                taskCompleteCondition.Add(taskCreaterParams);
            }

            return(taskCompleteCondition);
        }
Exemplo n.º 22
0
 /// <summary>
 /// vit,coin,cash,exp
 /// </summary>
 /// <param name="taskConfig"></param>
 /// <returns></returns>
 public static Tuple <int, int, int, int> GetReward(ConfTask taskConfig)
 {
     return(Tuple.Create <int, int, int, int>(taskConfig.rewardVit, taskConfig.rewardCoin, taskConfig.rewardCash, taskConfig.rewardExp));
 }
Exemplo n.º 23
0
        /// <summary>
        /// 解析任务配置-任务奖励信息
        /// </summary>
        /// <param name="taskConfig"></param>
        /// <returns></returns>
        private List <TaskCreaterParams> ParseTaskRewardInfo(ConfTask taskConfig)
        {
            List <TaskCreaterParams> taskCreaterParamList = new List <TaskCreaterParams>();

            //称号奖励
            if (taskConfig.rewardTitleId != 0)
            {
                TaskCreaterParams titleParam = new TaskCreaterParams()
                {
                    Condition = (int)TaskRewardMode.TITLE, Data = taskConfig.rewardTitleId
                };
                taskCreaterParamList.Add(titleParam);
            }

            //体力奖励
            if (taskConfig.rewardVit != 0)
            {
                TaskCreaterParams vitParam = new TaskCreaterParams()
                {
                    Condition = (int)TaskRewardMode.ITEM, Data = new RewardItemDataWrap()
                    {
                        ItemType = RewardItemType.VIT, ItemNum = taskConfig.rewardVit
                    }
                };
                taskCreaterParamList.Add(vitParam);
            }

            //金币奖励
            if (taskConfig.rewardCoin != 0)
            {
                TaskCreaterParams coinParam = new TaskCreaterParams()
                {
                    Condition = (int)TaskRewardMode.ITEM, Data = new RewardItemDataWrap()
                    {
                        ItemType = RewardItemType.COIN, ItemNum = taskConfig.rewardCoin
                    }
                };
                taskCreaterParamList.Add(coinParam);
            }

            //现金奖励
            if (taskConfig.rewardCash != 0)
            {
                TaskCreaterParams cashParam = new TaskCreaterParams()
                {
                    Condition = (int)TaskRewardMode.ITEM, Data = new RewardItemDataWrap()
                    {
                        ItemType = RewardItemType.CASH, ItemNum = taskConfig.rewardCash
                    }
                };
                taskCreaterParamList.Add(cashParam);
            }

            //经验奖励
            if (taskConfig.rewardExp != 0)
            {
                TaskCreaterParams expParam = new TaskCreaterParams()
                {
                    Condition = (int)TaskRewardMode.ITEM, Data = new RewardItemDataWrap()
                    {
                        ItemType = RewardItemType.EXP, ItemNum = taskConfig.rewardExp
                    }
                };
                taskCreaterParamList.Add(expParam);
            }

            //long chapter_id = GlobalInfo.MY_PLAYER_INFO.PlayerChapterSystem.CurrentChapterInfo.ChapterID;

            //ConfChapter chapter_data = ConfChapter.Get(chapter_id);

            //int jigsaw_idx = chapter_data.clueUnlockTaskIds.ToList().IndexOf(taskConfig.id);

            //if (jigsaw_idx >= 0)
            //{
            //    TaskCreaterParams expParam = new TaskCreaterParams() { Condition = (int)TaskRewardMode.CLUE, Data = new RewardClueDataWarp() { m_clueType = TaskClueMode.JIGSAW, m_png = chapter_data.clueIds[jigsaw_idx] } };
            //    taskCreaterParamList.Add(expParam);
            //}

            //int npc_idx = chapter_data.actorUnlockTaskIds.ToList().IndexOf(taskConfig.id);

            //if (npc_idx >= 0)
            //{
            //    TaskCreaterParams expParam = new TaskCreaterParams() { Condition = (int)TaskRewardMode.CLUE, Data = new RewardClueDataWarp() { m_clueType = TaskClueMode.NPC, m_id = chapter_data.actorIds[npc_idx] } };
            //    taskCreaterParamList.Add(expParam);
            //}

            //int scene_idx = chapter_data.sceneUnlockTaskIds.ToList().IndexOf(taskConfig.id);

            //if (scene_idx >= 0)
            //{
            //    TaskCreaterParams expParam = new TaskCreaterParams() { Condition = (int)TaskRewardMode.CLUE, Data = new RewardClueDataWarp() { m_clueType = TaskClueMode.SCENE, m_id = chapter_data.scenceIds[scene_idx] } };
            //    taskCreaterParamList.Add(expParam);
            //}



            //道具奖励
            if (taskConfig.rewardPropIds.Length > 0 && taskConfig.rewardPropNums.Length > 0)
            {
                long[] rewardItemIds  = taskConfig.rewardPropIds;
                int[]  rewardItemNums = taskConfig.rewardPropNums;

                if (rewardItemIds.Length != rewardItemNums.Length)
                {
                    Debug.LogError($"task {taskConfig.id} reward item error,item ids length {rewardItemIds.Length}, item nums length {rewardItemNums.Length}");
                }

                for (int i = 0; i < rewardItemIds.Length; ++i)
                {
                    RewardItemDataWrap rewardItemData = new RewardItemDataWrap()
                    {
                        ItemNum = rewardItemNums[i], ItemID = rewardItemIds[i], ItemType = RewardItemType.ITEM
                    };

                    taskCreaterParamList.Add(new TaskCreaterParams()
                    {
                        Condition = (int)TaskRewardMode.ITEM, Data = rewardItemData
                    });
                }
            }

            return(taskCreaterParamList);
        }
Exemplo n.º 24
0
 private void OnCompletedTask(TaskBase task)
 {
     UnityEngine.Debug.Log("task complete === " + task.TaskConfID);
     AddCompleteTask(task.TaskConfID, ConfTask.Get(task.TaskConfID).type);
     GameEvents.BigWorld_Event.OnReflashBuidTask.SafeInvoke();
 }
Exemplo n.º 25
0
        //private static void OnExcuteTask(NormalTask taskInfo)
        //{

        //    if (taskInfo.CompleteConditionList.Count <= 1)
        //    { //目录没有组合条件
        //        TaskCompleteCondition taskCompleteCondition = taskInfo.CompleteConditionList[0];
        //        TaskCompleteAttribute taskCompleteAttribute = taskCompleteCondition.GetType().GetCustomAttributes(typeof(TaskCompleteAttribute), true)[0] as TaskCompleteAttribute;
        //        switch (taskCompleteAttribute.CompleteMode)
        //        {
        //            case TaskCompleteMode.CompletedByDialog:
        //                TalkUIHelper.OnStartTalk((long)taskCompleteCondition.TaskCompleteData);

        //                break;
        //            case TaskCompleteMode.CompletedBySceneID:
        //                long sceneID = (long)taskCompleteCondition.TaskCompleteData;
        //                ChapterInfo taskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID);
        //                CommonHelper.OpenEnterGameSceneUI(sceneID, taskBelongChapterInfo, taskInfo.TaskConfID);
        //                break;

        //            //case TaskCompleteMode.CompletedByEvents:
        //            //    EventGameUIAssist.BeginEventGame((long)taskCompleteCondition.TaskCompleteData);
        //            //    break;

        //            case TaskCompleteMode.CompletedByItem:
        //                GameEvents.TaskEvents.OnShowCollectionTaskDetail.SafeInvoke(taskInfo, ShowSceneInBigWorld);
        //                break;
        //            case TaskCompleteMode.CompleteByReasonID:
        //                ReasoningUILogic.ShowReasonUIById((long)taskCompleteCondition.TaskCompleteData);
        //                break;
        //            case TaskCompleteMode.CompleteByScanID:
        //                long scanID = (long)taskCompleteCondition.TaskCompleteData;
        //                ChapterInfo scanTaskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID);
        //                CommonHelper.OpenEnterGameSceneUI(scanID, scanTaskBelongChapterInfo, taskInfo.TaskConfID);
        //                break;
        //            default:
        //                break;
        //        }
        //    }
        //    else
        //    {
        //        TaskCompleteCondition c_items = taskInfo.CompleteConditionList.Find((item) => item.GetType() == typeof(TaskCompleteItems));

        //        if (null != c_items)
        //        {
        //            TaskCompleteCondition c_scene = taskInfo.CompleteConditionList.Find((item) => item.GetType() == typeof(TaskCompleteByScene));

        //            Action<long> close_act = null;

        //            if (null != c_scene)
        //            {
        //                close_act = (task_conf_id) =>
        //                {
        //                    long task_config_id = task_conf_id;
        //                    long sceneID = (long)c_scene.TaskCompleteData;
        //                    ChapterInfo taskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID);
        //                    CommonHelper.OpenEnterGameSceneUI(sceneID, taskBelongChapterInfo, taskInfo.TaskConfID);
        //                };
        //            }

        //            GameEvents.TaskEvents.OnShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act);
        //        }
        //    }


        //}


        private static void OnExcuteTask(NormalTask taskInfo)
        {
            if (taskInfo.CompleteConditionList.Count <= 1)
            { //目录没有组合条件
                TaskCompleteCondition taskCompleteCondition = taskInfo.CompleteConditionList[0];
                TaskCompleteAttribute taskCompleteAttribute = taskCompleteCondition.GetType().GetCustomAttributes(typeof(TaskCompleteAttribute), true)[0] as TaskCompleteAttribute;
                switch (taskCompleteAttribute.CompleteMode)
                {
                case TaskCompleteMode.CompletedByDialog:
                {
                    TalkUIHelper.OnStartTalk((long)taskCompleteCondition.TaskCompleteData);
                }

                break;

                case TaskCompleteMode.CompletedBySceneID:
                {
                    Action <long> close_act = null;

                    close_act = (task_conf_id) =>
                    {
                        long        sceneID = (long)taskCompleteCondition.TaskCompleteData;
                        ChapterInfo taskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID);
                        CommonHelper.OpenEnterGameSceneUI(sceneID, taskBelongChapterInfo, taskInfo.TaskConfID);
                    };


                    GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act);
                }
                break;

                //case TaskCompleteMode.CompletedByEvents:
                //    EventGameUIAssist.BeginEventGame((long)taskCompleteCondition.TaskCompleteData);
                //    break;

                case TaskCompleteMode.CompletedByItem:
                {
                    GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, ShowSceneInBigWorld);
                }
                break;

                case TaskCompleteMode.CompleteByReasonID:
                {
                    Action <long> close_act = null;

                    close_act = (task_conf_id) =>
                    {
                        ReasoningUILogic.ShowReasonUIById((long)taskCompleteCondition.TaskCompleteData);
                    };

                    GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act);
                }
                break;

                case TaskCompleteMode.CompleteByCombinePropID:
                {
                    Action <long> close_act = null;

                    close_act = (task_conf_id) =>
                    {
                        long[] ids = ConfTask.Get(task_conf_id).conditionPropExIds;

                        if (ids.Length > 0)
                        {
                            FrameMgr.OpenUIParams uiParams = new FrameMgr.OpenUIParams(UIDefine.UI_COMBINE);
                            uiParams.Param = ids[0];

                            EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(uiParams);
                        }
                        else
                        {
                            EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_COMBINE);
                        }
                    };

                    GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act);
                }
                break;

                case TaskCompleteMode.CompleteByScanID:

                {
                    Action <long> close_act = null;

                    close_act = (task_conf_id) =>
                    {
                        long        scanID = (long)taskCompleteCondition.TaskCompleteData;
                        ChapterInfo scanTaskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID);
                        CommonHelper.OpenEnterGameScanUI(scanID, scanTaskBelongChapterInfo, taskInfo.TaskConfID);
                    };

                    GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act);
                }
                break;

                default:
                    break;
                }
            }
            else
            {
                TaskCompleteCondition c_items = taskInfo.CompleteConditionList.Find((item) => item.GetType() == typeof(TaskCompleteItems));

                if (null != c_items)
                {
                    TaskCompleteCondition c_scene = taskInfo.CompleteConditionList.Find((item) => item.GetType() == typeof(TaskCompleteByScene));

                    Action <long> close_act = null;

                    if (null != c_scene)
                    {
                        close_act = (task_conf_id) =>
                        {
                            long        task_config_id        = task_conf_id;
                            long        sceneID               = (long)c_scene.TaskCompleteData;
                            ChapterInfo taskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID);
                            CommonHelper.OpenEnterGameSceneUI(sceneID, taskBelongChapterInfo, taskInfo.TaskConfID);
                        };
                    }

                    GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act);
                }
            }
        }