Browse Source

Merge remote-tracking branch 'remotes/origin/master' into xiaojie

何晓捷 2 years ago
parent
commit
6dfa1b1343
34 changed files with 121 additions and 64 deletions
  1. 11 4
      FGUIProject/assets/CommonGame/components/ComTipsBase.xml
  2. 2 2
      FGUIProject/assets/DailyWelfare/LimitChargeUI.xml
  3. 1 1
      FGUIProject/assets/DailyWelfare/components/Button1.xml
  4. 5 4
      FGUIProject/assets/Main/StoryFightTargetScoreUI.xml
  5. 3 3
      FGUIProject/assets/Main/components/ComDeduction.xml
  6. 3 0
      GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs
  7. 1 1
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs
  8. 3 4
      GameClient/Assets/Game/HotUpdate/Data/ActivityDay7DataManager.cs
  9. 1 1
      GameClient/Assets/Game/HotUpdate/Data/ArenaDataManager.cs
  10. 1 0
      GameClient/Assets/Game/HotUpdate/Data/LuckyBoxDataManager.cs
  11. 1 1
      GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs
  12. 3 1
      GameClient/Assets/Game/HotUpdate/Data/TaskDataManager.cs
  13. 3 0
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DailyWelfare/UI_LimitChargeUI.cs
  14. 1 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/CommonSProxy.cs
  15. 1 0
      GameClient/Assets/Game/HotUpdate/ServerProxy/LuckyBoxSProxy.cs
  16. 3 3
      GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs
  17. 1 1
      GameClient/Assets/Game/HotUpdate/ServerProxy/TaskSProxy.cs
  18. 20 0
      GameClient/Assets/Game/HotUpdate/Views/ActivityDay7/ActivityDay7View.cs
  19. 3 3
      GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/DailyWelfareView.cs
  20. 6 2
      GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/LimitChargeView.cs
  21. 18 18
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs
  22. 9 5
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreMonthView.cs
  23. 21 10
      GameClient/Assets/Game/HotUpdate/Views/Task/CombTaskView.cs
  24. BIN
      GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes
  25. BIN
      GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_fui.bytes
  26. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0!a.png
  27. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0.png
  28. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_1!a.png
  29. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_1.png
  30. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_5!a.png
  31. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_5.png
  32. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_8!a.png
  33. BIN
      GameClient/Assets/ResIn/UI/Main/Main_atlas0_8.png
  34. BIN
      GameClient/Assets/ResIn/UI/Main/Main_fui.bytes

+ 11 - 4
FGUIProject/assets/CommonGame/components/ComTipsBase.xml

@@ -10,8 +10,8 @@
     <text id="n9_si5z" name="txtDesc" xy="375,181" size="506,166" group="n24_u2u3" fontSize="30" color="#998a79" ubb="true" autoSize="none" autoClearText="true" text="手机课程很快就要开课咯!!同学们有没有很期待哇过 几天课上见昂!!28节课希望大家都可以跟下来一起度 过有趣儿的两个月吧。"/>
     <group id="n24_u2u3" name="n24" xy="56,50" size="850,320" group="n25_u2u3" advanced="true"/>
     <image id="n11_si5z" name="n11" src="842s6h" fileName="imagesNew/kp_sx_1.png" xy="75,400" size="50,50" group="n19_si5z"/>
-    <image id="n12_si5z" name="n12" src="842s6i" fileName="imagesNew/kp_sx_2.png" xy="300,400" size="50,50" group="n19_si5z"/>
-    <image id="n13_si5z" name="n13" src="842s6j" fileName="imagesNew/kp_sx_3.png" xy="525,400" size="50,50" group="n19_si5z"/>
+    <image id="n12_si5z" name="n12" src="842s6i" fileName="imagesNew/kp_sx_3.png" xy="300,400" size="50,50" group="n19_si5z"/>
+    <image id="n13_si5z" name="n13" src="842s6j" fileName="imagesNew/kp_sx_2.png" xy="525,400" size="50,50" group="n19_si5z"/>
     <image id="n14_si5z" name="n14" src="842s6k" fileName="imagesNew/kp_sx_4.png" xy="750,400" size="50,50" group="n19_si5z"/>
     <text id="n15_si5z" name="txtGong" xy="135,404" size="61,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
     <text id="n16_si5z" name="txtShang" xy="360,404" size="61,41" group="n19_si5z" fontSize="30" color="#aa865f" autoClearText="true" text="5000"/>
