From 5b4b9886cb677c017c720fd538493b12c4915996 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 10 十二月 2025 16:48:41 +0800
Subject: [PATCH] 363 【活动内容】开服庆典 庆典兑换 弹框 最后一天 不可以购买 兑换界面 每日红点
---
Main/System/OSActivity/OSActivityManager.cs | 37 ++++++++++++++++++++++++++++---------
1 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/Main/System/OSActivity/OSActivityManager.cs b/Main/System/OSActivity/OSActivityManager.cs
index f435452..ea5464a 100644
--- a/Main/System/OSActivity/OSActivityManager.cs
+++ b/Main/System/OSActivity/OSActivityManager.cs
@@ -69,7 +69,7 @@
}
// 寮�鏈嶆帓琛屾椿鍔ㄦ槸鍚﹀紑鍚�
- public bool IsOpened(int rankType)
+ public bool IsOpened(int rankType, bool needLastDay = true)
{
if (!rankTypeToFuncID.ContainsKey(rankType))
{
@@ -88,9 +88,19 @@
}
var openDays = rankOpenDays[rankType];
- if (TimeUtility.OpenDay > openDays[1])
+ if (needLastDay)
{
- return false;
+ if (TimeUtility.OpenDay > openDays[1])
+ {
+ return false;
+ }
+ }
+ else
+ {
+ if (TimeUtility.OpenDay >= openDays[1])
+ {
+ return false;
+ }
}
return true;
@@ -163,12 +173,14 @@
public void UpdateRedpoint()
{
osMainLevelRedpoint.state = !DayRemind.Instance.GetDayRemind(DayRemind.OSMainLevel) ? RedPointState.Simple : RedPointState.None;
+ osGalaRedpoint2.state = !DayRemind.Instance.GetDayRemind(DayRemind.OSGalaChange) ? RedPointState.Simple : RedPointState.None;
+
osHeroCallRedpoint.state = RedPointState.None;
osGalaRedpoint3.state = RedPointState.None;
if (StoreModel.Instance.freeShopDict.Count == 0) return;
- if (StoreModel.Instance.freeShopDict.ContainsKey((int)StoreFunc.OSHeroCall))
+ if (StoreModel.Instance.freeShopDict.ContainsKey((int)StoreFunc.OSHeroCall) && IsOpened(4, false))
{
var shopList = StoreModel.Instance.freeShopDict[(int)StoreFunc.OSHeroCall];
@@ -184,7 +196,7 @@
}
}
- if (StoreModel.Instance.freeShopDict.ContainsKey((int)StoreFunc.OSGalaGift))
+ if (StoreModel.Instance.freeShopDict.ContainsKey((int)StoreFunc.OSGalaGift) && IsOpenedOSGala(false))
{
var shopList = StoreModel.Instance.freeShopDict[(int)StoreFunc.OSGalaGift];
@@ -225,7 +237,7 @@
public event Action OnOSGalaDataChangeEvent;
// 鍏戞崲鍟嗗簵
- // Redpoint osGalaRedpoint2 = new Redpoint(MainRedDot.RedPoint_OSGala, MainRedDot.RedPoint_OSGala * 10 + 2);
+ Redpoint osGalaRedpoint2 = new Redpoint(MainRedDot.RedPoint_OSGala, MainRedDot.RedPoint_OSGala * 10 + 2);
// 绀煎寘鍏嶈垂
Redpoint osGalaRedpoint3 = new Redpoint(MainRedDot.RedPoint_OSGala, MainRedDot.RedPoint_OSGala * 10 + 3);
// 鎬诲鍔�
@@ -240,14 +252,21 @@
UpdateGalaRedpoint();
}
- public bool IsOpenedOSGala()
+ public bool IsOpenedOSGala(bool needLastDay = true)
{
if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.OSGala))
{
return false;
}
- //缁撴潫鍚庡欢杩熶竴澶╁叧闂睍绀�
- return TimeUtility.OpenDay <= osGalaOpenDays;
+ if (needLastDay)
+ {
+ //缁撴潫鍚庡欢杩熶竴澶╁叧闂睍绀�
+ return TimeUtility.OpenDay <= osGalaOpenDays;
+ }
+ else
+ {
+ return TimeUtility.OpenDay < osGalaOpenDays;
+ }
}
// 鏄惁宸查鍙栧鍔�
--
Gitblit v1.8.0