瀏覽代碼

福利大厅

zhaoyang 2 年之前
父節點
當前提交
b0b9913f02
共有 1 個文件被更改,包括 27 次插入3 次删除
  1. 27 3
      GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/DailyWelfareView.cs

+ 27 - 3
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/DailyWelfareView.cs

@@ -59,8 +59,32 @@ namespace GFGGame
             _ui.m_loaBg.url = ResPathUtil.GetBgImgPath("mrqd_bjbj");
 
             _valueBarController.OnShown();
-            _month = DateTime.Now.Month;
-            _day = DateTime.Now.Day;
+
+            if (TimeHelper.ClientNow() < TimeUtil.GetCurDayTime(GlobalCfgArray.globalCfg.refreshTime))
+            {
+                if (DateTime.Now.Day == 1)
+                {
+                    if (DateTime.Now.Month == 1)
+                    {
+                        _month = 12;
+                    }
+                    else
+                    {
+                        _month = DateTime.Now.Month - 1;
+                    }
+                    List<DailySignBonusCfg> cfgs = DailySignBonusCfgArray.Instance.GetCfgsBymonth(_month);
+                    _day = cfgs[cfgs.Count - 1].day;
+                }
+                else
+                {
+                    _day = DateTime.Now.Day - 1;
+                }
+            }
+            else
+            {
+                _month = DateTime.Now.Month;
+                _day = DateTime.Now.Day;
+            }
             // _ui.m_list.ScrollToView(0);
             UpdateView();
         }
@@ -137,7 +161,7 @@ namespace GFGGame
         {
             DailySignBonusCfg bonusCfg = DailySignBonusCfgArray.Instance.GetCfgsBymonth(_month)[index];
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(bonusCfg.bonusArr[0][0]);
-            bool isGot = MathHelper.isBitSet(_signCount, bonusCfg.day);
+            bool isGot = MathHelper.isBitSet(GameGlobal.myNumericComponent.GetAsInt(NumericType.SignDay), bonusCfg.day);
             if (itemCfg == null) return;
             UI_ListSignItem item = UI_ListSignItem.Proxy(obj);