zhaoyang 2 жил өмнө
parent
commit
33971afe69

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

@@ -43,6 +43,7 @@ namespace GFGGame
 
 
         public const string BUY_STUDIO_PLAY_TIMES = "BUY_STUDIO_PLAY_TIMES";//购买工作室次数
         public const string BUY_STUDIO_PLAY_TIMES = "BUY_STUDIO_PLAY_TIMES";//购买工作室次数
         public const string NOTICE_STUDIO_PLAY_TIMES = "NOTICE_STUDIO_PLAY_TIMES";//工作室次数变化通知
         public const string NOTICE_STUDIO_PLAY_TIMES = "NOTICE_STUDIO_PLAY_TIMES";//工作室次数变化通知
+        public const string FILING_SCORE_CHANGE = "FILING_SCORE_CHANGE";//查阅建档分数奖励变化
         public const string FILLING_CHANGE_CHAPTER = "FILLING_CHANGE_CHAPTER";//查阅建档切换npc
         public const string FILLING_CHANGE_CHAPTER = "FILLING_CHANGE_CHAPTER";//查阅建档切换npc
 
 
 
 

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

@@ -245,7 +245,7 @@ namespace GFGGame
             EquipDataCache.cacher.dialogSpeed = dialogSpeed <= 0 ? 1 : dialogSpeed;
             EquipDataCache.cacher.dialogSpeed = dialogSpeed <= 0 ? 1 : dialogSpeed;
 
 
             int filingChapterId = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STUDIO_FILING_CHAPTERID);
             int filingChapterId = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STUDIO_FILING_CHAPTERID);
-            StudioDataManager.Instance.filingChapterId = filingChapterId <= 0 ? FilingCfgArray.Instance.dataArray[0].id : filingChapterId;
+            StudioDataManager.Instance.filingChapterId = filingChapterId <= 0 ? StudioDataManager.Instance.FilingDatas[0].id : filingChapterId;
             GameGlobal.skipCheckOpen = StorageDataManager.Instance.GetStorageValue(ConstStorageId.SKIP_CHECK_OPEN) <= 0 ? false : true;
             GameGlobal.skipCheckOpen = StorageDataManager.Instance.GetStorageValue(ConstStorageId.SKIP_CHECK_OPEN) <= 0 ? false : true;
 
 
             bool result = await FieldSProxy.ReqFieldInstanceInfos();
             bool result = await FieldSProxy.ReqFieldInstanceInfos();

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

@@ -274,7 +274,7 @@ namespace GFGGame
             }
             }
             times = Math.Min(GameConst.MAX_COUNT_FIGHT_QUICKLY, times);
             times = Math.Min(GameConst.MAX_COUNT_FIGHT_QUICKLY, times);
             title = "";
             title = "";
