System/LoopAct/YunShi/OperationYunShi.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
System/LoopAct/YunShi/YunShiRechargeGiftActWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
System/LoopAct/YunShi/YunShiXBActModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
System/LoopAct/YunShi/YunShiXBActWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
System/MainInterfacePanel/HighSettingTip.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
System/LoopAct/YunShi/OperationYunShi.cs
@@ -14,14 +14,45 @@ { var textBuilder = OperationTimeHepler.textBuilder; textBuilder.Length = 0; textBuilder.Append(startDate.ToDisplay(false)); textBuilder.Append(string.Format(" {0}:{1}", joinStartHour.ToString("D2"), joinStartMinute.ToString("D2"))); if (startDate != endDate) OperationDate adjustedStartDate = startDate; int adjustedStartHour = joinStartHour; int adjustedStartMinute = joinStartMinute; if (resetType == 0) { textBuilder.Append(" - "); textBuilder.Append(endDate.ToDisplay(false)); textBuilder.Append(string.Format(" {0}:{1}", joinEndHour.ToString("D2"), joinEndMinute.ToString("D2"))); adjustedStartHour = 0; adjustedStartMinute = 0; } else if (resetType == 1) { adjustedStartHour = 4; adjustedStartMinute = 59; } textBuilder.Append(adjustedStartDate.ToDisplay(false)); textBuilder.Append(string.Format(" {0}:{1}", adjustedStartHour.ToString("D2"), adjustedStartMinute.ToString("D2"))); OperationDate adjustedEndDate = endDate; int adjustedEndHour = joinEndHour; int adjustedEndMinute = joinEndMinute; if (resetType == 0) { adjustedEndDate.day += 1; } else if (resetType == 1) { adjustedEndDate.day += 1; adjustedEndHour = 4; adjustedEndMinute = 59; } textBuilder.Append(" - "); textBuilder.Append(adjustedEndDate.ToDisplay(false)); textBuilder.Append(string.Format(" {0}:{1}", adjustedEndHour.ToString("D2"), adjustedEndMinute.ToString("D2"))); return textBuilder.ToString(); } System/LoopAct/YunShi/YunShiRechargeGiftActWin.cs
@@ -9,7 +9,7 @@ [SerializeField] TextEx actTime; YunShiRechargeGiftActModel model { get { return ModelCenter.Instance.GetModel<YunShiRechargeGiftActModel>(); } } VipModel vipModel { get { return ModelCenter.Instance.GetModel<VipModel>(); } } HappyXBModel happyXBModel { get { return ModelCenter.Instance.GetModelEx<HappyXBModel>(); } } StoreModel storeModel { get { return ModelCenter.Instance.GetModel<StoreModel>(); } } #region Built-in @@ -25,11 +25,18 @@ protected override void OnPreOpen() { scroller.OnRefreshCell += OnRefreshCell; GlobalTimeEvent.Instance.secondEvent += secondEvent; vipModel.rechargeCountEvent += VipModel_rechargeCountEvent; storeModel.RefreshBuyShopLimitEvent += RefreshBuyShopLimitEvent; DisplayScroll(); secondEvent(); OperationYunShi act; OperationTimeHepler.Instance.TryGetOperation(YunShiXBActModel.operaType, out act); if (act == null) return; int type = act.treasureType; var xbInfo = happyXBModel.GetXBInfoByType(type); if (xbInfo == null) return; actTime.text = Language.Get("RidingPetBossQuestTime", act.ToDisplayTime()); } private void VipModel_rechargeCountEvent(int obj) @@ -44,7 +51,6 @@ protected override void OnPreClose() { scroller.OnRefreshCell -= OnRefreshCell; GlobalTimeEvent.Instance.secondEvent -= secondEvent; vipModel.rechargeCountEvent -= VipModel_rechargeCountEvent; storeModel.RefreshBuyShopLimitEvent -= RefreshBuyShopLimitEvent; } @@ -122,13 +128,6 @@ return 0; } private void secondEvent() { OperationRechargeGiftAct act; OperationTimeHepler.Instance.TryGetOperation(YunShiRechargeGiftActModel.operaType, out act); if (act == null) return; actTime.text = Language.Get("RidingPetBossQuestTime", act.ToDisplayTimeEx()); } } } System/LoopAct/YunShi/YunShiXBActModel.cs
@@ -23,6 +23,8 @@ //<寻宝类型,<物品id,格子背景编号>> public Dictionary<int, Dictionary<int, int>> itemIdBgDict = new Dictionary<int, Dictionary<int, int>>(); //<寻宝类型,功能ID> public Dictionary<int, int> funcIDDict = new Dictionary<int, int>(); public int actNum = 10; //对应界面 public event Action<bool> UpdateMissionEvent; public readonly int AwardCellCount = 5; @@ -50,6 +52,7 @@ public bool isSkipXB { get; set; } HappyXBModel happyXBModel { get { return ModelCenter.Instance.GetModelEx<HappyXBModel>(); } } PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } } public override void Init() { @@ -58,6 +61,7 @@ OperationTimeHepler.Instance.operationAdvanceEvent += OperationAdvanceEvent; happyXBModel.RefreshXBTypeInfoAct += OnRefreshXBTypeInfoAct; OperationTimeHepler.Instance.operationTimeUpdateEvent += OnOperationTimeUpdateEvent; packModel.refreshItemCountEvent += OnRefreshItemCountEvent; OpenServerActivityCenter.Instance.Register(activityID, this, activityType); var jsonData = JsonMapper.ToObject(FuncConfigConfig.Get("YunShi").Numerical1); @@ -84,6 +88,15 @@ } } } jsonData = JsonMapper.ToObject(FuncConfigConfig.Get("YunShi").Numerical2); keyList = jsonData.Keys.ToList(); for (int i = 0; i < keyList.Count; i++) { int type = int.Parse(keyList[i]); int funcId = int.Parse(jsonData[keyList[i]].ToJson()); funcIDDict[type] = funcId; } } public void OnBeforePlayerDataInitialize() @@ -99,11 +112,25 @@ { happyXBModel.RefreshXBTypeInfoAct -= OnRefreshXBTypeInfoAct; OperationTimeHepler.Instance.operationTimeUpdateEvent -= OnOperationTimeUpdateEvent; packModel.refreshItemCountEvent -= OnRefreshItemCountEvent; } private void OnRefreshItemCountEvent(PackType type, int arg2, int arg3) { UpdateRedPoint(); } private void OnOperationTimeUpdateEvent(Operation operation) { UpdateRedPoint(); if (operation == Operation.default48) { if (WindowCenter.Instance.IsOpen<YunShiWin>()) { WindowCenter.Instance.Close<YunShiWin>(); } UpdateRedPoint(); } } private void OnRefreshXBTypeInfoAct() @@ -196,6 +223,10 @@ list.Sort(); if (list == null) return; if (happyXBModel.IsHaveOneXBTool(type) || (happyXBModel.IsHaveManyXBTool(type, out int toolCnt, out int needToolCnt) && toolCnt >= needToolCnt)) redPointTab.state = RedPointState.Simple; //有奖励未领取 for (int i = 0; i < AwardCellCount; i++) { @@ -259,6 +290,23 @@ return ((int)Math.Pow(2, index) & treasureCntAward) == 0 ? 1 : 2; } public bool IsFuncOpen() { OperationYunShi act; OperationTimeHepler.Instance.TryGetOperation(YunShiXBActModel.operaType, out act); if (act == null) return false; int type = act.treasureType; var xbInfo = happyXBModel.GetXBInfoByType(type); if (xbInfo == null) return false; if (!funcIDDict.TryGetValue(type, out var funcId)) return false; return FuncOpen.Instance.IsFuncOpen(funcId); } public void SendGetAward(int type, int count) { CA504_tagCMPlayerGetReward getReward = new CA504_tagCMPlayerGetReward(); System/LoopAct/YunShi/YunShiXBActWin.cs
@@ -306,18 +306,21 @@ private void ShowGetItem() { var xbItemlist = happyXBModel.rangelist; List<Item> itemList = new List<Item>(); for (int i = 0; i < xbItemlist.Count; i++) if (happyXBModel.title == HappXBTitle.YunShi1 || happyXBModel.title == HappXBTitle.YunShi2 || happyXBModel.title == HappXBTitle.YunShi3 || happyXBModel.title == HappXBTitle.YunShi4) { XBGetItem xbItem = xbItemlist[i]; var xbItemlist = happyXBModel.rangelist; List<Item> itemList = new List<Item>(); itemList.Add(new Item(xbItem.itemId, (ulong)xbItem.count)); for (int i = 0; i < xbItemlist.Count; i++) { XBGetItem xbItem = xbItemlist[i]; itemList.Add(new Item(xbItem.itemId, (ulong)xbItem.count)); } ItemLogicUtility.Instance.ShowGetItem(itemList, seconds: 0, func: () =>{ happyXBModel.rangelist.Clear(); }); Reset(); WindowCenter.Instance.uiRoot.eventSystem.enabled = true; } ItemLogicUtility.Instance.ShowGetItem(itemList, seconds: 0); Reset(); WindowCenter.Instance.uiRoot.eventSystem.enabled = true; } public void ShakeQianTong() @@ -470,8 +473,8 @@ int toolCnt1 = packModel.GetItemCountByID(PackType.Item, funcSet.costToolIds[1]); txtXBOneCount.text = StringUtility.Contact(toolCnt0, "/", funcSet.xbNums[0]); txtXBManyCount.text = StringUtility.Contact(toolCnt1, "/", funcSet.xbNums[1]); txtXBOne.text = Language.Get("HappyXB101", funcSet.xbNums[0]); txtXBMany.text = Language.Get("HappyXB101", funcSet.xbNums[1]); txtXBOne.text = Language.Get("YunShi07", funcSet.xbNums[0]); txtXBMany.text = Language.Get("YunShi07", funcSet.xbNums[1]); RefreshSkipUI(); txtHasCnt.text = xbInfo.treasureCount.ToString(); for (int i = 0; i < model.AwardCellCount; i++) System/MainInterfacePanel/HighSettingTip.cs
@@ -128,7 +128,7 @@ m_JPBN.SetActive(NeedForWhiteModel.Instance.IsOpen()); m_XY.SetActive(ModelCenter.Instance.GetModel<FairyAffinityLoginActModel>().IsOpen); m_LHD.SetActive(ModelCenter.Instance.GetModel<CycleHallActModel>().IsOpen && !ModelCenter.Instance.GetModel<CycleHallActModel>().GetTabIDList().IsNullOrEmpty()); m_YS.SetActive(ModelCenter.Instance.GetModel<YunShiXBActModel>().IsOpen); m_YS.SetActive(ModelCenter.Instance.GetModel<YunShiXBActModel>().IsOpen && ModelCenter.Instance.GetModel<YunShiXBActModel>().IsFuncOpen()); ShowNewActionButton(); }