Эх сурвалжийг харах

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

# Conflicts:
#	GameClient/ProjectSettings/ProjectSettings.asset
hexiaojie 1 жил өмнө
parent
commit
4036c21dd8
30 өөрчлөгдсөн 138 нэмэгдсэн , 30 устгасан
  1. 2 0
      GameClient/Assets/Editor/ArtsRes/ImagesClip/ImagesClip.cs
  2. 1 0
      GameClient/Assets/Game/HotUpdate/Controller/GameController.cs
  3. 4 0
      GameClient/Assets/Game/HotUpdate/Data/DecomposeDataManager.cs
  4. 4 0
      GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs
  5. 17 2
      GameClient/Assets/Game/HotUpdate/Data/RedDotDataManager.cs
  6. 2 2
      GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/FieldGuide/UI_ChapterItemGuideUI.cs
  7. 4 4
      GameClient/Assets/Game/HotUpdate/ServerProxy/ShopSProxy.cs
  8. 1 1
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs
  9. 2 1
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxVideoView.cs
  10. 2 10
      GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs
  11. 13 0
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreGrowthFundView.cs
  12. 2 2
      GameClient/Assets/Game/HotUpdate/Views/Store/StoreView.cs
  13. 6 6
      GameClient/Assets/Game/HotUpdate/Views/TimeTracing/TimeTracingSwitchView.cs
  14. 7 0
      GameClient/Assets/Game/Launcher/LauncherConfig.cs
  15. 8 2
      GameClient/Assets/Game/Launcher/Platform/QDManagerInit.cs
  16. 60 0
      GameClient/Assets/Game/Launcher/Utils/LauncherTimeUtil.cs
  17. 3 0
      GameClient/Assets/Game/Launcher/Utils/LauncherTimeUtil.cs.meta
  18. BIN
      GameClient/Assets/ResIn/UI/ClothingUpgrade/ClothingUpgrade_fui.bytes
  19. BIN
      GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0!a.png
  20. BIN
      GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0.png
  21. BIN
      GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0_1.png
  22. BIN
      GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0_2!a.png
  23. BIN
      GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0_2.png
  24. BIN
      GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0_3!a.png
  25. BIN
      GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0_3.png
  26. BIN
      GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_fui.bytes
  27. BIN
      GameClient/Assets/ResIn/UI/Login/Login_atlas0!a.png
  28. BIN
      GameClient/Assets/ResIn/UI/Login/Login_atlas0.png
  29. BIN
      GameClient/Assets/ResIn/UI/Login/Login_fui.bytes
  30. BIN
      GameClient/Assets/ResIn/UI/Main/Main_fui.bytes

+ 2 - 0
GameClient/Assets/Editor/ArtsRes/ImagesClip/ImagesClip.cs

@@ -221,6 +221,8 @@ public class ImagesClip : MonoBehaviour
                 writer.Write(resMd5[key]);
             }
             writer.Close();
+            // 稍微延迟关闭文件流
+            System.Threading.Thread.Sleep(100); // 可以根据需要调整延迟时间
         }
     }
     public static Dictionary<string, string> ReadSourceImagesMD5(string saveName)

+ 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);

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Data/DecomposeDataManager.cs

@@ -220,6 +220,10 @@ namespace GFGGame
         {
             int sum = 0;
             int skillId = ItemDataManager.GetItemSkillId(itemId);
+            if(skillId == 0)
+            {
+                return 0;
+            }
             Dictionary<int, int> leagueSkillLvDatas = SkillDataManager.Instance.GetLeagueSkillLvDatas();
             if (!leagueSkillLvDatas.ContainsKey(skillId))
                 return 0;

+ 4 - 0
GameClient/Assets/Game/HotUpdate/Data/ItemDataManager.cs

@@ -191,6 +191,10 @@ namespace GFGGame
                 return value.param2Arr[0];
             }
             ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(itemId);
+            if (itemCfg.param2Arr.Length == 0)
+            {
+                return 0;
+            }
             return itemCfg.param2Arr[0];
         }
 