-            if (type == ConstInstanceZonesType.Studio || type == ConstInstanceZonesType.Filing)
+            if (type == ConstInstanceZonesType.Studio)
             {
             {
                 StudioData studioData = StudioDataManager.Instance.GetStudioDataById(levelCfg.chapterId, type);
                 StudioData studioData = StudioDataManager.Instance.GetStudioDataById(levelCfg.chapterId, type);
                 times = Math.Min(times, studioData.TotalPlayTimes - studioData.PlayTimes);
                 times = Math.Min(times, studioData.TotalPlayTimes - studioData.PlayTimes);

+ 21 - 6
GameClient/Assets/Game/HotUpdate/Data/StudioDataManager.cs

@@ -15,6 +15,13 @@ namespace GFGGame
 
 
         public int filingChapterId;//查阅建档副本Id
         public int filingChapterId;//查阅建档副本Id
 
 
+        public List<StudioCfg> FilingDatas
+        {
+            get
+            {
+                return StudioCfgArray.Instance.GetCfgsByfunId(typeof(StudioFilingView).Name);
+            }
+        }
         public void Clear()
         public void Clear()
         {
         {
             _StudioInfoById.Clear();
             _StudioInfoById.Clear();
@@ -35,9 +42,19 @@ namespace GFGGame
             _StudioInfoById[chapterId].TotalPlayTimes = totalPlayTimes;
             _StudioInfoById[chapterId].TotalPlayTimes = totalPlayTimes;
 
 
         }
         }
-        public void NoticeStudioPlayTimes(M2C_NoticeStudioPlayTimes message)
+        public void RspFilingScoreReward(int chapterId, List<int> rewardsStatus)
+        {
+            _StudioInfoById[chapterId].RewardsStatus = rewardsStatus;
+
+        }
+        public void NoticeStudioPlayTimes(int chapterId, int PlayTimes)
         {
         {
-            _StudioInfoById[message.ChapterId].PlayTimes = message.PlayTimes;
+            _StudioInfoById[chapterId].PlayTimes = PlayTimes;
+        }
+        public void NoticeFilingScoreBonusChanged(int chapterId, int chapterScore, List<int> rewardsStatus)
+        {
+            _StudioInfoById[chapterId].ChapterScore = chapterScore;
+            _StudioInfoById[chapterId].RewardsStatus = rewardsStatus;
         }
         }
 
 
 
 
@@ -54,10 +71,6 @@ namespace GFGGame
                 {
                 {
                     totalPlayTimes = StudioCfgArray.Instance.GetCfg(id).num;
                     totalPlayTimes = StudioCfgArray.Instance.GetCfg(id).num;
                 }
                 }
-                else if (type == ConstInstanceZonesType.Filing)
-                {
-                    totalPlayTimes = FilingCfgArray.Instance.GetCfg(id).num;
-                }
                 StudioData studioData = new StudioData() { ChapterId = id, BuyTimes = 0, PlayTimes = 0, TotalPlayTimes = totalPlayTimes };
                 StudioData studioData = new StudioData() { ChapterId = id, BuyTimes = 0, PlayTimes = 0, TotalPlayTimes = totalPlayTimes };
                 RspStudioInfos(studioData);
                 RspStudioInfos(studioData);
                 return studioData;
                 return studioData;
@@ -132,5 +145,7 @@ namespace GFGGame
             }
             }
             return addition;
             return addition;
         }
         }
+
+
     }
     }
 }
 }

+ 10 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/StudioData.cs

@@ -23,5 +23,15 @@ namespace GFGGame
         /// 可挑战次数
         /// 可挑战次数
         /// </summary>
         /// </summary>
         public int TotalPlayTimes;
         public int TotalPlayTimes;
+
+        /// <summary>
+        /// 查阅建档一章总分
+        /// </summary>
+        public int ChapterScore;
+
+        /// <summary>
+        /// 宝箱奖励状态,索引按照配置列表顺序索引,值由ConstBonusStatus定义(只有查阅建档才有值)
+        /// </summary>
+        public List<int> RewardsStatus;
     }
     }
 }
 }

+ 2 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/InstanceZonesSProxy.cs

@@ -44,9 +44,9 @@ namespace GFGGame
                     BonusController.TryShowBonusList(bonusList);
                     BonusController.TryShowBonusList(bonusList);
 
 
                     StoryLevelCfg storyLevelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
                     StoryLevelCfg storyLevelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
