System/LoopAct/YunShi/YunShiXBActModel.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
System/LoopAct/YunShi/YunShiXBActWin.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
System/MainInterfacePanel/HighSettingTip.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
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,6 +112,12 @@ { 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) @@ -196,6 +215,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 +282,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); 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
@@ -121,7 +121,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(); }