public static bool IsTimeOk(int activity_id) { Hotfix_LT.Data.SpecialActivityTemplate template = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(activity_id); if (template == null) { EB.Debug.LogError("Hotfix_LT.Data.SpecialActivityTemplate =null activity_id={0}", activity_id); return(false); } List <Hotfix_LT.Data.NormalActivityInstanceTemplate> instances = Hotfix_LT.Data.EventTemplateManager.Instance.GetNormalActivityInstanceTemplates(activity_id); int curweek = EB.Time.LocalWeek; int curhours = EB.Time.LocalTimeOfDay.Hours; int curminutes = EB.Time.LocalTimeOfDay.Minutes; int curtime = curhours * 100 + curminutes; string weeks = template.open_time; for (var i = 0; i < instances.Count; i++) { var ins = instances[i]; int s_i = int.Parse(ins.s.Replace(":", "")); int e_i = int.Parse(ins.e.Replace(":", "")); bool is_timeok = IsTimeOk(curweek, curtime, ins.t, s_i, e_i, weeks); if (is_timeok) { return(true); } } return(false); }
public void OnGotoLegionWar() { if (AllianceUtil.GetIsInTransferDart("")) { return; } if (!(warTime == LegionWarTimeLine.QualifyGame || warTime == LegionWarTimeLine.SemiFinal || warTime == LegionWarTimeLine.Final)) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_LegionPageActivity_7613")); return; } Hotfix_LT.Data.SpecialActivityTemplate temp = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(9004); string[] strs = temp.nav_parameter.Split(';'); if (strs.Length < 2) { EB.Debug.LogError(string.Format("NavParameter is Error, Length less than 2! activityID = {0}, param = {1}", temp.id, temp.nav_parameter)); } else { GlobalMenuManager.Instance.ComebackToMianMenu(); EB.Coroutines.Run(FindPath(strs)); } }
public void OnGotoEscortClick() { if (!Hotfix_LT.Data.EventTemplateManager.Instance.IsTimeOK("escort_start", "escort_stop")) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_AllianceEscortUtil_4329")); return; } if (AllianceUtil.GetIsInTransferDart("")) { return; } GlobalMenuManager.Instance.ComebackToMianMenu(); Hotfix_LT.Data.SpecialActivityTemplate temp = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(9005); string[] strs = temp.nav_parameter.Split(';'); if (strs.Length < 2) { EB.Debug.LogError(string.Format("NavParameter is Error, Length less than 2! activityID = {0}, param = {1}", temp.id, temp.nav_parameter)); } else { EB.Coroutines.Run(FindPath(strs)); } }
private int challengeTimes = 6;//总挑战次数 public override void OnLoggedIn() { Hotfix_LT.Data.SpecialActivityTemplate temp = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(activityId); if (temp != null) { challengeTimes = temp.times; } LTSpeedSnatchILRModel.GetInstance().hasRequire = false; }
public override void Fill(LTDailyData itemData) { if (itemData == null) { mDMono.gameObject.CustomSetActive(false); return; } mDMono.gameObject.CustomSetActive(true); curDailyData = itemData; curActData = itemData.ActivityData; activetyID = curActData.id; InitItem(); }
public void OnDailyItemClick(LTDailyCell cell) { if (curDailyCell != null) { if (curDailyCell == cell) { return; } curDailyData.IsSelected = false; curDailyCell.SetSelectStatus(false); } curDailyCell = cell; curDailyData = cell.GetDailyData(); curDailyData.IsSelected = true; curDailyCell.SetSelectStatus(true); curActData = curDailyData.ActivityData; InitBase(); }
private void InitCurData() { if (curDailyType == EDailyType.Limit && mDailyLimitData.Count > 0) { curDailyData = mDailyLimitData[0]; controller.GObjects["RightContent"].CustomSetActive(true); } else if (curDailyType == EDailyType.AllDay && mDailyAllDayData.Count > 0) { if (curFuncGuideId != 0) { LTDailyData curData = mDailyAllDayData[0]; for (int i = 0; i < mDailyAllDayData.Count; i++) { if (mDailyAllDayData[i].ActivityData.id == curFuncGuideId) { curData = mDailyAllDayData[i]; break; } } curDailyData = curData; titleCon.SetTitleBtn(1); } else { curDailyData = mDailyAllDayData[0]; } controller.GObjects["RightContent"].CustomSetActive(true); } else { controller.GObjects["RightContent"].CustomSetActive(false); return; } curActData = curDailyData.ActivityData; curDailyData.IsSelected = true; }
public void ShowUI(bool isShow) { if (isShow) { //军团护送 for (int i = 0; i < TransferDartItems.Length; i++) { TransferDartItems[i].mDMono.gameObject.CustomSetActive(false); } Hotfix_LT.Data.SpecialActivityTemplate template = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(9005); if (template.awards != null) { for (int i = 0; i < ((template.awards.Count > TransferDartItems.Length) ? TransferDartItems.Length : template.awards.Count); i++) { if (template.awards[i] != null) { TransferDartItems[i].LTItemData = template.awards[i]; TransferDartItems[i].mDMono.gameObject.CustomSetActive(true); } else { TransferDartItems[i].mDMono.gameObject.CustomSetActive(false); } } } if (Hotfix_LT.Data.EventTemplateManager.Instance.IsTimeOK("escort_start", "escort_stop")) { TransferDartTimeLabel.color = LT.Hotfix.Utility.ColorUtility.GreenColor; } else { TransferDartTimeLabel.color = LT.Hotfix.Utility.ColorUtility.RedColor; } LTUIUtil.SetText(TransferDartTimeLabel, Hotfix_LT.Data.EventTemplateManager.Instance.GetActivityOpenTimeStr("escort_start", "escort_stop")); //走配置表来设置奖励内容 ArrayList aList = EB.JSON.Parse(Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigStrValue("AllianceFBReward")) as ArrayList; List <LTShowItemData> showItemsList = new List <LTShowItemData>(); if (aList == null) { FubenItems[0].LTItemData = new LTShowItemData("arena-gold", 1, "res", false); FubenItems[1].LTItemData = new LTShowItemData("gold", 1, "res", false); } else { for (int i = 0; i < aList.Count; i++) { string id = EB.Dot.String("data", aList[i], string.Empty); int count = EB.Dot.Integer("quantity", aList[i], 0); string type = EB.Dot.String("type", aList[i], string.Empty); if (!string.IsNullOrEmpty(id)) { LTShowItemData showItemData = new LTShowItemData(id, count, type, false); showItemsList.Add(showItemData); } } // FubenItems[0].LTItemData = showItemsList[0]; FubenItems[1].LTItemData = showItemsList[1]; } //军团战 Hotfix_LT.Data.SpecialActivityTemplate template2 = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(9004); for (int i = 0; i < LegionWarItems.Length; i++) { LegionWarItems[i].mDMono.gameObject.CustomSetActive(false); } if (template.awards != null) { for (int i = 0; i < ((template2.awards.Count > LegionWarItems.Length) ? LegionWarItems.Length : template2.awards.Count); i++) { if (template.awards[i] != null) { LegionWarItems[i].LTItemData = template2.awards[i]; LegionWarItems[i].mDMono.gameObject.CustomSetActive(true); } else { LegionWarItems[i].mDMono.gameObject.CustomSetActive(false); } } } warTime = LegionWarTimeLine.none; string Title = string.Empty; LegionLogic.GetInstance().IsOpenLegionBattle(); if (LTLegionWarManager.Instance.IsOpenWarTime()) { warTime = LTLegionWarManager.GetLegionWarStatus(); } else { Title = string.Format("[ff6699]{0}[-]\n", EB.Localizer.GetString("ID_NEXT_WEEK")); } LegionWarTimeLabel.text = string.Format("{0}{1}{2}{3}", Title, GetTimeStr(LTLegionWarManager.Instance.WarOpenTime.QualifyOpenTime, warTime == LegionWarTimeLine.QualifyGame) , GetTimeStr(LTLegionWarManager.Instance.WarOpenTime.SemiOpenTime, warTime == LegionWarTimeLine.SemiFinal) , GetTimeStr(LTLegionWarManager.Instance.WarOpenTime.FinalOpenTime, warTime == LegionWarTimeLine.Final)); LegionLogic.GetInstance().IsOpenConvoy(); LegionLogic.GetInstance().IsOpenLegionFB(); } mDMono.gameObject.CustomSetActive(isShow); }