zhaoyang 2 жил өмнө
parent
commit
7385c0525a

+ 8 - 2
FGUIProject/assets/Studio/StudioFilingNpcUI.xml

@@ -1,6 +1,12 @@
 <?xml version="1.0" encoding="utf-8"?>
-<component size="1080,1920">
+<component size="800,1000">
   <displayList>
-    <loader id="n0_rqo4" name="loaBg" xy="390,373" size="50,50"/>
+    <image id="n5_hbio" name="n5" src="lwri5u" fileName="imagesExport/hc_kuang_6.png" pkg="mk0fwx0x" xy="0,0" size="800,1000"/>
+    <list id="n1_hbio" name="list" xy="0,0" size="800,1000" layout="flow_hz" overflow="scroll" defaultItem="ui://xz8kxrechbio1u">
+      <item/>
+      <item/>
+      <item/>
+      <item/>
+    </list>
   </displayList>
 </component>

+ 3 - 0
FGUIProject/assets/Studio/StudioFilingUI.xml

@@ -4,6 +4,9 @@
     <loader id="n0_rqo4" name="loaBg" xy="540,960" pivot="0.5,0.5" anchor="true" size="1080,2400" fill="scaleMatchWidth">
       <relation target="" sidePair="width-width,height-height,center-center,middle-middle"/>
     </loader>
+    <loader id="n22_hbio" name="loaNpc" xy="275,1604" pivot="0.5,1" anchor="true" size="631,1448" fill="scaleMatchHeight">
+      <relation target="" sidePair="center-center,bottom-bottom"/>
+    </loader>
     <component id="n21_rqo4" name="btnBack" src="9xlo8" fileName="components/ButtonBack1.xml" pkg="eg2y0ldp" xy="43,126">
       <Button icon="ui://eg2y0ldpsi5zti5"/>
     </component>

+ 8 - 0
FGUIProject/assets/Studio/components/ComNpcItemSelect.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="136,136">
+  <displayList>
+    <image id="n4_hbio" name="n4" src="kqhdt" fileName="images/gzsdi_2.png" xy="0,0">
+      <relation target="" sidePair="width-width,height-height"/>
+    </image>
+  </displayList>
+</component>

+ 7 - 0
FGUIProject/assets/Studio/components/ListNpcItem.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<component size="300,500">
+  <displayList>
+    <loader id="n2_hbio" name="loaIcon" xy="0,0" size="300,450" aspect="true" fill="scaleMatchHeight"/>
+    <text id="n3_hbio" name="txtName" xy="145,446" pivot="0.5,0" size="10,54" fontSize="40" text=""/>
+  </displayList>
+</component>

+ 2 - 0
FGUIProject/assets/Studio/package.xml

@@ -43,6 +43,8 @@
     <component id="rqo41r" name="CompFlower.xml" path="/components/"/>
     <image id="rqo41s" name="zx_jq_djtubiao_1.png" path="/images/"/>
     <component id="rqo41t" name="ListLevel.xml" path="/components/"/>
+    <component id="hbio1u" name="ListNpcItem.xml" path="/components/"/>
+    <component id="hbio1v" name="ComNpcItemSelect.xml" path="/components/" exported="true"/>
   </resources>
   <publish name="" path="..\GameClient\Assets\ResIn\UI\Studio" packageCount="2" genCode="true"/>
 </packageDescription>

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

@@ -41,10 +41,10 @@ namespace GFGGame
         //剧情战斗快速完成,展示奖励
         public const string STORY_FIGHT_QUICKLY_SUCCESS = "STORY_FIGHT_QUICKLY_SUCCESS";
 
+        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 FILLING_CHANGE_CHAPTER = "FILLING_CHANGE_CHAPTER";//查阅建档切换npc
 
-        public const string GET_STUDIO_INFO = "GET_STUDIO_INFO";
-        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_MAINSTORY_BOXBONUS_STATE = "NOTICE_MAINSTORY_BOXBONUS_STATE";
 

+ 74 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListNpcItem.cs