+ 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;
         }
 

+ 2 - 2
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/FieldGuide/UI_ChapterItemGuideUI.cs

@@ -8,7 +8,7 @@ namespace UI.FieldGuide
     {
         public GComponent target;
         public GLoader m_loaBg;
-        public GComponent m_btnBack;
+        public GButton m_btnBack;
         public GList m_list;
         public const string URL = "ui://vqq9h9h4s61p1y";
         public const string PACKAGE_NAME = "FieldGuide";
@@ -58,7 +58,7 @@ namespace UI.FieldGuide
         private void Init(GComponent comp)
         {
             m_loaBg = (GLoader)comp.GetChild("loaBg");
-            m_btnBack = (GComponent)comp.GetChild("btnBack");
+            m_btnBack = (GButton)comp.GetChild("btnBack");
             m_list = (GList)comp.GetChild("list");
         }
         public void Dispose(bool disposeTarget = 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);
         }
     }

+ 2 - 10
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs

@@ -149,16 +149,8 @@ namespace GFGGame
             IsTeaParty = (bool)datas[4];
             _autoPlay = _lastStartAutoPlay;
 
-            if ((LauncherConfig.ChannelId != (int)ChannelID.Test) &&
-                !InstanceZonesDataManager.CheckLevelPass(MainStoryDataManager.currentLevelCfgId))
-            {
-                // 临时设置都可以跳过对话
-                skipable = false;
-            }
-            else
-            {
-                skipable = true;
-            }
+            //修改需求,所有关卡打开跳过(第一关除外)
+            skipable = true;
             if (MainStoryDataManager.currentLevelCfgId == 100001001 && !InstanceZonesDataManager.CheckLevelPass(MainStoryDataManager.currentLevelCfgId))
             {
                 skipable = false;

+ 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());

+ 6 - 6
GameClient/Assets/Game/HotUpdate/Views/TimeTracing/TimeTracingSwitchView.cs

@@ -114,7 +114,7 @@ namespace GFGGame
             }
             else
             {
-                //if (chapterID[3] == 1)
+                if (chapterID[3] == 1)
                 {
                     if(chapterID[0] == _ui.m_List.numItems - 2 || chapterID[1] == 0)
                     {
@@ -125,11 +125,11 @@ namespace GFGGame
                     EventAgent.DispatchEvent(ConstMessage.TIMETRACINGUPDATE);
                     this.Hide();
                 }
-                //else
-                //{
-                //    PromptController.Instance.ShowFloatTextPrompt("需集齐前置套装");
-                //    return;
-                //}
+                else
+                {
+                    PromptController.Instance.ShowFloatTextPrompt("需集齐前置套装");
+                    return;
+                }
             }
 
         }

+ 7 - 0
GameClient/Assets/Game/Launcher/LauncherConfig.cs

@@ -59,6 +59,7 @@ namespace GFGGame
         public static int promptSizeMB;
 
         public static string updateUrl;
+        public static long updateEndTime; //强制更新期限,毫秒级时间戳
 
         //新发行给的adId
         public static string douYouAdId;
@@ -124,6 +125,11 @@ namespace GFGGame
             LauncherConfig.updateAppPrompt = result.updateAppPrompt;
             LauncherConfig.updateResPrompt = result.updateResPrompt;
             LauncherConfig.updateUrl = result.updateUrl;
+            if (!string.IsNullOrEmpty(result.updateEndTime))
+            {
+                LauncherConfig.updateEndTime = LauncherTimeUtil.GetTimestamp(result.updateEndTime);
+            }
+
             if (!string.IsNullOrEmpty(result.promptSizeMB))
             {
                 LauncherConfig.promptSizeMB = int.Parse(result.promptSizeMB);
@@ -145,6 +151,7 @@ namespace GFGGame
             public string promptSizeMB;
             public string updateUrl;
             public string douYouAdId;
+            public string updateEndTime; //更新最后时间
         }
     }
 }

