//检查所有图鉴 public bool HasHandBookRedPoint() { Hotfix_LT.Data.FuncTemplate m_FuncTpl = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10049); if (!m_FuncTpl.IsConditionOK()) { return(false); } return(IsHandBookCanLevelUp() || IsHandBookCanBreakUp() || IsHandPartnerCanUp(eRoleAttr.Feng) || IsHandPartnerCanUp(eRoleAttr.Shui) || IsHandPartnerCanUp(eRoleAttr.Huo) || IsCanGetScore()); }
/// <summary> /// 判断是否显示合成按钮,以及相关处理 /// </summary> /// <param name="isShow"></param> public void ShowSynthesis(DetailedEquipmentInfo data) { if (data.EquipLevel >= MaxLevel && data.QualityLevel == 6) { //获取创建账号登录时间 Hotfix_LT.Data.FuncTemplate tempFun = new Hotfix_LT.Data.FuncTemplate(); tempFun = Hotfix_LT.Data.FuncTemplateManager.Instance.GetFunc(10086); bool isUnLock = false; if (tempFun == null) { isUnLock = true; } else { isUnLock = tempFun.IsConditionOK(); } UpLevelBtnRoot.CustomSetActive(false); SynthesisBtn.CustomSetActive(true); ///先做修改进行测试 if (isUnLock) { SynthesisLabelTop.transform.localPosition = new Vector3(0, 14, 0); SynthesisLabelTop.transform.localScale = Vector3.one; SynthesisReflashTip.text = ""; SynthesisBtnBG.GetComponent <BoxCollider>().enabled = isUnLock; SynthesisBtnBG.GetComponent <UISprite>().color = new Color(1, 1, 1, 1); SynthesisBtnBG.GetComponent <UISprite>().spriteName = "Ty_Button_3"; } else { SynthesisLabelTop.transform.localPosition = new Vector3(0, 50, 0); SynthesisLabelTop.transform.localScale = Vector3.one; SynthesisReflashTip.text = tempFun.GetConditionStr(); SynthesisBtnBG.GetComponent <BoxCollider>().enabled = false; SynthesisBtnBG.GetComponent <UISprite>().color = new Color(1, 0, 1, 1); SynthesisBtnBG.GetComponent <UISprite>().spriteName = "Ty_Button_1"; } } else { UpLevelBtnRoot.CustomSetActive(true); SynthesisBtn.CustomSetActive(false); } }
public List <int> GetUnlockFuncIdLists() { // if (mUnlockFuncIdLists!=null) // { // return mUnlockFuncIdLists; // } mUnlockFuncIdLists = new List <int>(); var enumerator = mFuncTbl.Values.GetEnumerator(); while (enumerator.MoveNext()) { FuncTemplate obj = enumerator.Current; if (!obj.IsConditionOK()) { mUnlockFuncIdLists.Add(obj.id); } } return(mUnlockFuncIdLists); }
//初始化预告列表 public void InitNotice() { if (mFuncTbl == null) { return; } if (mNoticeFuncTbl == null) { mNoticeFuncTbl = new List <FuncTemplate>(); } else { mNoticeFuncTbl.Clear(); } var enumerator = mFuncTbl.Values.GetEnumerator(); while (enumerator.MoveNext()) { FuncTemplate funTemp = enumerator.Current; if (funTemp.notice && !funTemp.IsConditionOK()) { mNoticeFuncTbl.Add(funTemp); } } mNoticeFuncTbl.Sort((x, y) => { int flagx = 0; int flagy = 0; flagx = x.condition.Contains("m-") ? 0 : 1; flagy = y.condition.Contains("m-") ? 0 : 1; if (flagx != flagy) { return(flagx - flagy); } int.TryParse(x.condition.Replace("m-", string.Empty), out flagx); int.TryParse(y.condition.Replace("m-", string.Empty), out flagy); return(flagx - flagy); }); }
public static void OpenFunc(int func_id, object _param = null, bool isqueued = false) { if (sInstance == null) { return; } FuncTemplate func = sInstance.GetFunc(func_id); if (func != null) { if (func.IsConditionOK()) { if (func.ui_model.Equals("TaskChase")) { GlobalMenuManager.Instance.Open(func.ui_model, _param); } else if (func.ui_model.Equals("PartnerHandbookHudView")) { GlobalMenuManager.Instance.Open("PartnerHandbookHudView"); } else if (func.ui_model.Equals("ArenaView")) { GlobalMenuManager.Instance.Open("ArenaHudUI"); } else if (func.ui_model.Equals("HonorArenaView")) { GlobalMenuManager.Instance.Open("HonorArenaView"); } else if (func.ui_model.Equals("AllianceView")) { //AllianceHudUI.OpenHud(null); } else if (func.ui_model.Equals("ExpeditionHud")) { GlobalMenuManager.Instance.Open("ExpeditionUI"); } else if (func.ui_model.Equals("GoldBuyView")) { GlobalMenuManager.Instance.Open("GoldNormalBuy"); } else if (func.ui_model.Equals("LadderView")) { GlobalMenuManager.Instance.Open("LadderUI"); } else if (func.ui_model.Equals("LTRuleUIView")) { if (_param != null) { string id = _param as string; string text = EB.Localizer.GetString(EB.Symbols.LocIdPrefix + id.ToUpper()); GlobalMenuManager.Instance.Open(func.ui_model, text); } else { GlobalMenuManager.Instance.Open(func.ui_model); } } else if (func.ui_model.Equals("LTLegionWarJoinView")) { if (!AllianceUtil.IsJoinedAlliance) { MessageTemplateManager.ShowMessage(eMessageUIType.MessageDialogue_2, EB.Localizer.GetString("ID_codefont_in_FuncTemplateManager_5098"), delegate(int r) { if (r == 0) { GlobalMenuManager.Instance.Open("LTSearchJTMenu"); if ((LegionModel.GetInstance().searchItemDatas == null || LegionModel.GetInstance().searchItemDatas.Length == 0) || Time.unscaledTime - LegionModel.GetInstance().searchListTime > 10) //无军团列表数据或最近一次不是自动搜索或拉取数据超过CD10秒 { LegionModel.GetInstance().searchListTime = Time.unscaledTime; AlliancesManager.Instance.RequestAllianceList(); } } }); } else { GlobalMenuManager.Instance.Open(func.ui_model); FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.alliance_war_topic, FusionTelemetry.GamePlayData.alliance_war_event_id, FusionTelemetry.GamePlayData.alliance_war_umengId, "open"); } } else if (func.ui_model.Equals("LTWorldBossHud")) { //var activitytmp = EventTemplateManager.Instance.GetSpecialActivity(LTWorldBossDataManager.ActivityId);//满足条件才进入无需再次判断 //if (activitytmp != null) //{ // if (BalanceResourceUtil.GetUserLevel() < activitytmp.level) // { // var data = Johny.HashtablePool.Claim(); // data.Add("0", activitytmp.level); // MessageTemplateManager.ShowMessage(902009, data, null); // Johny.HashtablePool.Release(data); // return; // } //} //注掉判断使在非活动时间内依然可以打开世界boos活动界面需要在后面加限制 if (!LTWorldBossDataManager.Instance.IsLive()) { //MessageTemplateManager.ShowMessage(902185); //return; } if (!LTWorldBossDataManager.Instance.IsWorldBossStart()) { //MessageTemplateManager.ShowMessage(902090); //return; } GlobalMenuManager.Instance.Open("LTWorldBossHud"); FusionTelemetry.GamePlayData.PostEvent(FusionTelemetry.GamePlayData.worldboss_topic, FusionTelemetry.GamePlayData.worldboss_event_id, FusionTelemetry.GamePlayData.worldboss_umengId, "open"); } else { if (func.ui_model.Equals("LTAllianceEscortHud")) { if (!EventTemplateManager.Instance.IsTimeOK("escort_start", "escort_stop")) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_AllianceEscortUtil_4329")); return; } if (!AllianceUtil.IsJoinedAlliance) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_AllianceEscortUtil_4483")); return; } if (AlliancesManager.Instance.DartData.State == eAllianceDartCurrentState.Transfering) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_FuncTemplateManager_7841")); return; } FusionTelemetry.GamePlayData.PostEsortEvent("open", "esort"); //现在没有这种限制 //if (AlliancesManager.Instance.DartData.DartState == eAllianceDartState.Robed) //{ // MessageTemplateManager.ShowMessage(902055); //已劫掠过,不能接受运镖任务。 // return; //} } else if (func.ui_model.Equals("LTNationBattleEntryUI")) { if (string.IsNullOrEmpty(NationManager.Instance.Account.NationName)) { GlobalMenuManager.Instance.Open("LTNationHudUI"); return; } } if (_param != null) { GlobalMenuManager.Instance.Open(func.ui_model, _param); } else { GlobalMenuManager.Instance.Open(func.ui_model); } } } else { if (func.openType != FuncOpenType.level) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, func.GetConditionStr()); } else { var ht = Johny.HashtablePool.Claim(); ht.Add("0", func.condition); MessageTemplateManager.ShowMessage(902014, ht, null); Johny.HashtablePool.Release(ht); } } } }
public List <FuncTemplate> GetLevelUpFunc(int curLevel)//返回升级显示功能列表,现在返回主线副本和等级条件 { List <FuncTemplate> temp = new List <FuncTemplate>(); var enumerator = mFuncTbl.Values.GetEnumerator(); while (enumerator.MoveNext()) { FuncTemplate obj = enumerator.Current; if (obj.condition == null || string.IsNullOrEmpty(obj.discript) || obj.discript.Equals("0")) { continue; } switch (obj.openType) { case FuncOpenType.none: break; case FuncOpenType.locked: break; case FuncOpenType.time: break; case FuncOpenType.level: if (obj.conditionParam > curLevel) { temp.Add(obj); } break; case FuncOpenType.maincampaign: if (!obj.IsConditionOK()) { temp.Add(obj); } break; default: break; } } temp.Sort((a, b) => { int flagx; int flagy; flagx = a.IsConditionOK() ? 0 : 1; flagy = b.IsConditionOK() ? 0 : 1; if (flagx != flagy) { return(flagx - flagy); } else { flagx = a.openType == FuncOpenType.maincampaign ? 0 : 1; flagy = b.openType == FuncOpenType.maincampaign ? 0 : 1; if (flagx != flagy) { return(flagx - flagy); } else { return(a.conditionParam - b.conditionParam); } } }); return(temp); }