@@ -0,0 +1,74 @@
+/** This is an automatically generated class by FairyGUI. Please do not modify it. **/
+
+using FairyGUI;
+
+namespace UI.Studio
+{
+    public partial class UI_ListNpcItem
+    {
+        public GComponent target;
+        public GLoader m_loaIcon;
+        public GTextField m_txtName;
+        public const string URL = "ui://xz8kxrechbio1u";
+        public const string PACKAGE_NAME = "Studio";
+        public const string RES_NAME = "ListNpcItem";
+        private static UI_ListNpcItem _proxy;
+
+        public static UI_ListNpcItem Create(GObject gObject = null)
+        {
+            var ui = new UI_ListNpcItem();
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static UI_ListNpcItem Proxy(GObject gObject = null)
+        {
+            if(_proxy == null)
+            {
+                _proxy = new UI_ListNpcItem();
+            }
+            var ui = _proxy;
+            if(gObject == null)
+            	ui.target =  (GComponent)UIPackage.CreateObject(PACKAGE_NAME, RES_NAME);
+            else
+            	ui.target =  (GComponent)gObject;
+            ui.Init(ui.target);
+            return ui;
+        }
+
+        public static void ProxyEnd()
+        {
+            if (_proxy != null)
+            {
+                _proxy.Dispose();
+            }
+        }
+
+        public static void ClearProxy()
+        {
+            ProxyEnd();
+            _proxy = null;
+        }
+
+        private void Init(GComponent comp)
+        {
+            m_loaIcon = (GLoader)comp.GetChild("loaIcon");
+            m_txtName = (GTextField)comp.GetChild("txtName");
+        }
+        public void Dispose(bool disposeTarget = false)
+        {
+            m_loaIcon = null;
+            m_txtName = null;
+            if(disposeTarget && target != null)
+            {
+                target.RemoveFromParent();
+                target.Dispose();
+            }
+            target = null;
+        }
+    }
+}

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachOfItemView.cs.meta → GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_ListNpcItem.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 9ae0899dd57c83e41a94798a8178a890
+guid: 1a0321aed354c1c47af00480433d0bae
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 3 - 3
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_StudioFilingNpcUI.cs

@@ -7,7 +7,7 @@ namespace UI.Studio
     public partial class UI_StudioFilingNpcUI
     {
         public GComponent target;
-        public GLoader m_loaBg;
+        public GList m_list;
         public const string URL = "ui://xz8kxrecrqo41j";
         public const string PACKAGE_NAME = "Studio";
         public const string RES_NAME = "StudioFilingNpcUI";
@@ -55,11 +55,11 @@ namespace UI.Studio
 
         private void Init(GComponent comp)
         {
-            m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_list = (GList)comp.GetChild("list");
         }
         public void Dispose(bool disposeTarget = false)
         {
-            m_loaBg = null;
+            m_list = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 3 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Studio/UI_StudioFilingUI.cs

@@ -8,6 +8,7 @@ namespace UI.Studio
     {
         public GComponent target;
         public GLoader m_loaBg;
+        public GLoader m_loaNpc;
         public GButton m_btnBack;
         public GTextField m_txtTitle;
         public GButton m_btnChange;
@@ -66,6 +67,7 @@ namespace UI.Studio
         private void Init(GComponent comp)
         {
             m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_loaNpc = (GLoader)comp.GetChild("loaNpc");
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_txtTitle = (GTextField)comp.GetChild("txtTitle");
             m_btnChange = (GButton)comp.GetChild("btnChange");
@@ -80,6 +82,7 @@ namespace UI.Studio
         public void Dispose(bool disposeTarget = false)
         {
             m_loaBg = null;
+            m_loaNpc = null;
             m_btnBack = null;
             m_txtTitle = null;
             m_btnChange = null;

+ 0 - 312
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachOfItemView.cs

@@ -1,312 +0,0 @@
-using UI.CommonGame;
-using System.Collections.Generic;
-using FairyGUI;
-using System;
-
-namespace GFGGame
-{
-    /// <summary>
-    /// 获取途径
-    /// </summary>
-    public class ApproachOfItemView : BaseWindow
-    {
-        private UI_ApproachOfItemUI _ui;
-        private List<string[]> _approachDatas;
-        private int _itemId;
-        private object[] _fromeViewDatas;
-
-        protected override void OnInit()
-        {
-            base.OnInit();
-            _ui = UI_ApproachOfItemUI.Create();
-            this.viewCom = _ui.target;
-            this.viewCom.Center();
-            this.modal = true;
-            viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
-
-            _ui.m_listApproach.itemRenderer = ListApproachItemRenderer;
-            _ui.m_listApproach.onClickItem.Add(OnClickListApproachItem);
-
-        }
-
-        protected override void OnShown()
-        {
-            base.OnShown();
-            object[] temp = viewData as object[];
-            _itemId = (int)temp[0];
-            _fromeViewDatas = temp[1] as object[];
-
-            ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(_itemId);
-            _ui.m_txtName.text = itemCfg.name;
-            _ui.m_listApproach.RemoveChildrenToPool();
-            if (itemCfg.approach.Length > 0)
-            {
-                _ui.m_txtNone.visible = false;
-                string[] approachStrs = itemCfg.approach.Split(';');
-                _approachDatas = new List<string[]>();
-                foreach (string approachStr in approachStrs)
-                {
-                    if (approachStr.Length > 0)
-                    {
-                        string[] infos = approachStr.Split('=');
-                        _approachDatas.Add(infos);
-                    }
-                }
-                _ui.m_listApproach.numItems = _approachDatas.Count;
-                // _ui.m_listApproach.ResizeToFit();
-            }
-            else
-            {
-                _ui.m_txtNone.visible = true;
-                // _ui.m_listApproach.height = 162;
-            }
-            Timers.inst.AddUpdate(CheckGuide);
-        }
-
-        protected override void OnHide()
-        {
-            base.OnHide();
-            _fromeViewDatas = null;
-            Timers.inst.Remove(CheckGuide);
-
-        }
-
-        private void ListApproachItemRenderer(int index, GObject item)
-        {
-            UI_ButtonApproach listItem = UI_ButtonApproach.Proxy(item);
-            string[] infos = _approachDatas[index];
-            string functionId = infos[0];
-            GameFunctionCfg gameFunctionCfg = GameFunctionCfgArray.Instance.GetCfg(functionId);
-            if (functionId == ConstFunctionId.JU_QING_GUAN_QIA)
-            {
-                string value = infos[1];
-                var levelCfgId = int.Parse(value);
-                var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
-                if (levelCfg.type == ConstInstanceZonesType.Story)
-                {
-                    var chapterCfg = StoryChapterCfgArray.Instance.GetCfg(levelCfg.chapterId);
-                    string chapter = NumberUtil.GetChiniseNumberText(chapterCfg.order);
-                    string level = NumberUtil.GetChiniseNumberText(levelCfg.order);
-                    if (levelCfg.subType == ConstInstanceZonesSubType.Normal)
-                    {
-                        listItem.target.text = string.Format(gameFunctionCfg.name, chapter, level);
-                    }
-                    else if (levelCfg.subType == ConstInstanceZonesSubType.Hard)
-                    {
-                        listItem.target.text = string.Format("精英" + gameFunctionCfg.name, chapter, level);
-                    }
-                }
-                else if (levelCfg.type == ConstInstanceZonesType.Studio)
-                {
-                    var studioCfg = StudioCfgArray.Instance.GetCfg(levelCfg.chapterId);
-                    listItem.target.text = levelCfg.name;
-                }
-
-            }
-            else if (functionId == ConstFunctionId.FU_ZHUANG_DIAN)
-            {
-                int shopId = int.Parse(infos[1]);
-                if (shopId == ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID)
-                {
-                    listItem.target.text = "活动商店";
-                }
-                else if (shopId == ConstStoreId.LUCKY_BOX_STORE_ID)
-                {
-                    listItem.target.text = "落星商店";
-                }
-                else
-                {
-                    listItem.target.text = "服装店";
-                }
-            }
-            else
-            {
-                listItem.target.text = gameFunctionCfg.name;
-            }
-            listItem.target.data = infos;
-            UI_ButtonApproach.ProxyEnd();
-        }
-
-        private void OnClickListApproachItem(EventContext context)
-        {
-            GObject listItem = context.data as GObject;
-            string[] infos = listItem.data as string[];
-            string functionId = infos[0];
-            object[] temp = viewData as object[];
-            int hasNum = ItemDataManager.GetItemNum(_itemId);
-            int needCount = 0;
-            bool isJump = true;
-            switch (functionId)
-            {
-                case ConstFunctionId.FU_ZHUANG_DIAN:
-                    this.Hide();
-                    int count = temp.Length > 2 ? (int)temp[2] : 0;
-                    needCount = (count - hasNum) > 0 ? count - hasNum : 1;
-                    int shopId = int.Parse(infos[1]);
-                    if (shopId == ConstStoreId.LUCKY_BOX_ACTIVITY_STORE_ID)
-                    {
-                        PromptController.Instance.ShowFloatTextPrompt("活动暂未开启");
-                        break;
-                    }
-                    isJump = ViewManager.Show(ViewName.CLOTHING_SHOP_VIEW, new object[] { shopId, null, _itemId, needCount }, _fromeViewDatas, true, true);
-                    break;
-                case ConstFunctionId.FU_ZHUANG_DECOMPOSE:
-                    this.Hide();
-                    isJump = ViewManager.Show<ClothingDecomposeView>(null, _fromeViewDatas);
-                    break;
-                case ConstFunctionId.SHOP_GIFT_BAG:
-                    this.Hide();
-                    int giftBagValue = int.Parse(infos[1]);
-                    isJump = ViewManager.Show<RechargeStoreView>(giftBagValue, _fromeViewDatas);
-                    break;
-                case ConstFunctionId.SHOP_EXCHANGE:
-                    this.Hide();
-                    int exchangeValue = int.Parse(infos[1]);
-                    isJump = ViewManager.Show<RechargeStoreView>(exchangeValue, _fromeViewDatas);
-                    break;
-                case ConstFunctionId.JU_QING_GUAN_QIA:
-                    int needItemCount = temp.Length > 2 ? (int)temp[2] : 0;
-                    string value = infos[1];
-                    var levelCfgId = int.Parse(value);
-                    var levelCfg = StoryLevelCfgArray.Instance.GetCfg(levelCfgId);
-                    isJump = false;
-                    if (levelCfg.type == ConstInstanceZonesType.Story)
-                    {
-                        if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(ViewName.STORY_CHAPTER_VIEW))
-                        {
-                            break;
-                        }
-                        if (!MainStoryDataManager.CheckLevelUnlock(levelCfgId))
-                        {
-                            PromptController.Instance.ShowFloatTextPrompt("关卡未开启");
-                            break;
-                        }
-
-                        if ((string)_fromeViewDatas[0] == ViewName.DRESS_UP_FIGHT_VIEW)
-                        {
-                            //从战斗换装必需品来源跳转到剧情界面,在剧情界面点返回后直接返回章节界面,无需返回换装界面
-                            _fromeViewDatas = null;
-                        }
-                        isJump = ViewManager.Show(ViewName.STORY_CHAPTER_VIEW, levelCfg.chapterId, _fromeViewDatas, true);
-                        InstanceZonesController.ShowLevelView(levelCfgId, StudioDataManager.Instance.OnFinishStoryLevel, _itemId, needItemCount);
-                        break;
-                    }
-                    else if (levelCfg.type == ConstInstanceZonesType.Studio)
-                    {
-                        StudioCfg studioCfg = StudioCfgArray.Instance.GetCfg(levelCfg.chapterId);
-
-                        if (!FunctionOpenDataManager.Instance.CheckIsFunOpenById(studioCfg.funId))
-                        {
-                            break;
-                        }
-                        //TO DO
-                        List<StoryLevelCfg> storyLevelCfgs = StoryLevelCfgArray.Instance.GetCfgsBytypeAndsubTypeAndchapterId(studioCfg.type, studioCfg.subType, studioCfg.id);
-                        StudioDataManager.Instance.IsCanFight(levelCfg.id, out bool canFight, out string content);
-                        if (!canFight)
-                        {
-                            PromptController.Instance.ShowFloatTextPrompt("关卡未开启");
-                            break;
-                        }
-                        this.Hide();
-                        if (!TimeUtil.CheckDayOfWeek(studioCfg.timeArr))
-                        {
-                            PromptController.Instance.ShowFloatTextPrompt("不在活动周期内");
-                            break;
-                        }
-
-                        int type = studioCfg.funId == typeof(StudioPropertyView).Name ? 1 : 0;
-                        StudioDataManager.Instance.TYPE_SELECT_INDEX = type;
-                        StudioDataManager.Instance.PROPERTY_SELECT_INDEX = 0;
-                        if (studioCfg.funId == typeof(StudioPropertyView).Name)
-                        {
-                            List<StudioCfg> studioCfgs = StudioCfgArray.Instance.GetCfgsByfunId(typeof(StudioPropertyView).Name);
-                            for (int i = 0; i < studioCfgs.Count; i++)
-                            {
-                                if (studioCfgs[i].id == studioCfg.id)
-                                {
-                                    StudioDataManager.Instance.PROPERTY_SELECT_INDEX = i;
-                                    break;
-                                }
-                            }
-                        }
-                        string viewName = "GFGGame." + studioCfg.funId;
-
-                        ViewManager.Show(viewName, new object[] { type, 0 }, _fromeViewDatas);
-                        StudioDataManager.Instance.VIEW_NAME = viewName;
-                        InstanceZonesController.ShowLevelView(levelCfgId, StudioDataManager.Instance.OnFinishStoryLevel, _itemId, needItemCount);
-                        isJump = true;
-                        break;
-                    }
-                    // isJump = true;
-                    // StoryController.ShowLevelView(levelCfgId);
-                    // StoryController.ShowLevelView(levelCfgId);
-                    break;
-                case ConstFunctionId.FU_ZHUANG_HE_CHENG:
-
-                    isJump = false;
-                    int suitId = SuitCfgManager.Instance.GetItemSuitId(_itemId);
-                    if (suitId > 0)
-                    {
-                        this.Hide();
-                        isJump = ViewManager.Show(ViewName.CLOTHING_SYNTHETIC_VIEW, new object[] { suitId, _itemId }, _fromeViewDatas);
-
-                    }
-                    break;
-                case ConstFunctionId.ZHAI_XING:
-                    this.Hide();
-                    isJump = ViewManager.Show(ViewName.LUCKY_BOX_VIEW, null, _fromeViewDatas, true);
-                    break;
-                case ConstFunctionId.TAO_ZHUANG_TU_JIAN:
-                    isJump = false;
-                    if (ViewManager.isViewOpen(ViewName.SUIT_GUIDE_VIEW))
-                    {
-
-                        this.Hide();
-                        return;
-                    }
-                    this.Hide();
-                    isJump = ViewManager.Show(ViewName.SUIT_GUIDE_VIEW, null, _fromeViewDatas);
-
-                    break;
-                case ConstFunctionId.TAO_ZHUANG_HE_CHENG:
-                    this.Hide();
-                    isJump = ViewManager.Show(ViewName.SUIT_SYNTHETIC_LIST_VIEW);
-                    break;
-                case ConstFunctionId.SUIT_FOSTER:
-                    this.Hide();
-                    isJump = ViewManager.Show<ClothingListView>(null, _fromeViewDatas);
-                    break;
-            }
-            if (isJump)
-            {
-                EventAgent.DispatchEvent(ConstMessage.JUMP_TO_SOURCE);
-            }
-        }
-        private void CheckGuide(object param)
-        {
-            if (GuideDataManager.IsGuideFinish(ConstGuideId.BUY_CLOTHING) <= 0)
-            {
-                UpdateToCheckGuide(null);
-            }
-            else
-            {
-                Timers.inst.Remove(CheckGuide);
-            }
-        }
-        protected override void UpdateToCheckGuide(object param)
-        {
-            if (!ViewManager.CheckIsTopView(this.viewCom)) return;
-            if (_approachDatas == null) return;
-            int index = 0;
-            for (int i = 0; i < _approachDatas.Count; i++)
-            {
-                if (_approachDatas[i][0] == ConstFunctionId.FU_ZHUANG_DIAN)
-                {
-                    index = i;
-                    break;
-                }
-            }
-            GuideController.TryGuide(_ui.m_listApproach, ConstGuideId.BUY_CLOTHING, 4, "该物品可以在服装店购买,点开服装店看看。", index, true, (int)(this.viewCom.y + this.viewCom.height + 10));
-        }
-    }
-}

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

@@ -8,9 +8,15 @@ namespace GFGGame
     public class StudioFilingNpcView : BaseWindow
     {
         private UI_StudioFilingNpcUI _ui;
+        private GComponent _comSelect;
 
         public override void Dispose()
         {
+            if (_comSelect != null)
+            {
+                _comSelect.RemoveFromParent();
+                _comSelect.Dispose();
+            }
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -25,7 +31,17 @@ namespace GFGGame
             packageName = UI_StudioFilingNpcUI.PACKAGE_NAME;
             _ui = UI_StudioFilingNpcUI.Create();
             this.viewCom = _ui.target;
-            isfullScreen = true;
+            this.viewCom.Center();
+            this.modal = true;
+            viewAnimationType = EnumViewAnimationType.ZOOM_CENTER;
+
+            _comSelect = new GComponent();
+            _comSelect = UIPackage.CreateObject(UI_StudioFilingNpcUI.PACKAGE_NAME, "ComNpcItemSelect").asCom;
+            _comSelect.touchable = false;
+
+            _ui.m_list.itemRenderer = RenderListItem;
+            _ui.m_list.onClickItem.Add(OnListItemClick);
+
 
         }
         protected override void AddEventListener()
@@ -36,7 +52,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-
+            _ui.m_list.numItems = FilingCfgArray.Instance.dataArray.Length;
         }
 
         protected override void OnHide()
@@ -50,5 +66,40 @@ namespace GFGGame
             base.RemoveEventListener();
 
         }
+
+        private void RenderListItem(int index, GObject obj)
+        {
+            FilingCfg cfg = FilingCfgArray.Instance.dataArray[index];
+            UI_ListNpcItem item = UI_ListNpcItem.Proxy(obj);
+            bool isPass = InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
+            string res = isPass ? cfg.res : cfg.res1;
+            item.m_loaIcon.url = ResPathUtil.GetNpcPicSPath(res);
+            item.m_txtName.text = cfg.name;
+            item.target.data = cfg;
+            if (cfg.id == StudioDataManager.Instance.filingChapterId)
+            {
+                item.target.AddChild(_comSelect);
+            }
+            UI_ListNpcItem.ProxyEnd();
+        }
+        private void OnListItemClick(EventContext context)
+        {
+            GObject obj = context.data as GObject;
+            FilingCfg cfg = obj.data as FilingCfg;
+            bool isPass = InstanceZonesDataManager.CheckLevelPass(cfg.storyLevelId);
+            if (!isPass)
+            {
+                StoryLevelCfg storyLevelCfg = StoryLevelCfgArray.Instance.GetCfg(cfg.storyLevelId);
+                string showId = StoryUtil.GetChapterOrder(storyLevelCfg.chapterId) + "_" + storyLevelCfg.order;
+                PromptController.Instance.ShowFloatTextPrompt(string.Format("通关主线{0}解锁", showId));
+                return;
+            }
+            StudioDataManager.Instance.filingChapterId = cfg.id;
+            StorageSProxy.ReqSetClientValue(ConstStorageId.STUDIO_FILING_CHAPTERID, cfg.id).Coroutine();
+            EventAgent.DispatchEvent(ConstMessage.FILLING_CHANGE_CHAPTER);
+            UI_ListNpcItem item = UI_ListNpcItem.Proxy(obj);
+            item.target.AddChild(_comSelect);
+            UI_ListNpcItem.ProxyEnd();
+        }
     }
 }

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

@@ -46,6 +46,7 @@ namespace GFGGame
         {
             base.AddEventListener();
             EventAgent.AddEventListener(ConstMessage.STORY_LEVEL_CHANGE, UpdateView);
+            EventAgent.AddEventListener(ConstMessage.FILLING_CHANGE_CHAPTER, UpdateView);
         }
         protected override void OnShown()
         {
@@ -63,13 +64,16 @@ namespace GFGGame
         {
             base.RemoveEventListener();
             EventAgent.RemoveEventListener(ConstMessage.STORY_LEVEL_CHANGE, UpdateView);
+            EventAgent.RemoveEventListener(ConstMessage.FILLING_CHANGE_CHAPTER, UpdateView);
 
         }
 
         private void UpdateView()
         {
+
             _filingCfg = FilingCfgArray.Instance.GetCfg(StudioDataManager.Instance.filingChapterId);
             _ui.m_txtTitle.SetVar("name", _filingCfg.name).FlushVars();
+            _ui.m_loaNpc.url = ResPathUtil.GetNpcPicFPath(_filingCfg.res);
 
             SuitCfg suitCfg = SuitCfgArray.Instance.GetCfg(_filingCfg.suitId);
             _ui.m_txtSuitName.text = suitCfg.name;
@@ -108,7 +112,7 @@ namespace GFGGame
         }
         private void OnBtnChangeClick()
         {
-
+            ViewManager.Show<StudioFilingNpcView>();
         }
         private void OnBtnRewardClick()
         {

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


BIN
GameClient/Assets/ResIn/UI/Studio/Studio_fui.bytes