public void Receive() { switch (AlliancesManager.Instance.DartData.State) { case eAllianceDartCurrentState.None: case eAllianceDartCurrentState.Robing: case eAllianceDartCurrentState.Rob: //非活动时间内接取运镖任务时提示:当前不在活动时间,不能接受运镖任务。 if (AllianceEscortUtil.GetResidueTransferDartNum() > 0) { var selected = GetSelectedDart(); AlliancesManager.Instance.DartData.CurrentDartId = selected.Id; StartTransfer(selected); } else { MessageTemplateManager.ShowMessage(902072); } break; case eAllianceDartCurrentState.Transfer: case eAllianceDartCurrentState.Transfering: //运镖期间不能再领取运镖任务 MessageTemplateManager.ShowMessage(902071); break; } }
public void OnTransferDartRefreshBtnClick() { //var dartData = AlliancesManager.Instance.DartData; //if (dartData.State == eAllianceDartCurrentState.Transfer || dartData.State == eAllianceDartCurrentState.Transfering) //{ // return; //} if (mRotating) { return; } if (AllianceEscortUtil.GetResidueTransferDartNum() <= 0) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_8870")); return; } var cur = AlliancesManager.Instance.TransferDartInfo.GetCurrentSelectDart(); if (AllianceEscortUtil.GetResidueTransferRefreshNum() > 0 || mTicketNum > 0) { if (cur != null && cur.DartName.CompareTo("tian") == 0) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_9174"), null); return; } mIsRefresh = true; //LTUIUtil.SetGreyButtonEnable(controller.CoolTriggers["TransferDartRefreshBtn"], false); controller.CoolTriggers["TransferDartRefreshBtn"].GetComponent <UISprite>().color = new Color(1, 0, 1, 1); LTUIUtil.SetGreyButtonEnable(controller.UiButtons["StartTransferBtn"], false); AlliancesManager.Instance.Refresh(); } else { if (BalanceResourceUtil.GetUserDiamond() >= refreshCostHC) { if (cur != null && cur.DartName.CompareTo("tian") == 0) { MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_9174"), null); return; } mIsRefresh = true; //LTUIUtil.SetGreyButtonEnable(controller.CoolTriggers["TransferDartRefreshBtn"], false); controller.CoolTriggers["TransferDartRefreshBtn"].GetComponent <UISprite>().color = new Color(1, 0, 1, 1); LTUIUtil.SetGreyButtonEnable(controller.UiButtons["StartTransferBtn"], false); AlliancesManager.Instance.Refresh(); } else { BalanceResourceUtil.HcLessMessage(); } } }
private void OnInfoListener(string path, INodeData data) { AllianceEscortUtil.FormatResidueRobDartNum(ResidueRobNumLabel); int residueTransferNum = AllianceEscortUtil.GetResidueTransferDartNum(); string colorStr = residueTransferNum > 0 ? LT.Hotfix.Utility.ColorUtility.GreenColorHexadecimal : LT.Hotfix.Utility.ColorUtility.RedColorHexadecimal; LTUIUtil.SetText(ResidueTransferDartNumLabel, string.Format(EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_2955"), colorStr, residueTransferNum)); LTUIUtil.SetText(TransferDartTimeLabel, Hotfix_LT.Data.EventTemplateManager.Instance.GetActivityOpenTimeStr("escort_start", "escort_stop")); }
private void OnInfoListener(string path, INodeData data) { int residueTransferNum = AllianceEscortUtil.GetResidueTransferDartNum(); string colorStr = residueTransferNum > 0 ? LT.Hotfix.Utility.ColorUtility.GreenColorHexadecimal : LT.Hotfix.Utility.ColorUtility.RedColorHexadecimal; LTUIUtil.SetText(controller.UiLabels["ResidueTransferDartNumLabel"], string.Format(EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_2955"), colorStr, residueTransferNum)); int residueRobNum = AllianceEscortUtil.GetResidueRobDartNum(); string cs = residueRobNum > 0 ? LT.Hotfix.Utility.ColorUtility.GreenColorHexadecimal : LT.Hotfix.Utility.ColorUtility.RedColorHexadecimal; LTUIUtil.SetText(controller.UiLabels["ResidueRobNumLabel"], string.Format(EB.Localizer.GetString("ID_codefont_in_AllianceEscortHudController_3223"), cs, residueRobNum)); RefreshBtnState(); }
public int GetActivityCount(int activityID)//仅用于活动是否需要提示以及日常界面显示,部分活动次数不准确 { Hotfix_LT.Data.SpecialActivityTemplate curAct = Hotfix_LT.Data.EventTemplateManager.Instance.GetSpecialActivity(activityID); if (curAct == null) { return(0); } if (activityID == 9001 || activityID == 9002 || activityID == 9007) { //经验副本,金币副本,夺宝奇兵 int times = 0; string path = string.Format("special_activity.{0}.c_times", activityID); DataLookupsCache.Instance.SearchDataByID(path, out times); return(curAct.times - times); } else if (activityID == 9003) { DataLookupsCache.Instance.SearchDataByID("world_boss.fightTimes", out int ChallengeTime); DataLookupsCache.Instance.SearchDataByID("world_boss.buyTimes", out int BuyTimes); int Maxtime = (int)Hotfix_LT.Data.NewGameConfigTemplateManager.Instance.GetGameConfigValue("worldBossChallengeMaxTimes"); return(Maxtime + BuyTimes - ChallengeTime); } else if (activityID == 9004) {//军团战 //EB.Debug.LogError("军团战数据获取"); if (!LTLegionWarManager.Instance.IsOpenWarTime()) { return(0); } LegionWarTimeLine status = LTLegionWarManager.GetLegionWarStatus(); if (status == LegionWarTimeLine.QualifyGame) { if (!AllianceUtil.IsJoinedAlliance) { return(1); } int myScore = LTLegionWarManager.Instance.QualifyEnemyList.MyScore; return(myScore >= LTLegionWarManager.Instance.MaxScore ? 0 : 1); } else if (status == LegionWarTimeLine.SemiFinal) { return(1); } else if (status == LegionWarTimeLine.Final) { return(1); } else { return(0); } } else if (activityID == 9005) { //军团护送 if (AlliancesManager.Instance.Account.State != eAllianceState.Joined) { return(curAct.times + GetVIPAdditionTimes(activityID)); } return(AllianceEscortUtil.GetResidueTransferDartNum()); } else if (activityID == 9006) { //军团拦截 if (AlliancesManager.Instance.Account.State != eAllianceState.Joined) { return(curAct.times + GetVIPAdditionTimes(activityID)); } return(AllianceEscortUtil.GetResidueRobDartNum()); } else if (activityID == 9009) { //极限试炼 int dayDisCountTime = 0; int oldVigor = 0; int NewVigor = 0; int times = LTUltimateTrialDataManager.Instance.GetCurrencyTimes(); NewGameConfigTemplateManager.Instance.GetEnterVigor(eBattleType.InfiniteChallenge, out dayDisCountTime, out NewVigor, out oldVigor); int curDisCountTime = dayDisCountTime - times; return(Mathf.Max(0, curDisCountTime)); //if (!DataLookupsCache.Instance.SearchIntByID("infiniteChallenge.info.challengeTimes", out times)) //{ // times = curAct.times; //} //return Mathf.Max(0, times + GetVIPAdditionTimes(activityID)); } else if (activityID == 9010) {//天梯 LTDailyData tempdailydata = GetDailyDataByActivityID(9010); if (tempdailydata == null) { return(0); } else { return(tempdailydata.OpenTimeValue < LTDailyDataManager.TimeNow && tempdailydata.StopTimeValue > LTDailyDataManager.TimeNow ? 1 : 0); } } else if (activityID == 9011) {//英雄交锋 //今天赢了或者达到最大胜场 0 就不显示红点 return(LTNewHeroBattleManager.GetInstance().GetHeroBattleTipNum()); } else if (activityID == 9013) { return(IsCouldReceiveVit()?1:0); } else if (activityID == 9014) { //幸运悬赏 int times = LTBountyTaskHudController.CurHantTimes; return(times); } else if (activityID == 9015) { //角斗场 int totalTimes = VIPTemplateManager.Instance.GetTotalNum(VIPPrivilegeKey.ArenaTimes) + ArenaManager.Instance.Info.buyTimes; int times = Mathf.Max(0, totalTimes - ArenaManager.Instance.Info.usedTimes); return(times); } else if (activityID == 9016) { //荣耀角斗场 int freetimes = HonorArenaManager.Instance.GetHonorArenaFreeTimes(); int usetimes = HonorArenaManager.Instance.Info.usedTimes; return(freetimes - usetimes); } return(0); }