+ 8 - 2
GameClient/Assets/Game/Launcher/Platform/QDManagerInit.cs

@@ -32,8 +32,14 @@ namespace GFGGame.Launcher
                             LauncherConfig.updateAppPrompt = "需要安装新的安装包。";
                         }
 
-                        Alert.Show(LauncherConfig.updateAppPrompt)
-                            .SetLeftButton(true, "前往更新", (data) => { Application.OpenURL(LauncherConfig.updateUrl); });
+                        var obj = Alert.Show(LauncherConfig.updateAppPrompt);
+
+                        if (LauncherConfig.updateEndTime > LauncherTimeUtil.GetCurrentTimestamp())
+                        {
+                            obj = obj.SetLeftButton(true, "继续游戏", (data) => { VersionController.Instance.Init(); });
+                        }
+
+                        obj.SetRightButton(true, "确认安装", (data) => { Application.OpenURL(LauncherConfig.updateUrl); });
                     }
                     else
                     {

+ 60 - 0
GameClient/Assets/Game/Launcher/Utils/LauncherTimeUtil.cs

@@ -0,0 +1,60 @@
+using System;
+using System.Globalization;
+
+namespace GFGGame
+{
+    public class LauncherTimeUtil
+    {
+        private static DateTime dt = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
+
+        private static readonly string[] Formats =
+        {
+            "HH:mm",
+            "'['yyyy']['M']['dd']'",
+            "'['yyyy']['MM']['d']'",
+            "'['yyyy']['M']['d']'",
+            "'['yyyy']['MM']['dd']'",
+            "'['yyyy']['MM']['dd']['HH:mm']'",
+            "'['yyyy']['MM']['dd']['H:mm']'",
+            "'['yyyy']['M']['dd']['HH:mm']'",
+            "'['yyyy']['M']['dd']['H:mm']'",
+            "'['yyyy']['MM']['d']['HH:mm']'",
+            "'['yyyy']['MM']['d']['H:mm']'",
+            "'['yyyy']['M']['d']['HH:mm']'",
+            "'['yyyy']['M']['d']['H:mm']'",
+            "'['yyyy']['MM']['dd']['HH:mm:ss']'",
+            "'['yyyy']['M']['dd']['HH:mm:ss']'",
+            "'['yyyy']['MM']['d']['HH:mm:ss']'",
+            "'['yyyy']['M']['d']['HH:mm:ss']'",
+        };
+
+        private static DateTime GetDateTime(string timeStr)
+        {
+            if (DateTime.TryParseExact(timeStr, Formats, null, DateTimeStyles.None, out var result))
+            {
+                return result;
+            }
+
+            throw new FormatException("Invalid date format");
+        }
+
+        //转换成时间戳,单位毫秒
+        public static long GetTimestamp(string timeStr)
+        {
+            var dateTime = GetDateTime(timeStr);
+            return Transition(dateTime);
+        }
+
+        // 获取当前时间的时间戳,单位毫秒
+        public static long GetCurrentTimestamp()
+        {
+            DateTime now = DateTime.UtcNow;
+            return Transition(now);
+        }
+
+        private static long Transition(DateTime d)
+        {
+            return (d.Ticks - dt.Ticks) / 10000;
+        }
+    }
+}

+ 3 - 0
GameClient/Assets/Game/Launcher/Utils/LauncherTimeUtil.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 011af9816d6143ae800b2ce3e580428f
+timeCreated: 1718619590

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


BIN
GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0.png


BIN
GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0_1.png


BIN
GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0_2!a.png


BIN
GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0_2.png


BIN
GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0_3!a.png


BIN
GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_atlas0_3.png


BIN
GameClient/Assets/ResIn/UI/FieldGuide/FieldGuide_fui.bytes


BIN
GameClient/Assets/ResIn/UI/Login/Login_atlas0!a.png


BIN
GameClient/Assets/ResIn/UI/Login/Login_atlas0.png


BIN
GameClient/Assets/ResIn/UI/Login/Login_fui.bytes


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