-                    if (storyLevelCfg.type == ConstInstanceZonesType.Filing)
+                    if (storyLevelCfg.type == ConstInstanceZonesType.Studio && storyLevelCfg.subType == ConstInstanceZonesSubType.Hard3)
                     {
                     {
-                        FilingCfg filingCfg = FilingCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
+                        StudioCfg filingCfg = StudioCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
                         SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(filingCfg.suitId);
                         SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(filingCfg.suitId);
                         if (suitCfg.syntheticStoryLevelId == levelCfgId)
                         if (suitCfg.syntheticStoryLevelId == levelCfgId)
                         {
                         {

+ 27 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/StudioSProxy.cs

@@ -8,12 +8,22 @@ namespace ET
     {
     {
         protected override async ETTask Run(Session session, M2C_NoticeStudioPlayTimes message)
         protected override async ETTask Run(Session session, M2C_NoticeStudioPlayTimes message)
         {
         {
-            StudioDataManager.Instance.NoticeStudioPlayTimes(message);
+            StudioDataManager.Instance.NoticeStudioPlayTimes(message.ChapterId, message.PlayTimes);
             EventAgent.DispatchEvent(ConstMessage.NOTICE_STUDIO_PLAY_TIMES);
             EventAgent.DispatchEvent(ConstMessage.NOTICE_STUDIO_PLAY_TIMES);
 
 
             await ETTask.CompletedTask;
             await ETTask.CompletedTask;
         }
         }
     }
     }
+    public class NoticeFilingScoreBonusChanged : AMHandler<S2C_FilingScoreBonusChanged>
+    {
+        protected override async ETTask Run(Session session, S2C_FilingScoreBonusChanged message)
+        {
+            // StudioDataManager.Instance.NoticeFilingScoreBonusChanged(message);
+            EventAgent.DispatchEvent(ConstMessage.FILING_SCORE_CHANGE);
+
+            await ETTask.CompletedTask;
+        }
+    }
 }
 }
 namespace GFGGame
 namespace GFGGame
 {
 {
@@ -31,7 +41,7 @@ namespace GFGGame
                 {
                 {
                     for (int i = 0; i < response.infos.Count; i++)
                     for (int i = 0; i < response.infos.Count; i++)
                     {
                     {
-                        StudioData studioData = new StudioData { ChapterId = response.infos[i].ChapterId, BuyTimes = response.infos[i].BuyTimes, PlayTimes = response.infos[i].PlayTimes, TotalPlayTimes = response.infos[i].TotalPlayTimes };
+                        StudioData studioData = new StudioData { ChapterId = response.infos[i].ChapterId, BuyTimes = response.infos[i].BuyTimes, PlayTimes = response.infos[i].PlayTimes, TotalPlayTimes = response.infos[i].TotalPlayTimes, ChapterScore = response.infos[i].ChapterScore, };
                         StudioDataManager.Instance.RspStudioInfos(studioData);
                         StudioDataManager.Instance.RspStudioInfos(studioData);
                     }
                     }
                     // EventAgent.DispatchEvent(ConstMessage.GET_STUDIO_INFO);
                     // EventAgent.DispatchEvent(ConstMessage.GET_STUDIO_INFO);
@@ -54,5 +64,20 @@ namespace GFGGame
                 }
                 }
             }
             }
         }
         }
+        //领取查阅建档分数宝箱
+        public static async ETTask ReqFilingScoreRewards(int chapterId)
+        {
+            S2C_GetFilingScoreBonus response = null;
+            response = (S2C_GetFilingScoreBonus)await MessageHelper.SendToServer(new C2S_GetFilingScoreBonus() { ChapterId = chapterId });
+            if (response != null)
+            {
+                if (response.Error == ErrorCode.ERR_Success)
+                {
+                    StudioDataManager.Instance.RspFilingScoreReward(response.ChapterId, response.BonusIndexList);
+                    EventAgent.DispatchEvent(ConstMessage.FILING_SCORE_CHANGE);
+
+                }
+            }
+        }
     }
     }
 }
 }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/ClothingSynthetic/SuitSyntheticView.cs

@@ -119,7 +119,7 @@ namespace GFGGame
                     isLock = true;
                     isLock = true;
                     var levelCfg = StoryLevelCfgArray.Instance.GetCfg(suitCfg.syntheticStoryLevelId);
                     var levelCfg = StoryLevelCfgArray.Instance.GetCfg(suitCfg.syntheticStoryLevelId);
                     string str = "";
                     string str = "";
