Browse Source

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

zhangyuqian 1 year ago
parent
commit
ebc95541c0

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/OpenServerActivity/UI_OpenServerActivityUI.cs

@@ -9,9 +9,9 @@ namespace UI.OpenServerActivity
         public GComponent target;
         public GLoader m_loaBg;
         public GGraph m_holderSmallBg;
+        public GButton m_btnBack;
         public GGraph m_holderTitle;
         public GGraph m_holderFog;
-        public GButton m_btnBack;
         public GButton m_btnAnswerTianmen;
         public GButton m_btnMingTong;
         public GButton m_btnHeaven;
@@ -70,9 +70,9 @@ namespace UI.OpenServerActivity
         {
             m_loaBg = (GLoader)comp.GetChild("loaBg");
             m_holderSmallBg = (GGraph)comp.GetChild("holderSmallBg");
+            m_btnBack = (GButton)comp.GetChild("btnBack");
             m_holderTitle = (GGraph)comp.GetChild("holderTitle");
             m_holderFog = (GGraph)comp.GetChild("holderFog");
-            m_btnBack = (GButton)comp.GetChild("btnBack");
             m_btnAnswerTianmen = (GButton)comp.GetChild("btnAnswerTianmen");
             m_btnMingTong = (GButton)comp.GetChild("btnMingTong");
             m_btnHeaven = (GButton)comp.GetChild("btnHeaven");
@@ -87,9 +87,9 @@ namespace UI.OpenServerActivity
         {
             m_loaBg = null;
             m_holderSmallBg = null;
+            m_btnBack = null;
             m_holderTitle = null;
             m_holderFog = null;
-            m_btnBack = null;
             m_btnAnswerTianmen = null;
             m_btnMingTong = null;
             m_btnHeaven = null;

+ 10 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/ActivitySProxy.cs

@@ -15,12 +15,20 @@ namespace GFGGame
             var activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(message.ActivityId);
 
             if (activityOpenCfg.type == ConstLimitTimeActivityType.ActLimitLuckyBox)
+            {
+                ActivityDataManager.Instance.allPlayTimes = message.AllPlayTimes;
                 ActivityDataManager.Instance.lastDrawCount = message.Count;
+            }
             else if (activityOpenCfg.type == ConstLimitTimeActivityType.ActLimitTsy)
+            {
+                ActivityDataManager.Instance.allTsyPlayTimes = message.AllPlayTimes;
                 ActivityDataManager.Instance.lastTsyDrawCount = message.Count;
-            else if (activityOpenCfg.type == ConstLimitTimeActivityType.ActLimitStlyc)
+            }
+            else if (activityOpenCfg.type == ConstLimitTimeActivityType.ActLimitStlyc) 
+            {
+                ActivityDataManager.Instance.allLimitStlycTimes = message.AllPlayTimes;
                 ActivityDataManager.Instance.lastStlycDrawCount = message.Count;
-
+            }
             EventAgent.DispatchEvent(ConstMessage.ACTIVITY_LUCKY_BOX);
             await ETTask.CompletedTask;
         }

+ 11 - 2
GameClient/Assets/Game/HotUpdate/Views/ActivityAfternoonTea/ActivitySyntheticView.cs

@@ -153,9 +153,18 @@ namespace GFGGame
             }
         }
 
-        private void OnClickBtnGet()
+        private void OnClickBtnGet(EventContext context)
         {
-            MainControllerr.GotoStoryChapter();
+            if (!(context.sender is GObject obj)) return;
+            int index = (int)obj.data;
+            ItemCfg itemSyntheticCfg = ItemCfgArray.Instance.GetCfg(_suitCfg.partsArr[index]);
+            var materiarsArr = itemSyntheticCfg.syntheticMateriarsArr;
+            if (ItemDataManager.GetItemNum(materiarsArr[0][0]) < materiarsArr[0][1])
+            {
+                MainControllerr.GotoStoryChapter();
+            }
+            else
+                ItemUtil.BuyCurrency(materiarsArr[1][0], materiarsArr[1][1] - ItemDataManager.GetItemNum(materiarsArr[1][0]));
         }
 
         private void OnSelectorItemClick(EventContext context)

BIN
GameClient/Assets/ResIn/UI/ActivityAfternoonTea/ActivityAfternoonTea_fui.bytes


BIN
GameClient/Assets/ResIn/UI/OpenServerActivity/OpenServerActivity_fui.bytes