@@ -22,12 +22,19 @@
       <item/>
       <item/>
     </list>
-    <list id="n26_l500" name="listItem" xy="196,551" pivot="0.5,0" size="569,131" group="n25_u2u3" layout="row" colGap="20" defaultItem="ui://eg2y0ldp9jv6tls" align="center">
+    <list id="n26_l500" name="listItem" xy="58,551" pivot="0.5,0" size="851,131" group="n25_u2u3" layout="row" overflow="scroll" scroll="horizontal" colGap="15" defaultItem="ui://eg2y0ldp9jv6tls" align="center">
+      <item/>
+      <item/>
+      <item/>
+      <item/>
+      <item/>
+      <item/>
+      <item/>
       <item/>
       <item/>
       <item/>
     </list>
-    <group id="n25_u2u3" name="n25" xy="56,50" size="850,632" advanced="true" layout="vt" lineGap="30" excludeInvisibles="true"/>
+    <group id="n25_u2u3" name="n25" xy="56,50" size="853,632" advanced="true" layout="vt" lineGap="30" excludeInvisibles="true"/>
   </displayList>
   <relation target="n25_u2u3" sidePair="height-height"/>
 </component>

+ 2 - 2
FGUIProject/assets/DailyWelfare/LimitChargeUI.xml

@@ -6,8 +6,8 @@
     </loader>
     <component id="n10_idkd" name="btnBack" src="9xlo8" fileName="components/BtnBack.xml" pkg="eg2y0ldp" xy="35,80"/>
     <image id="n7_idkd" name="n7" src="nyhm5" fileName="imagesNew/sj_db.png" pkg="eg2y0ldp" xy="736,59" group="n6_idkd"/>
-    <text id="n5_idkd" name="txtTime" xy="820,58" pivot="0.5,0" size="193,44" group="n6_idkd" fontSize="32" color="#fffbf9" align="center" text="00天00时00分"/>
-    <group id="n6_idkd" name="n6" xy="736,58" size="366,45" advanced="true">
+    <text id="n5_idkd" name="txtTime" xy="820,58" pivot="0.5,0" size="193,44" group="n6_idkd" fontSize="32" color="#fffbf9" align="center" autoClearText="true" text="00天00时00分"/>
+    <group id="n6_idkd" name="grpTime" xy="736,58" size="366,45" advanced="true">
       <relation target="" sidePair="top-top"/>
     </group>
     <image id="n8_idkd" name="n8" src="nyhm8" fileName="imagesNew/qrhd_db.png" pkg="eg2y0ldp" xy="0,791" group="n12_idkd">

+ 1 - 1
FGUIProject/assets/DailyWelfare/components/Button1.xml

@@ -19,7 +19,7 @@
     </loader>
     <image id="n4_vols" name="n4" src="vols1r" fileName="images/hdbn_zsx.png" xy="0,27"/>
     <image id="n7_vols" name="n7" src="vols1v" fileName="images/hd_sj_dkuang.png" xy="425,263" group="n8_vols"/>
-    <text id="n6_vols" name="txtTime" xy="596,268" pivot="0.5,0" size="260,42" group="n8_vols" font="ui://eg2y0ldpa0cftkx" fontSize="30" color="#fffcf7" text="剩余时间:5天30分"/>
+    <text id="n6_vols" name="txtTime" xy="604,268" pivot="0.5,0" size="244,42" group="n8_vols" font="ui://eg2y0ldpa0cftkx" fontSize="30" color="#fffcf7" autoClearText="true" text="剩余时间:0天0分"/>
     <group id="n8_vols" name="grpTime" xy="425,263" size="493,54" advanced="true">
       <gearDisplay controller="c1" pages="1"/>
     </group>

+ 5 - 4
FGUIProject/assets/Main/StoryFightTargetScoreUI.xml

@@ -21,15 +21,16 @@
       <ProgressBar value="100" max="100"/>
     </component>
     <component id="n54_psph" name="comTargetCard" src="volsov" fileName="components/ComTargetSkillShow.xml" xy="1180,420" pivot="0.5,0.5" anchor="true" aspect="true" scale="0.3,0.3"/>
-    <component id="n55_psph" name="comDeduction" src="psphix" fileName="components/ComDeduction.xml" xy="102,500" pivot="0.5,0.5" anchor="true" scale="0,0"/>
+    <component id="n55_psph" name="comDeduction" src="psphix" fileName="components/ComDeduction.xml" xy="45,292" size="325,53"/>
   </displayList>
   <transition name="t1">
     <item time="0" type="Scale" target="n54_psph" value="0.3,0.3"/>
     <item time="0" type="XY" target="n54_psph" tween="true" startValue="1180,420" endValue="995,420" duration="6" ease="Linear"/>
-    <item time="24" type="Scale" target="n54_psph" tween="true" startValue="0.3,0.3" endValue="0,0" duration="6" ease="Linear"/>
+    <item time="48" type="Scale" target="n54_psph" tween="true" startValue="0.3,0.3" endValue="0,0" duration="6" ease="Linear"/>
   </transition>
   <transition name="t2">
-    <item time="0" type="Scale" target="n55_psph" tween="true" startValue="0,0" endValue="1,1" duration="6" ease="Linear"/>
-    <item time="24" type="Scale" target="n55_psph" tween="true" startValue="1,1" endValue="0,0" duration="6" ease="Linear"/>
+    <item time="0" type="Alpha" target="n55_psph" value="1"/>
+    <item time="0" type="Size" target="n55_psph" tween="true" startValue="0,53" endValue="325,53" duration="9" ease="Linear"/>
+    <item time="45" type="Alpha" target="n55_psph" tween="true" startValue="1" endValue="0" duration="9" ease="Linear"/>
   </transition>
 </component>

+ 3 - 3
FGUIProject/assets/Main/components/ComDeduction.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="196,196">
+<component size="325,53" overflow="hidden">
   <displayList>
-    <image id="n55_psph" name="n55" src="v3k9cf" fileName="imagesStory/zd_jineng_4.png" xy="0,0"/>
-    <text id="n56_psph" name="txtDeduction" xy="54,76" pivot="0.5,0" size="77,46" fontSize="34" align="center" text="-666"/>
+    <image id="n55_psph" name="n55" src="t6j1ox" fileName="imagesNew/zd_shanghai_db.png" xy="0,0"/>
+    <text id="n56_psph" name="txtDeduction" xy="113,2" pivot="0.5,0" size="80,49" fontSize="36" color="#fff6e3" align="center" text="-666"/>
   </displayList>
 </component>

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstMessage.cs

@@ -139,5 +139,8 @@ namespace GFGGame
         //通知通行证赛季变更
         public const string NOTICE_PASSPORT_SEASON_CHANGE = "NOTICE_PASSPORT_SEASON_CHANGE";
         
+        //通知任务状态变更
+        public const string NOTICE_TASK_STATE_CHANGE = "NOTICE_TASK_STATE_CHANGE";
+        
     }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Controller/GameController.cs

@@ -112,7 +112,7 @@ namespace GFGGame
             await StudioSProxy.ReqStudioInfos();
             await RoleInfoSProxy.ReqPersonalInfo();
             await ActivityGlobalSProxy.GetActivityInfo();
-
+            await LuckyBoxSProxy.ReqGetLuckyBoxRotatingInfo();
 
             GameGlobal.lastLoginTime = StorageDataManager.Instance.GetStorageValue(ConstStorageId.LAST_LOGIN_TIME);
             long lastTime = GameGlobal.myNumericComponent.GetAsInt(NumericType.OnlineTimeSecs);

+ 3 - 4
GameClient/Assets/Game/HotUpdate/Data/ActivityDay7DataManager.cs

@@ -23,14 +23,13 @@ namespace GFGGame
 
         public bool CheckOpen()
         {
-            return GetActivityDay7Day() <= Activity7DaysCfgArray.Instance.dataArray.Length;
+            return GetEndTime() > TimeHelper.ServerNow();
         }
-        
+
         public long GetEndTime()
         {
-            //TODO 进行缓存
             return TimeUtil.TodayRestTime() +
-                   (Activity7DaysCfgArray.Instance.dataArray.Length - GetActivityDay7Day())
+                   (GlobalCfgArray.globalCfg.Activity7DaysLastTime - GetActivityDay7Day() + 1)
                    * TimeUtil.SECOND_PER_DAY * 1000;
         }
     }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/ArenaDataManager.cs

@@ -111,7 +111,7 @@ namespace GFGGame
         /// <value></value>
         public bool IsSeasonOpen
         {
-            get
+            get 
             {
                 ArenaOpenCfg cfg = ArenaOpenCfgArray.Instance.GetCfg(SeasonId);
                 if (TimeUtil.IsBeforeCurTime(cfg.openTime) && TimeUtil.IsLaterCurTime(cfg.endTime))

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Data/LuckyBoxDataManager.cs

@@ -18,6 +18,7 @@ namespace GFGGame
         private Dictionary<int, List<LuckyBoxBonusData>> _dicShowList = new Dictionary<int, List<LuckyBoxBonusData>>();
 
         public List<int> luckyBoxIds = new List<int>();//奖池列表
+        public int RotatingId = 0;//轮换活动id。0为未开启
         public long startTime = 1668873600000;
         public long endTime = 1672156799000;
 

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/ShopDataManager.cs

@@ -16,7 +16,7 @@ namespace GFGGame
             _goodsDic.Clear();
         }
 
-        public void UpdateGiftData(int giftId, int num)
+        public void UpdateGoodsData(int giftId, int num)
         {
             if (!_goodsDic.ContainsKey(giftId))
             {

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Data/TaskDataManager.cs

@@ -143,9 +143,11 @@ namespace GFGGame
                     }
                     return string.Format(activeRewardCfg.desc, taskCfg.GetTargetCount(), name);
                 case ConstTaskType.UseItem:
-                case ConstTaskType.Suitsynthesis:
                     var cfg = ItemCfgArray.Instance.GetCfg(taskCfg.paramsArr[0]);
                     return string.Format(activeRewardCfg.desc, taskCfg.GetTargetCount(), cfg.name);
+                case ConstTaskType.Suitsynthesis:
+                    var suitCfg = SuitCfgArray.Instance.GetCfg(taskCfg.paramsArr[0]);
+                    return string.Format(activeRewardCfg.desc, taskCfg.GetTargetCount(), suitCfg.name);
                 case ConstTaskType.UpgradeCardLvl:
                 case ConstTaskType.UpgradeCardStar:
                     return string.Format(activeRewardCfg.desc, taskCfg.paramsArr[0], taskCfg.paramsArr[1]);

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/DailyWelfare/UI_LimitChargeUI.cs

@@ -10,6 +10,7 @@ namespace UI.DailyWelfare
         public GLoader m_loaBg;
         public GButton m_btnBack;
         public GTextField m_txtTime;
+        public GGroup m_grpTime;
         public GList m_list;
         public GButton m_btnCharge;
         public const string URL = "ui://t8nwuj7iidkd14";
@@ -62,6 +63,7 @@ namespace UI.DailyWelfare
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_txtTime = (GTextField)comp.GetChild("txtTime");
+            m_grpTime = (GGroup)comp.GetChild("grpTime");
             m_list = (GList)comp.GetChild("list");
             m_btnCharge = (GButton)comp.GetChild("btnCharge");
         }
@@ -70,6 +72,7 @@ namespace UI.DailyWelfare
             m_loaBg = null;
             m_btnBack = null;
             m_txtTime = null;
+            m_grpTime = null;
             m_list = null;
             m_btnCharge = null;
             if(disposeTarget && target != null)

+ 1 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/CommonSProxy.cs

@@ -56,6 +56,7 @@ namespace GFGGame
                     FieldSProxy.ReqFieldInstanceInfos().Coroutine();
                     ArenaSproxy.ReqArenaInfos().Coroutine();
                     EnduringGiftBoxSProxy.ReqGetAllGiftBagRebateStatus().Coroutine();
+                    LuckyBoxSProxy.ReqGetLuckyBoxRotatingInfo().Coroutine();
                     PromptController.Instance.ShowFloatTextPrompt("每日次数已重置", MessageType.SUCCESS);
                 }
             }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/ServerProxy/LuckyBoxSProxy.cs

@@ -36,6 +36,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
+                    LuckyBoxDataManager.Instance.RotatingId = response.RotatingId;
                     return response.RotatingId;
                 }
             }

+ 3 - 3
GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs

@@ -15,7 +15,7 @@ namespace GFGGame
                 {
                     for (int i = 0; i < response.ks.Count; i++)
                     {
-                        ShopDataManager.Instance.UpdateGiftData(response.ks[i], response.vs[i]);
+                        ShopDataManager.Instance.UpdateGoodsData(response.ks[i], response.vs[i]);
                     }
                     return true;
                 }
@@ -30,7 +30,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    ShopDataManager.Instance.UpdateGiftData(response.BuyId, response.TotalTimes);
+                    ShopDataManager.Instance.UpdateGoodsData(response.BuyId, response.TotalTimes);
                     ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(response.BuyId);
                     ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(shopCfg.itemId);
                     if (LauncherConfig.netType == LauncherConfig.EnumNetType.LOCAL && shopCfg.costType == CostType.RMB)
@@ -48,7 +48,7 @@ namespace GFGGame
                     {
                         itemDatas = ItemUtil.CreateItemDataList(itemCfg.id, response.Times * shopCfg.itemNum);
                     }
-                    
+
                     EventAgent.DispatchEvent(ConstMessage.CONTINUOUS_REBATE_GIFT_SHOP_BUY, shopCfg);
                     BonusController.TryShowBonusList(itemDatas);
                     EventAgent.DispatchEvent(ConstMessage.SHOP_BUY);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/ServerProxy/TaskSProxy.cs

@@ -17,7 +17,7 @@ namespace ET
                 Progress = message.TaskInfo.Progress
             };
             TaskDataManager.Instance.UpdateTaskInfo(taskInfo.ID, taskInfo);
-            EventAgent.DispatchEvent(ConstMessage.RED_CHANGE);
+            EventAgent.DispatchEvent(ConstMessage.NOTICE_TASK_STATE_CHANGE, taskInfo.ID);
             await ETTask.CompletedTask;
         }
     }

+ 20 - 0
GameClient/Assets/Game/HotUpdate/Views/ActivityDay7/ActivityDay7View.cs

@@ -71,6 +71,25 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, OnItemChange);
+            // ConstMessage.NOTICE_TASK_STATE_CHANGE
+            EventAgent.AddEventListener(ConstMessage.NOTICE_TASK_STATE_CHANGE, OnTaskChange);
+        }
+
+        private void OnTaskChange(EventContext context)
+        {
+            var taskId = (int)context.data;
+            var taskCfg = TaskCfgArray.Instance.GetCfg(taskId);
+            if (taskCfg == null) return;
+            if (taskCfg.taskType != TaskType.Day7) return;
+            SetTasks();
+        }
+
+        protected override void RemoveEventListener()
+        {
+            //ConstMessage.ITEM_CHANGED
+            EventAgent.RemoveEventListener(ConstMessage.ITEM_CHANGED, OnItemChange);
+            // ConstMessage.NOTICE_TASK_STATE_CHANGE
+            EventAgent.RemoveEventListener(ConstMessage.NOTICE_TASK_STATE_CHANGE, OnTaskChange);
         }
 
         private void OnItemChange(EventContext context)
@@ -224,6 +243,7 @@ namespace GFGGame
             //7日活动配置
             cfgDataArray = Activity7DaysTaskCfgArray.Instance.dataArray;
             _ui.m_DayList.numItems = cfgDataArray.Length;
+            _ui.m_DayList.ScrollToView(onClickDayIndex);
         }
 
         private void FreshGetStatus()

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

@@ -68,9 +68,9 @@ namespace GFGGame
             || (ActivityDataManager.Instance.sevenDayLoginLoginId >= 7 && ActivityDataManager.Instance.sevenDayLoginBonusStatus == ConstBonusStatus.GOT));
 
             _ui.m_comList.m_btnLimitChargeAddUp.target.visible = ActivityDataManager.Instance.actLimitChargeId > 0;
+            ActivityOpenCfg openCfg = ActivityOpenCfgArray.Instance.GetCfg(ActivityDataManager.Instance.actLimitChargeId);
             if (ActivityDataManager.Instance.actLimitChargeId > 0)
             {
-                ActivityOpenCfg openCfg = ActivityOpenCfgArray.Instance.GetCfg(ActivityDataManager.Instance.actLimitChargeId);
                 _ui.m_comList.m_btnLimitChargeAddUp.m_loaIcon.url = "ui://DailyWelfare/hdbn_xslc_" + openCfg.res;
                 _ui.m_comList.m_btnLimitChargeAddUp.m_loaTitle.url = "ui://DailyWelfare/hdbn_wz_xslc_" + openCfg.res;
             }
@@ -95,9 +95,9 @@ namespace GFGGame
         {
             if (ActivityDataManager.Instance.actLimitChargeId > 0)
             {
-                ActivityOpenCfg openCfg = ActivityOpenCfgArray.Instance.GetCfg(ActivityDataManager.Instance.actLimitChargeId);
+                ActivityInfo activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(ActivityDataManager.Instance.actLimitChargeId);
                 long curTime = TimeHelper.ServerNow();
-                long endTime = TimeUtil.DateTimeToTimestamp(openCfg.endTime);
+                long endTime = activityInfo.endTime;
                 if (curTime < endTime)
                 {
                     _ui.m_comList.m_btnLimitChargeAddUp.m_txtTime.text = string.Format("剩余时间:{0}", TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime));

+ 6 - 2
GameClient/Assets/Game/HotUpdate/Views/DailyWelfare/LimitChargeView.cs

@@ -53,7 +53,11 @@ namespace GFGGame
             base.OnShown();
             _rechargeCfgs = ActivityRechargeCfgArray.Instance.GetCfgsByactivityId(ActivityDataManager.Instance.actLimitChargeId);
             UpdateView();
+
+            ActivityOpenCfg openCfg = ActivityOpenCfgArray.Instance.GetCfg(ActivityDataManager.Instance.actLimitChargeId);
+
             Timers.inst.Add(1, 0, UpdateTime);
+
         }
         protected override void OnHide()
         {
@@ -73,9 +77,9 @@ namespace GFGGame
         }
         private void UpdateTime(object param)
         {
-            ActivityOpenCfg openCfg = ActivityOpenCfgArray.Instance.GetCfg(ActivityDataManager.Instance.actLimitChargeId);
+            ActivityInfo activityInfo = ActivityGlobalDataManager.Instance.GetActivityInfo(ActivityDataManager.Instance.actLimitChargeId);
             long curTime = TimeHelper.ServerNow();
-            long endTime = TimeUtil.DateTimeToTimestamp(openCfg.endTime);
+            long endTime = activityInfo.endTime;
             _ui.m_txtTime.text = TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
         }
 

+ 18 - 18
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -12,7 +12,7 @@ namespace GFGGame
     {
         private UI_LuckyBoxUI _ui;
         private ValueBarController _valueBarController;
-        private List<LuckyBoxController> _lcukyBoxCtrl = new List<LuckyBoxController>();
+        private Dictionary<int, LuckyBoxController> _lcukyBoxCtrl = new Dictionary<int, LuckyBoxController>();
 
         //private GameObject _gameObject;
         //private GoWrapper _wrapper;
@@ -43,9 +43,9 @@ namespace GFGGame
                 _valueBarController.Dispose();
                 _valueBarController = null;
             }
-            for (int i = 0; i < _lcukyBoxCtrl.Count; i++)
+            foreach (int key in _lcukyBoxCtrl.Keys)
             {
-                _lcukyBoxCtrl[i].Dispose();
+                _lcukyBoxCtrl[key].Dispose();
             }
             _lcukyBoxCtrl.Clear();
             if (_dressUpObjUIXiHe != null)
@@ -104,7 +104,7 @@ namespace GFGGame
             EventAgent.AddEventListener(ConstMessage.ITEM_CHANGED, OnListBgScroll);
             EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, OnListBgScroll);
         }
