Kaynağa Gözat

成长基金补充提交

zhangyuqian 1 yıl önce
ebeveyn
işleme
f0d45a587a

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

@@ -275,6 +275,7 @@ namespace GFGGame
             LeagueSproxy.GetTeapartyInfos().Coroutine();
             LeagueSproxy.GetTeapartyMatchingInfos(RoleDataManager.roleId).Coroutine();
             ActivitySProxy.ReqGetActivitySignInfos().Coroutine();
+            ShopSProxy.ReqGetGrowthFundInfo().Coroutine();
             //RoleInfoSProxy.ReqNewRoleGetSuitStatus().Coroutine();
 
             int storageAutoPlay = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_AUTO_PLAY);

+ 17 - 2
GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs

@@ -710,7 +710,18 @@ namespace GFGGame
         /// <returns></returns>
         public bool GetGrowthFundBuy()
         {
-            return GameGlobal.myNumericComponent.GetAsInt(NumericType.BuyGrowthFund) == 0;
+            ShopCfg shopCfg = ShopCfgArray.Instance.GetCfg(ActivityOpenCfgArray.Instance.GetCfg(3002).paramsArr[0]);
+            var remainBuyNum = shopCfg.maxBuyNum - ShopDataManager.Instance.GetGoodsBuyNumById(shopCfg.id);
+            if (remainBuyNum == 0)
+            {
+                //已售完
+                return true;
+            }
+            else
+            {
+                //未售完
+                return false;
+            }
         }
 
         public bool GetGrowthFundRewardRed()
@@ -719,7 +730,7 @@ namespace GFGGame
             {
                 return false;
             }
-            if (GetGrowthFundBuy())
+            if (!GetGrowthFundBuy())
             {
                 return false;
             }
@@ -734,6 +745,10 @@ namespace GFGGame
                     }
                 }
             }
+            if(RoleDataManager.lvl >= GrowthFundCfgArray.Instance.dataArray[GrowthFundCfgArray.Instance.dataArray.Length-1].level)
+            {
+                return true;
+            }
             return false;
         }
 

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

@@ -190,15 +190,15 @@ namespace GFGGame
         }
 
         //获取成长基金消息