-                    if (levelCfg.type == ConstInstanceZonesType.Filing)
+                    if (levelCfg.type == ConstInstanceZonesType.Studio)
                     {
                     {
                         StoryLevelCfg cfg = StoryLevelCfgArray.Instance.GetCfg(suitCfg.syntheticStoryLevelId);
                         StoryLevelCfg cfg = StoryLevelCfgArray.Instance.GetCfg(suitCfg.syntheticStoryLevelId);
                         str = string.Format("需通关{0}关卡解锁", cfg.name);
                         str = string.Format("需通关{0}关卡解锁", cfg.name);

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -217,11 +217,11 @@ namespace GFGGame
             AlertUI.Show("是否确定退出?")
             AlertUI.Show("是否确定退出?")
             .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
             .SetLeftButton(true, "否").SetRightButton(true, "是", (object data) =>
             {
             {
-                if (_levelCfg.type == ConstInstanceZonesType.Studio)
+                if (_levelCfg.type == ConstInstanceZonesType.Studio && _levelCfg.subType != ConstInstanceZonesSubType.Hard3)
                 {
                 {
                     ViewManager.Show(StudioDataManager.Instance.VIEW_NAME, new object[] { StudioDataManager.Instance.TYPE_SELECT_INDEX, StudioDataManager.Instance.PROPERTY_SELECT_INDEX }, ViewManager.GetGoBackDatas(StudioDataManager.Instance.VIEW_NAME));
                     ViewManager.Show(StudioDataManager.Instance.VIEW_NAME, new object[] { StudioDataManager.Instance.TYPE_SELECT_INDEX, StudioDataManager.Instance.PROPERTY_SELECT_INDEX }, ViewManager.GetGoBackDatas(StudioDataManager.Instance.VIEW_NAME));
                 }
                 }
-                else if (_levelCfg.type == ConstInstanceZonesType.Filing)
+                else if (_levelCfg.type == ConstInstanceZonesType.Studio && _levelCfg.subType == ConstInstanceZonesSubType.Hard3)
                 {
                 {
                     ViewManager.Show<StudioFilingView>(null, ViewManager.GetGoBackDatas(typeof(StudioFilingView).FullName));
                     ViewManager.Show<StudioFilingView>(null, ViewManager.GetGoBackDatas(typeof(StudioFilingView).FullName));
                 }
                 }

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

@@ -48,9 +48,9 @@ namespace GFGGame
         public static async ETTask CheckStoryFightResult()
         public static async ETTask CheckStoryFightResult()
         {
         {
             StoryLevelCfg storyLevelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
             StoryLevelCfg storyLevelCfg = StoryLevelCfgArray.Instance.GetCfg(InstanceZonesDataManager.currentLevelCfgId);
-            if (storyLevelCfg.type == ConstInstanceZonesType.Filing)
+            if (storyLevelCfg.type == ConstInstanceZonesType.Studio && storyLevelCfg.subType == ConstInstanceZonesSubType.Hard3)
             {
             {
-                FilingCfg filingCfg = FilingCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
+                StudioCfg filingCfg = StudioCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
                 float addition = StudioDataManager.Instance.GetAdditionBySuitId(filingCfg.suitId);
                 float addition = StudioDataManager.Instance.GetAdditionBySuitId(filingCfg.suitId);
                 addition = addition / 10000 * EquipDataCache.cacher.totalScore;
                 addition = addition / 10000 * EquipDataCache.cacher.totalScore;
                 EquipDataCache.cacher.totalScore += (int)Math.Round(addition);
                 EquipDataCache.cacher.totalScore += (int)Math.Round(addition);

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

@@ -268,10 +268,10 @@ namespace GFGGame
                 _ui.m_ctrlNeed.selectedIndex = 2;
                 _ui.m_ctrlNeed.selectedIndex = 2;
                 _ui.m_listTag.numItems = fightCfg.needTagsArr.Length;
                 _ui.m_listTag.numItems = fightCfg.needTagsArr.Length;
             }
             }
-            else if (levelCfg.type == ConstInstanceZonesType.Filing)
+            else if (levelCfg.type == ConstInstanceZonesType.Studio && levelCfg.subType == ConstInstanceZonesSubType.Hard3)
             {
             {
                 _ui.m_ctrlNeed.selectedIndex = 3;
                 _ui.m_ctrlNeed.selectedIndex = 3;
-                FilingCfg filingCfg = FilingCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
+                StudioCfg filingCfg = StudioCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
                 SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(filingCfg.suitId);
                 SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(filingCfg.suitId);
                 float addition = StudioDataManager.Instance.GetAdditionBySuitId(filingCfg.suitId);
                 float addition = StudioDataManager.Instance.GetAdditionBySuitId(filingCfg.suitId);
                 addition = addition / 10000 * 100;
                 addition = addition / 10000 * 100;

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingNpcView.cs

@@ -52,7 +52,7 @@ namespace GFGGame
         protected override void OnShown()
         protected override void OnShown()
         {
         {
             base.OnShown();
             base.OnShown();
-            _ui.m_list.numItems = FilingCfgArray.Instance.dataArray.Length;
+            _ui.m_list.numItems = StudioDataManager.Instance.FilingDatas.Count;
         }
         }
 
 
         protected override void OnHide()
         protected override void OnHide()
@@ -69,7 +69,7 @@ namespace GFGGame
 
 
         private void RenderListItem(int index, GObject obj)
         private void RenderListItem(int index, GObject obj)
         {
         {
-            FilingCfg cfg = FilingCfgArray.Instance.dataArray[index];
+            StudioCfg cfg = StudioDataManager.Instance.FilingDatas[index];
             UI_ListNpcItem item = UI_ListNpcItem.Proxy(obj);
             UI_ListNpcItem item = UI_ListNpcItem.Proxy(obj);
             bool isPass = InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
             bool isPass = InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
             string res = isPass ? cfg.res : cfg.res1;
             string res = isPass ? cfg.res : cfg.res1;
@@ -85,7 +85,7 @@ namespace GFGGame
         private void OnListItemClick(EventContext context)
         private void OnListItemClick(EventContext context)
         {
         {
             GObject obj = context.data as GObject;
             GObject obj = context.data as GObject;
-            FilingCfg cfg = obj.data as FilingCfg;
+            StudioCfg cfg = obj.data as StudioCfg;
             bool isPass = InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
             bool isPass = InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
             if (!isPass)
             if (!isPass)
             {
             {

+ 3 - 3
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioFilingView.cs

@@ -9,7 +9,7 @@ namespace GFGGame
     public class StudioFilingView : BaseWindow
     public class StudioFilingView : BaseWindow
     {
     {
         private UI_StudioFilingUI _ui;
         private UI_StudioFilingUI _ui;
-        private FilingCfg _filingCfg;
+        private StudioCfg _filingCfg;
         private List<StoryLevelCfg> _storyLevelCfgs;
         private List<StoryLevelCfg> _storyLevelCfgs;
 
 
         public override void Dispose()
         public override void Dispose()
@@ -71,7 +71,7 @@ namespace GFGGame
         private void UpdateView()
         private void UpdateView()
         {
         {
 
 
-            _filingCfg = FilingCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
+            _filingCfg = StudioCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
             _ui.m_txtTitle.SetVar("name", _filingCfg.name).FlushVars();
             _ui.m_txtTitle.SetVar("name", _filingCfg.name).FlushVars();
             _ui.m_loaNpc.url = ResPathUtil.GetNpcPicFPath(_filingCfg.res);
             _ui.m_loaNpc.url = ResPathUtil.GetNpcPicFPath(_filingCfg.res);
 
 
@@ -81,7 +81,7 @@ namespace GFGGame
             DressUpMenuSuitDataManager.GetSuitProgressBySuitId(_filingCfg.suitId, out int count, out int totalCount);
             DressUpMenuSuitDataManager.GetSuitProgressBySuitId(_filingCfg.suitId, out int count, out int totalCount);
             _ui.m_txtSuitProgress.text = string.Format("({0}/{1})", count, totalCount);
             _ui.m_txtSuitProgress.text = string.Format("({0}/{1})", count, totalCount);
 
 
-            _storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_filingCfg.type, 0, StudioDataManager.Instance.filingChapterId);
+            _storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(_filingCfg.type, _filingCfg.subType, StudioDataManager.Instance.filingChapterId);
             _ui.m_list.numItems = _storyLevelCfgs.Count;
             _ui.m_list.numItems = _storyLevelCfgs.Count;
         }
         }
 
 

BIN
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes