public static void StartTaskAcceptNpcPathFinding(string taskid) { if (taskid == null) { return; } Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(taskid); if (taskTpl == null) { EB.Debug.LogWarning("No such task in table!!!"); return; } string task_npc = taskTpl.npc_id; string task_scene = taskTpl.scene_id; if (task_npc != null) { if (AllianceUtil.IsInTransferDart) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_FuncOpenConditionComponent_4248")); } else { EB.Coroutines.Stop(FindNpcFly(task_scene, task_npc)); EB.Coroutines.Run(FindNpcFly(task_scene, task_npc)); } } }
public void OnCompleteTask(EB.Sparx.Response result) { InputBlockerManager.Instance.UnBlock(InputBlockReason.FUSION_BLOCK_UI_INTERACTION); if (result.sucessful) { if (result.hashtable != null) { DataLookupsCache.Instance.CacheData(result.hashtable); } List <LTShowItemData> mlist = TaskStaticData.GetItemRewardList(taskId); FusionTelemetry.ItemsUmengCurrency(mlist, "任务获得"); Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(taskId); FusionTelemetry.TaskData.PostEvent(taskId, taskTpl.task_name, taskTpl.task_type.ToString()); if (mlist.Count > 0) { var ht = Johny.HashtablePool.Claim(); ht.Add("reward", mlist); GlobalMenuManager.Instance.Open("LTShowRewardView", ht); } } else { result.CheckAndShowModal(); } }
private bool isMyTask(string dataID) { //这里的6 是有问题的 因为当id的路径变化时 长度就不是6了 string task_id = dataID.Remove(0, TaskSystem.TASKPREFIX_LENGTH); Hashtable task = mDL.GetDefaultLookupData <Hashtable>(); if (task == null) { return(false); } Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(task_id); if (taskTpl != null) { //normal task didnot have npc if (taskTpl.task_type == (int)eTaskType.Normal) { return(false); } string npc_id = m_npcName; string task_npc_id; string task_npc_scene; if (task["state"].Equals(TaskSystem.UNACCEPTABLE)) { task_npc_id = /*task_template_h["npc_id"] as string; */ taskTpl.npc_id; task_npc_scene = taskTpl.scene_id; } else if (task["state"].Equals(TaskSystem.ACCEPTABLE)) { task_npc_id = /*task_template_h["npc_id"] as string; */ taskTpl.npc_id; task_npc_scene = taskTpl.scene_id; } else if (task["state"].Equals(TaskSystem.RUNNING)) { task_npc_id = /*task_template_h["commit_npc_id"] as string;*/ taskTpl.commit_npc_id; task_npc_scene = taskTpl.commit_scene_id; } else if (task["state"].Equals(TaskSystem.FINISHED)) { task_npc_id = /*task_template_h["commit_npc_id"] as string;*/ taskTpl.commit_npc_id; task_npc_scene = taskTpl.commit_scene_id; } else { task_npc_id = /*task_template_h["npc_id"] as string;*/ taskTpl.npc_id; task_npc_scene = taskTpl.scene_id; } if (!npc_id.Equals(task_npc_id) || task_npc_scene != MainLandLogic.GetInstance().CurrentSceneName) { return(false); } return(true); } return(true); }
private void InitItem() { Hotfix_LT.Data.TaskTemplate tpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(mTaskId); List <LTShowItemData> list = TaskStaticData.GetItemRewardList(mTaskId); if (list.Count > 0) { Item.LTItemData = list[0]; Item.mDMono.gameObject.CustomSetActive(true); BtnBox.gameObject.CustomSetActive(true); } }
/// <summary> /// 是否主线任务 task_type==1 /// </summary> /// <returns></returns> public bool IsMainTask() { string task_id = mDL.DefaultDataID.Remove(0, TaskSystem.TASKPREFIX_LENGTH); Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(task_id); if (taskTpl != null) { if (taskTpl.task_type == 1) { return(true); } } return(false); }
public override void OnFetchData(EB.Sparx.Response res, int reqInstanceID) { if (res.sucessful) { InitState(); Hotfix_LT.Data.TaskTemplate tpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(mTaskId); List <LTShowItemData> list = TaskStaticData.GetItemRewardList(mTaskId); for (int i = 0; i < list.Count; i++) { LTIconNameQuality icon_name_lvl = LTItemInfoTool.GetInfo(list[i].id, list[i].type); MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, string.Format(EB.Localizer.GetString("ID_codefont_in_LTChallengeInstanceHudController_20066"), icon_name_lvl.name, list[i].count)); } Hotfix_LT.Messenger.Raise(EventName.LTChallengeInstaceRewardGet, mLevel); } else if (res.fatal) { SparxHub.Instance.FatalError(res.localizedError); } }
public void InitData(LTWelfareGrowUpTaskData data) { Data = data; if (data == null) { mDMono.gameObject.CustomSetActive(false); return; } Hotfix_LT.Data.TaskTemplate TaskTpl = data.TaskTpl; TitleLabel.text = data.TaskTpl.target_tips; TitleLabel.transform.GetComponent <UISprite>("LevelSprite").UpdateAnchors(); List <LTShowItemData> rewardDatas = TaskStaticData.GetItemRewardList(Data.TaskId); for (int i = 0; i < ItemList.Count; i++) { if (Data.hasBattlePass && i == ItemList.Count - 1) { List <LTShowItemData> battlePassList = Hotfix_LT.Data.TaskTemplateManager.Instance.GetBattlePassByTaskId(Data.TaskId); var item = battlePassList[0]; ItemList[i].LTItemData = new LTShowItemData(item.id, item.count, item.type, false); ItemList[i].mDMono.gameObject.CustomSetActive(true); BattlePassObj.CustomSetActive(true); } else if (rewardDatas.Count > i) { var item = rewardDatas[i]; ItemList[i].LTItemData = new LTShowItemData(item.id, item.count, item.type, false); ItemList[i].mDMono.gameObject.CustomSetActive(true); } else { ItemList[i].mDMono.gameObject.CustomSetActive(false); } } ItemGrid.Reposition(); TipLabel.text = string.Format("{0}/{1}", data.Finished?("[42fe79]" + data.TargetNum) : data.CurNum.ToString(), data.TargetNum); SetReceiveBtn(); }
public override void OnLookupUpdate(string dataID, object value) { base.OnLookupUpdate(dataID, value); if (dataID != null) { m_taskid = 0; //dataID: tasks.2010 int.TryParse(dataID.Remove(0, TaskSystem.TASKPREFIX_LENGTH), out m_taskid); string taskState = EB.Dot.String("state", value, ""); Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(m_taskid); if (taskTpl == null) { return; } if (dict.ContainsKey(taskTpl.task_type)) { m_UISprite.spriteName = dict[taskTpl.task_type]; } LTUIUtil.SetText(m_NameLabel, taskTpl.task_name); LTUIUtil.SetText(m_TipsLabel, taskTpl.target_tips); LTUIUtil.SetText(m_GetPointLabel, "x" + (taskTpl.task_type == (int)eTaskType.Main?taskTpl.achievement_point.ToString():taskTpl.activity_point.ToString())); { int needtimes = EB.Dot.Integer("event_count.target_num", value, 1); int currenttimes = EB.Dot.Integer("event_count.current_num", value, 1); if (m_NeedTimesLabel != null) { //if (taskTpl.task_type == (int)eTaskType.Normal) { if (currenttimes >= needtimes) { currenttimes = needtimes; } } if (taskTpl.task_type == (int)eTaskType.Normal || taskTpl.task_type == (int)eTaskType.Week) { m_NeedTimesLabel2.gameObject.CustomSetActive(false); m_ProgressBar.gameObject.CustomSetActive(true); LTUIUtil.SetText(m_NeedTimesLabel, LT.Hotfix.Utility.ColorUtility.TaskFormatEnoughStr(currenttimes, needtimes)); m_ProgressBar.value = currenttimes * 1.0f / needtimes; } else if (taskTpl.task_type == (int)eTaskType.Main) { m_NeedTimesLabel2.gameObject.CustomSetActive(true); m_ProgressBar.gameObject.CustomSetActive(false); LTUIUtil.SetText(m_NeedTimesLabel2, LT.Hotfix.Utility.ColorUtility.TaskFormatEnoughStr(currenttimes, needtimes)); } } } m_TaskState.mDL.DefaultDataID = dataID + ".state"; int taskid = 0; int.TryParse(dataID.Replace(TaskStaticData.TaskPrefix, ""), out taskid); if (m_taskid != taskid) { Debug.LogError("m_taskid == taskid"); } List <LTShowItemData> rewardDatas = TaskStaticData.GetItemRewardList(taskid); List <LTShowItemData> temp = new List <LTShowItemData>(); for (int viewIndex = 0; viewIndex < m_RewardItemList.Count; ++viewIndex) { if (viewIndex < rewardDatas.Count) { m_RewardItemList[viewIndex].LTItemData = new LTShowItemData(rewardDatas[viewIndex].id, rewardDatas[viewIndex].count, rewardDatas[viewIndex].type, false); //日常任务没有了奖励 if (taskTpl.task_type == 1) { m_RewardItemList[viewIndex].mDMono.gameObject.SetActive(true); } } else { m_RewardItemList[viewIndex].mDMono.gameObject.SetActive(false); } } } }
static void ProcessSpecialActionTaskRunning(string taskid) { Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(taskid); if (taskTpl == null) { return; } int taskspecialtype = 0;; if (!int.TryParse(taskTpl.target_parameter_1, out taskspecialtype)) { return; } switch ((eTaskSpecialType)taskspecialtype) { case eTaskSpecialType.FINISH_CAMPAIGN: if (AllianceUtil.IsInTransferDart) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855")); return; } GlobalMenuManager.Instance.Open("LTInstanceMapHud"); break; case eTaskSpecialType.ALLIACE_DONATE: LegionLogic.GetInstance().ShowUI(ChoiceState.Donate); break; case eTaskSpecialType.GOLD_CAMPAIGN: if (AllianceUtil.IsInTransferDart) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855")); return; } Hotfix_LT.Data.FuncTemplate ftemp = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10020); if (ftemp != null && !ftemp.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ftemp.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("LTResourceInstanceUI", "Gold"); break; case eTaskSpecialType.WORLD_CHAT: GlobalMenuManager.Instance.Open("ChatHudView", null); break; case eTaskSpecialType.LADDER: StartTaskAcceptNpcPathFinding(taskid); break; case eTaskSpecialType.ARENA: StartTaskAcceptNpcPathFinding(taskid); break; case eTaskSpecialType.BUY_GOLD: GlobalMenuManager.Instance.Open("LTResourceShopUI"); break; case eTaskSpecialType.GAMBLE: GlobalMenuManager.Instance.Open("LTDrawCardTypeUI"); break; case eTaskSpecialType.YABIAO: StartTaskAcceptNpcPathFinding(taskid); break; case eTaskSpecialType.UlTIMATE: StartTaskAcceptNpcPathFinding(taskid); break; case eTaskSpecialType.HANT: StartTaskAcceptNpcPathFinding(taskid); break; case eTaskSpecialType.LADDER_CHALLENGE: StartTaskAcceptNpcPathFinding(taskid); break; case eTaskSpecialType.BUY_VIGOR: GlobalMenuManager.Instance.Open("LTResourceShopUI"); break; case eTaskSpecialType.BUY_ITEM: GlobalMenuManager.Instance.Open("LTStoreUI"); break; case eTaskSpecialType.PK: GlobalMenuManager.Instance.ComebackToMianMenu(); break; case eTaskSpecialType.CHALLENGE_CAMPAIGN: if (AllianceUtil.IsInTransferDart) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855")); return; } GlobalMenuManager.Instance.Open("LTChallengeInstanceSelectHud"); break; case eTaskSpecialType.SEND_VIGOR: Hotfix_LT.Data.FuncTemplate ft3 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10057); if (ft3 != null && !ft3.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft3.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("FriendHud", null); break; case eTaskSpecialType.COST_DIAMOND: GlobalMenuManager.Instance.Open("LTDrawCardTypeUI", DrawCardType.hc); break; case eTaskSpecialType.EQUIP_INTENSIFY: Hotfix_LT.Data.FuncTemplate ft2 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050); if (ft2 != null && !ft2.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft2.GetConditionStr()); return; } InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f); GlobalMenuManager.Instance.Open("LTPartnerEquipmentUI", LTPartnerDataManager.Instance.GetOwnPartnerList()[0]); break; case eTaskSpecialType.CLASH_OF_HEROES: StartTaskAcceptNpcPathFinding(taskid); break; case eTaskSpecialType.EXP_CAMPAIGN: if (AllianceUtil.IsInTransferDart) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855")); return; } Hotfix_LT.Data.FuncTemplate ft = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10021); if (ft != null && !ft.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("LTResourceInstanceUI", "Exp"); break; case eTaskSpecialType.CHALLENGE_INSTANCE: if (AllianceUtil.IsInTransferDart) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855")); return; } Hotfix_LT.Data.FuncTemplate f_ch = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10065); if (f_ch != null && !f_ch.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, f_ch.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("LTChallengeInstanceSelectHud"); break; case eTaskSpecialType.LEGION_INSSTANCE: if (!LegionModel.GetInstance().isJoinedLegion) { LegionLogic.GetInstance().ShowUI(); } else { GlobalMenuManager.Instance.Open("LTLegionFBUI"); } break; case eTaskSpecialType.WORLD_BOSS: if (AllianceUtil.GetIsInTransferDart(null)) { return; } //配置npc GlobalMenuManager.Instance.CloseMenu("NormalTaskView"); string[] strs = new string[2] { "s001a", "AreaTrigger_E" }; WorldMapPathManager.Instance.StartPathFindToNpcFly(MainLandLogic.GetInstance().CurrentSceneName, strs[0], strs[1]); break; case eTaskSpecialType.PARENER_ADVANCED: Hotfix_LT.Data.FuncTemplate ft4 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050); if (ft4 != null && !ft4.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft4.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("LTPartnerView", "Develop_Upgrade"); break; case eTaskSpecialType.PARENER_UPLEVEL: Hotfix_LT.Data.FuncTemplate ft5 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050); if (ft5 != null && !ft5.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft5.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("LTPartnerView", "Develop"); break; default: break; } }
//如果处于进行状态 则导航到目的(NPC,场景,副本,某某功能) public static void ProcessTaskRunning(string taskid) { Hotfix_LT.Data.TaskTemplate taskTpl = Hotfix_LT.Data.TaskTemplateManager.Instance.GetTask(taskid); switch (taskTpl.target_type) { case 103: StartTaskCampaignFinding(taskid, false); break; case 2: StartTaskCampaignFinding(taskid, true); break; case 301: //301 = 增加主线(累计计数型) int target_parameter = int.Parse(taskTpl.target_parameter_1); switch (target_parameter) { case 1: //主角等级 GlobalMenuManager.Instance.Open("LTInstanceMapHud", null); break; case 2: //征战关卡获得星数 if (AllianceUtil.IsInTransferDart) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855")); return; } GlobalMenuManager.Instance.Open("LTInstanceMapHud", null); break; case 3: //夺宝奇兵累计杀怪数 GlobalMenuManager.Instance.ComebackToMianMenu(); break; case 4: //累计军团护送次数 StartTaskAcceptNpcPathFinding(taskid); break; case 5: //累计军团援助次数 GlobalMenuManager.Instance.ComebackToMianMenu(); break; case 6: //累计军团拦截次数 StartTaskAcceptNpcPathFinding(taskid); break; case 7: //累计幸运悬赏次数 StartTaskAcceptNpcPathFinding(taskid); break; case 8: //累计英雄交锋次数 StartTaskAcceptNpcPathFinding(taskid); break; case 9: //累计角斗场次数 StartTaskAcceptNpcPathFinding(taskid); break; case 10: //累计伙伴上阵图鉴数量 Hotfix_LT.Data.FuncTemplate func = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10049); if (!func.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, func.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("PartnerHandbookHudView"); break; case 11: //玩家拥有好友数量 { Hotfix_LT.Data.FuncTemplate ftemp = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10057); if (ftemp != null && !ftemp.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ftemp.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("FriendHud", null); } break; case 12: //玩家拥有伙伴数量 GlobalMenuManager.Instance.Open("LTDrawCardTypeUI"); break; case 13: //伙伴总星级 Hotfix_LT.Data.FuncTemplate ft = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050); if (ft != null && !ft.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("LTPartnerView", "Develop_StarUp"); break; case 14: //累计军团预赛获得分数 LegionLogic.GetInstance().ShowUI(); break; case 15: //累计购买金币次数 GlobalMenuManager.Instance.Open("LTResourceShopUI"); break; case 16: //累计购买体力次数 GlobalMenuManager.Instance.Open("LTResourceShopUI"); break; case 17: //累计购买伙伴经验次数 GlobalMenuManager.Instance.Open("LTResourceShopUI"); break; case 18: //累计购买入场券次数 GlobalMenuManager.Instance.Open("LTResourceShopUI"); break; case 19: //累计购买金币抽卡次数 GlobalMenuManager.Instance.Open("LTDrawCardTypeUI", DrawCardType.gold); break; case 20: //累计购买钻石抽卡次数 GlobalMenuManager.Instance.Open("LTDrawCardTypeUI", DrawCardType.hc); break; case 21: //累计完成日常任务次数 GlobalMenuManager.Instance.Open("NormalTaskView", null); break; case 22: //累计天梯胜利次数 StartTaskAcceptNpcPathFinding(taskid); break; case 23: //累计军团捐献获得军团币数量 LegionLogic.GetInstance().ShowUI(ChoiceState.Donate); break; case 24: //累计军团护送次数 StartTaskAcceptNpcPathFinding(taskid); break; default: EB.Debug.LogError("Main Task target_parameter_1 Error ,target_parameter_1={0}", target_parameter); break; } break; case 302: int target_parameter_other = int.Parse(taskTpl.target_parameter_1); switch (target_parameter_other) { case 1: //玩家完美通关金币副本XX难度 { if (AllianceUtil.IsInTransferDart) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855")); return; } Hotfix_LT.Data.FuncTemplate ftemp = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10020); if (ftemp != null && !ftemp.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ftemp.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("LTResourceInstanceUI", "Gold"); } break; case 2: //玩家完美通关经验副本XX难度 if (AllianceUtil.IsInTransferDart) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_TaskSystem_5855")); return; } Hotfix_LT.Data.FuncTemplate ftemp1 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10021); if (ftemp1 != null && !ftemp1.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ftemp1.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("LTResourceInstanceUI", "Exp"); break; case 3: //玩家通关极限试练X-Y StartTaskAcceptNpcPathFinding(taskid); break; case 4: //玩家天梯达到XX段位 StartTaskAcceptNpcPathFinding(taskid); break; case 5: //玩家角斗场排名达到X StartTaskAcceptNpcPathFinding(taskid); break; case 6: //玩家爵位晋升为XX Hotfix_LT.Data.FuncTemplateManager.OpenFunc(10069); break; case 7: //玩家攻击城池累计伤害达到X GlobalMenuManager.Instance.Open("LTNationBattleEntryUI"); break; case 8: //玩家防守城池累计修理值达到X GlobalMenuManager.Instance.Open("LTNationBattleEntryUI"); break; case 9: //玩家X个图鉴评分等级评分达到Y Hotfix_LT.Data.FuncTemplate func = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10049); if (!func.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, func.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("PartnerHandbookHudView"); break; case 10: //玩家把X个伙伴升到Y级 Hotfix_LT.Data.FuncTemplate ft = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050); if (ft != null && !ft.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("LTPartnerView", "Develop"); break; case 11: //玩家把X件装备强化到Y级 Hotfix_LT.Data.FuncTemplate ft1 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050); if (ft1 != null && !ft1.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft1.GetConditionStr()); return; } InputBlockerManager.Instance.Block(InputBlockReason.FUSION_BLOCK_UI_INTERACTION, 0.5f); GlobalMenuManager.Instance.Open("LTPartnerEquipmentUI", LTPartnerDataManager.Instance.GetOwnPartnerList()[0]); break; case 12: //玩家把X个伙伴进阶到Y Hotfix_LT.Data.FuncTemplate ft2 = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10050); if (ft2 != null && !ft2.IsConditionOK()) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, ft2.GetConditionStr()); return; } GlobalMenuManager.Instance.Open("LTPartnerView", "Develop_Upgrade"); break; case 13: //荣耀角斗场积分达到Y分 StartTaskAcceptNpcPathFinding(taskid); break; case 14: //天梯达到Y分 StartTaskAcceptNpcPathFinding(taskid); break; case 15: //战力达到Y GlobalMenuManager.Instance.Open("LTPartnerView", "Develop_Upgrade"); break; case 16: //荣耀角斗场获胜次数达到X场 StartTaskAcceptNpcPathFinding(taskid); break; case 17: //亚曼拉单次挑战伤害达到X StartTaskAcceptNpcPathFinding(taskid); break; case 18: //军团副本单次挑战获得宝箱数达到X个 LegionLogic.GetInstance().OpenLegionBossUI(); break; default: EB.Debug.LogError("Main Task target_parameter_1 Error ,target_parameter_1={0}", target_parameter_other); break; } break; case 7: //日常任务 ProcessSpecialActionTaskRunning(taskid); break; default: break; } }
public override void OnFocus() { base.OnFocus(); //LTWelfareModel.Instance.UpdataTasks(); if (!hadSendRq) { //图鉴任务需要客户端先计算,再决定是否拉代码 List <LTWelfareGrowUpTaskData> levelList = LTWelfareModel.Instance.GetHandBookTasks(); if (LTWelfareGrowUpController.DayJudge()) { bool needResetHandBookData = false; if (levelList.Count > 0) { for (int i = 0; i < levelList.Count; i++) { if (!levelList[i].Finished) { Hotfix_LT.Data.TaskTemplate TaskTpl = levelList[i].TaskTpl; List <int> levels = LTPartnerHandbookManager.Instance.GetHandbookLevelList(); int id = int.Parse(TaskTpl.target_parameter_2); int count = int.Parse(TaskTpl.target_parameter_3); int curCount = 0; for (int j = 0; j < levels.Count; j++) { if (levels[j] >= id) { curCount++; } if (count == curCount) { needResetHandBookData = true; break; } } } } } if (needResetHandBookData) { LTWelfareModel.Instance.ResetHandBookData(delegate(bool success) { if (success) { hadSendRq = true; LTWelfareModel.Instance.UpdataTasks(); } }); } } } if (LTWelfareEvent.WelfareGrowUpUpdata != null) { LTWelfareEvent.WelfareGrowUpUpdata(); } if (LTWelfareEvent.WelfareOnfocus != null) { LTWelfareEvent.WelfareOnfocus(); } InitRedPoint(); }