-        public static async ETTask<bool> ReqGetGrowthFundInfo(int activityID)
+        public static async ETTask<bool> ReqGetGrowthFundInfo(int activityID = 3002)
         {
             ActivityOpenCfg activityCfg = ActivityOpenCfgArray.Instance.GetCfg(activityID);
             if(RoleDataManager.lvl < activityCfg.level || ShopDataManager.Instance.GrowthFundRewardList.Count == GrowthFundCfgArray.Instance.dataArray.Length)
             {
                 return false;
             }
-            S2C_GetGrowthFundRewrd response = null;
-            response = (S2C_GetGrowthFundRewrd)await MessageHelper.SendToServer(new C2S_GetGrowthFundRewrd() { ActivityId = activityID});
+            S2C_GetGrowthFundRewrdStatus response = null;
+            response = (S2C_GetGrowthFundRewrdStatus)await MessageHelper.SendToServer(new C2S_GetGrowthFundRewrdStatus() { ActivityId = activityID});
             if (response != null)
             {
                 if (response.Error == ErrorCode.ERR_Success)
@@ -218,7 +218,7 @@ namespace GFGGame
             {
                 if (response.Error == ErrorCode.ERR_Success)
                 {
-                    ShopDataManager.Instance.GrowthFundRewardList = response.RewrdIds;
+                    ShopDataManager.Instance.GrowthFundRewardList.Add(id);
                     BonusController.TryShowBonusList(ItemUtil.CreateItemDataList(response.BonusList));
                     return true;
                 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

@@ -164,7 +164,7 @@ namespace GFGGame
                     UpdateItem(_ui.target.GetChild("item" + i).asCom, i, 10);
                 }
             }
-
+            MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
             //修改,因为加了抽奖动画,在进入后就直接筛选掉所有不是新的
             for (int i = 0; i < _rewardList.Count; i++)
             {

+ 2 - 1
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxVideoView.cs

@@ -23,6 +23,7 @@ namespace GFGGame
         public void Show(List<ItemData> _reward = null)
         {
             MusicManager.Instance.Stop();
+            MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath("luckyboxMp3", "mp3"));
             FairyGUI.GRoot.inst.touchable = false;
             string path = ResPathUtil.GetUUIPrefabPath("UILuckyBox");
             handle = YooAssets.LoadAssetSync<GameObject>(path);
@@ -120,7 +121,6 @@ namespace GFGGame
             StopAllCoroutines();
             videoPlayer.Stop();
             videoPlayer.loopPointReached -= OnVideoEnded;
-            MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
             handle.Release();
             handle = null;
             videoHandle.Release();
@@ -128,6 +128,7 @@ namespace GFGGame
             GameObject.Destroy(_ui);
             _ui = null;
             FairyGUI.GRoot.inst.touchable = true;
+            MusicManager.Instance.PlayCroutine(ResPathUtil.GetMusicPath(ConstMusicName.DEFAULT));
             ViewManager.Show<LuckyBoxBonusShowView>(_rewardList);
         }
     }

+ 13 - 0
GameClient/Assets/Game/HotUpdate/Views/Store/StoreGrowthFundView.cs

@@ -13,6 +13,8 @@ namespace GFGGame
         private ValueBarController _valueBarController;
         private int menu2;
         private EffectUI _effectUI1;
+        private int ScrollToViewIndex = 0;
+        private bool firstToIndex;
 
         public override void Dispose()
         {
@@ -81,6 +83,8 @@ namespace GFGGame
         private void UpdateView()
         {
             GetGrowthFundBuy();
+            ScrollToViewIndex = 0;
+            firstToIndex = true;
             int count = 0;
             for(int i = 0;i < GrowthFundCfgArray.Instance.dataArray.Length;i++)
             {
@@ -91,6 +95,7 @@ namespace GFGGame
             }
             _ui.m_txtGiftBag.text = count.ToString();
             _ui.m_list.numItems = GrowthFundCfgArray.Instance.dataArray.Length;
+            _ui.m_list.ScrollToView(ScrollToViewIndex,false,true);
         }
         private void OnBtnBuyClick()
         {
@@ -155,6 +160,14 @@ namespace GFGGame
             {
                 item.m_rewardBtn.target.onClick.Add(OnBtnGetClick);
             }
+            if(item.m_rewardBtn.m_c1.selectedIndex == 1)
+            {
+                if(firstToIndex)
+                {
+                    ScrollToViewIndex = index;
+                    firstToIndex = false;
+                }  
+            }
             item.m_rewardBtn.target.data = index + 1;
             UI_GrowthFundItemUI.ProxyEnd();
 

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/Store/StoreView.cs

@@ -259,7 +259,7 @@ namespace GFGGame
             }
 
             UpdateStoreMonthRedDot();
-            //UpdateGrowthFunRed();
+            UpdateGrowthFunRed();
 
             RedDotController.Instance.SetComRedDot(_ui.m_comTab.m_btn2.target, (RedDotDataManager.Instance.GetGiftBagRewardRed() || RedDotDataManager.Instance.GetGiftBagRebateRed()));
             if (_ui.m_comTab.m_c1.selectedIndex == ConstStoreTabId.STORE_GIFT_BAG)
@@ -280,7 +280,7 @@ namespace GFGGame
         private void UpdateStoreMonthRedDot()
         {
             RedDotController.Instance.SetComRedDot(_ui.m_comTab.m_btn1.target, RedDotDataManager.Instance.GetGoldCardRewardRed() || RedDotDataManager.Instance.GetBlackCardRewardRed() || RedDotDataManager.Instance.GetBlackCardClothingRed()
-                || RedDotDataManager.Instance.GetStoreBrocadeWeavRewardRed());
+                || RedDotDataManager.Instance.GetStoreBrocadeWeavRewardRed()||RedDotDataManager.Instance.GetGrowthFundRewardRed());
             if (_ui.m_comTab.m_c1.selectedIndex == ConstStoreTabId.STORE_MONTH_CARD)
             {
                 RedDotController.Instance.SetComRedDot(_ui.m_listSubTab.GetChildAt(ConstStoreSubId.STORE_MONTH_GOLD_CARD).asCom, RedDotDataManager.Instance.GetGoldCardRewardRed());

BIN
GameClient/Assets/ResIn/UI/ClothingUpgrade/ClothingUpgrade_fui.bytes


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