-        protected override async void OnShown()
+        protected override void OnShown()
         {
             base.OnShown();
 
@@ -112,10 +112,9 @@ namespace GFGGame
             LuckyBoxDataManager.Instance.luckyBoxIds.Add(LuckyBoxDataManager.BOX_ID_2);
             LuckyBoxDataManager.Instance.luckyBoxIds.Add(LuckyBoxDataManager.BOX_ID_3);
             _activeBoxId = 0;
-            int result = await LuckyBoxSProxy.ReqGetLuckyBoxRotatingInfo();
-            if (result > 0)
+            if (LuckyBoxDataManager.Instance.RotatingId > 0)
             {
-                RotatingLuckyBoxCfg rotatingLuckyBox = RotatingLuckyBoxCfgArray.Instance.GetCfg(result);
+                RotatingLuckyBoxCfg rotatingLuckyBox = RotatingLuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.RotatingId);
                 _activeBoxId = rotatingLuckyBox.luckyBoxId;
                 LuckyBoxDataManager.Instance.endTime = TimeUtil.GetTimestamp(rotatingLuckyBox.endTime);
                 LuckyBoxDataManager.Instance.luckyBoxIds.Insert(0, _activeBoxId);
@@ -173,15 +172,15 @@ namespace GFGGame
 
             UI_ComBox comBox = UI_ComBox.Proxy(obj);
             comBox.m_comModel.m_loaBg.url = ResPathUtil.GetBgImgPath(cfg.resArr[_bgIndex]);
-            if (_lcukyBoxCtrl.Count <= index)
+            if (!_lcukyBoxCtrl.ContainsKey(boxId))
             {
-                _lcukyBoxCtrl.Add(new LuckyBoxController(comBox.m_comModel.target));
-                if (_ui.m_listBg.ChildIndexToItemIndex(0) == index)
-                {
-                    _lcukyBoxCtrl[index].OnShown(boxId);
-                }
+                _lcukyBoxCtrl.Add(boxId, new LuckyBoxController(comBox.m_comModel.target));
+                // if (_ui.m_listBg.ChildIndexToItemIndex(0) == index)
+                // {
+                //     _lcukyBoxCtrl[index].OnShown(boxId);
+                // }
             }
-
+            if (_lcukyBoxCtrl.ContainsKey(boxId)) _lcukyBoxCtrl[boxId].OnShown(boxId);
             comBox.m_btnPreview.m_c1.selectedIndex = boxId;
             LuckyBoxDataManager.Instance.GetOwnedCount(boxId, out int count, out int totalCount);
             comBox.m_txtOwned.SetVar("v1", "" + count).FlushVars();
@@ -262,12 +261,13 @@ namespace GFGGame
 
         private void OnListBgScroll()
         {
-            _lcukyBoxCtrl[_curIndex].OnHide();
+            _lcukyBoxCtrl[LuckyBoxDataManager.Instance.currentBoxId].OnHide();
             _curIndex = _ui.m_listBg.ChildIndexToItemIndex(0);
             LuckyBoxDataManager.Instance.currentBoxId = LuckyBoxDataManager.Instance.luckyBoxIds[_curIndex];
+
             _bgIndex = 0;
             _valueBarController.UpdateCJ();
-            _lcukyBoxCtrl[_curIndex].OnShown(LuckyBoxDataManager.Instance.currentBoxId);
+            _lcukyBoxCtrl[LuckyBoxDataManager.Instance.currentBoxId].OnShown(LuckyBoxDataManager.Instance.currentBoxId);
             _ui.m_btnLeft.grayed = _curIndex <= 0;
             _ui.m_btnRight.grayed = _curIndex >= _ui.m_listBg.numItems - 1;
 
@@ -376,9 +376,9 @@ namespace GFGGame
         {
             base.OnHide();
             _valueBarController.OnHide();
-            for (int i = 0; i < _lcukyBoxCtrl.Count; i++)
+            foreach (int key in _lcukyBoxCtrl.Keys)
             {
-                _lcukyBoxCtrl[i].OnHide();
+                _lcukyBoxCtrl[key].OnHide();
             }
 
             Timers.inst.Remove(CheckTime);

+ 9 - 5
GameClient/Assets/Game/HotUpdate/Views/Store/StoreMonthView.cs

@@ -47,7 +47,7 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
-            EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateView);
+            EventAgent.AddEventListener(ConstMessage.SHOP_BUY, UpdateView);
 
         }
         protected override void OnShown()
@@ -67,7 +67,7 @@ namespace GFGGame
         protected override void RemoveEventListener()
         {
             base.RemoveEventListener();
-            EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateView);
+            EventAgent.RemoveEventListener(ConstMessage.SHOP_BUY, UpdateView);
         }
         private void OnBtnBlackRewardClick()
         {
@@ -173,15 +173,19 @@ namespace GFGGame
             ShopViewManager.Instance.UptadeItem(obj, shopCfg);
         }
 
-        private void OnClickBtnBuy(EventContext context)
+        private async void OnClickBtnBuy(EventContext context)
         {
             GObject obj = context.sender as GObject;
             int index = (int)obj.data;
             ShopCfg itemData = _shopCfgs[index];
             if (!AntiAddictionController.CheckAntiAddictionRecharge(itemData.price))
             {
-                ShopSProxy.ReqShopBuy(itemData.id, 1).Coroutine();
-                LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
+                bool result = await ShopSProxy.ReqShopBuy(itemData.id, 1);
+                if (result)
+                {
+                    UpdateView();
+                    LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
+                }
             }
         }
     }

+ 21 - 10
GameClient/Assets/Game/HotUpdate/Views/Task/CombTaskView.cs

@@ -55,11 +55,22 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             EventAgent.AddEventListener(ConstMessage.LIVENESS_CHANGE, UpdateLivenessProcess);
+            EventAgent.AddEventListener(ConstMessage.NOTICE_TASK_STATE_CHANGE, OnTaskChange);
         }
 
         protected override void RemoveEventListener()
         {
             EventAgent.RemoveEventListener(ConstMessage.LIVENESS_CHANGE, UpdateLivenessProcess);
+            EventAgent.RemoveEventListener(ConstMessage.NOTICE_TASK_STATE_CHANGE, OnTaskChange);
+        }
+
+        private void OnTaskChange(EventContext eventContext)
+        {
+            var taskId = (int)eventContext.data;
+            var taskCfg = TaskCfgArray.Instance.GetCfg(taskId);
+            if (taskCfg == null) return;
+            if (taskCfg.taskType != taskType) return;
+            UpdateTask();
         }
 
         //切换任务类型
@@ -199,17 +210,17 @@ namespace GFGGame
             switch (state)
             {
                 case ConstBonusStatus.CAN_NOT_GET:
-                    {
-                        var rewards = ItemUtil.CreateItemDataList(cfg.rewardsArr);
-                        ViewManager.Show<RewardPreView>(new object[] { rewards, "活跃度奖励", $"满足{cfg.count}活跃度可领取" });
-                        break;
-                    }
+                {
+                    var rewards = ItemUtil.CreateItemDataList(cfg.rewardsArr);
+                    ViewManager.Show<RewardPreView>(new object[] { rewards, "活跃度奖励", $"满足{cfg.count}活跃度可领取" });
+                    break;
+                }
                 case ConstBonusStatus.CAN_GET:
-                    {
-                        var result = await DailyTaskSProxy.ReqLivenessBox(cfg.id);
-                        if (result) UpdateLivenessProcess();
-                        break;
-                    }
+                {
+                    var result = await DailyTaskSProxy.ReqLivenessBox(cfg.id);
+                    if (result) UpdateLivenessProcess();
+                    break;
+                }
                 case ConstBonusStatus.GOT:
                     //领取完毕
                     break;

BIN
GameClient/Assets/ResIn/UI/CommonGame/CommonGame_fui.bytes


BIN
GameClient/Assets/ResIn/UI/DailyWelfare/DailyWelfare_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_1!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_5!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_5.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_8!a.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_atlas0_8.png


BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes