浏览代码

神都宸游增加物品跳转路径

huangxiaoyue 1 年之前
父节点
当前提交
c8a3caa638

+ 29 - 2
GameClient/Assets/Editor/Excel/Scanner/ItemApproachScanner.cs

@@ -18,7 +18,7 @@ namespace GFGEditor
         public static void startScan()
         {
             ItemCfg[] dataArray = ItemCfgArray.Instance.dataArray;
-            GetApproachCall[] actions = new GetApproachCall[] { GetClothingShopApproach, GetLeaguePrayApproach, GetLeagueAnswerApproach, CheckStoreApproach, GetClothingSyntheticApproach, GetSuitGuideApproach, GetSuitSyntheticApproach, GetClothingDecomposeApproach, CheckClothingFosterApproach, CheckDailyTaskApproach, CheckWeeklyTaskApproach, GetZhaiXingApproach, GetStoryLevelApproach, GetArenaApproach  };
+            GetApproachCall[] actions = new GetApproachCall[] { GetClothingShopApproach, GetLeaguePrayApproach, GetLeagueAnswerApproach, CheckStoreApproach, GetClothingSyntheticApproach, GetSuitGuideApproach, GetSuitSyntheticApproach, GetClothingDecomposeApproach, CheckClothingFosterApproach, CheckDailyTaskApproach, CheckWeeklyTaskApproach, GetZhaiXingApproach, GetStoryLevelApproach, GetArenaApproach,GetHeavenApproach ,GetOpenServerFightApproach };
             Dictionary<SuitCfg, List<int>> suitDic = new Dictionary<SuitCfg, List<int>>();
             Dictionary<ItemCfg, List<int>> syntheticSuitDic = new Dictionary<ItemCfg, List<int>>();
             Dictionary<SuitCfg, Dictionary<string, string>> suitTagsDic = new Dictionary<SuitCfg, Dictionary<string, string>>();
@@ -378,7 +378,34 @@ namespace GFGEditor
             }
             return null;
         }
-            
+
+        /// <summary>
+        /// 尝试获取天堂产出途径
+        /// </summary>
+        /// <param name="itemId"></param>
+        /// <returns></returns>
+        private static string GetHeavenApproach(int itemId)
+        {
+            if (itemId == ConstItemID.GET_TICKETS)
+            {
+                return "HEAVEN_SMALL_GAMW";
+            }
+            return null;
+        }
+
+        /// <summary>
+        /// 尝试获取明堂产出途径
+        /// </summary>
+        /// <param name="itemId"></param>
+        /// <returns></returns>
+        private static string GetOpenServerFightApproach(int itemId)
+        {
+            if (itemId == ConstItemID.PAIR_CARD)
+            {
+                return "OPEN_SERVER_FIGHT";
+            }
+            return null;
+        }
 
         /// <summary>
         /// 尝试获取剧情关卡产出途径

+ 8 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstFunctionId.cs

@@ -105,5 +105,13 @@ namespace GFGGame
         ///技能书
         /// </summary>
         public const string SKILLBOOK = "SKILLBOOK";
+        /// <summary>
+        ///天堂
+        /// </summary>
+        public const string  HEAVEN_SMALL_GAMW = "HEAVEN_SMALL_GAMW";
+        /// <summary>
+        ///新年筹备
+        /// </summary>
+        public const string OPEN_SERVER_FIGHT = "OPEN_SERVER_FIGHT";
     }
 }

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

@@ -8,6 +8,7 @@ namespace UI.OpenServerActivity
     {
         public GComponent target;
         public GLoader m_loaBg;
+        public GComponent m_valueBar;
         public GButton m_btnBack;
         public GList m_list;
         public const string URL = "ui://b8ha2mnspll2g";
@@ -58,12 +59,14 @@ namespace UI.OpenServerActivity
         private void Init(GComponent comp)
         {
             m_loaBg = (GLoader)comp.GetChild("loaBg");
+            m_valueBar = (GComponent)comp.GetChild("valueBar");
             m_btnBack = (GButton)comp.GetChild("btnBack");
             m_list = (GList)comp.GetChild("list");
         }
         public void Dispose(bool disposeTarget = false)
         {
             m_loaBg = null;
+            m_valueBar = null;
             m_btnBack = null;
             m_list = null;
             if(disposeTarget && target != null)

+ 6 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/ApproachView.cs

@@ -363,6 +363,12 @@ namespace GFGGame
                 case ConstFunctionId.SKILLBOOK:
                     ViewManager.Show<ExchangeGoodsView>(_itemId);
                     break;
+                case ConstFunctionId.HEAVEN_SMALL_GAMW:
+                    ViewManager.Show<GameStartView>();
+                    break;
+                case ConstFunctionId.OPEN_SERVER_FIGHT:
+                    ViewManager.Show<OpenServerFightView>(ConstLimitTimeActivityType.ActLimitStlyc);
+                    break;
             }
             if (isJump)
             {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerFightView.cs

@@ -36,7 +36,7 @@ namespace GFGGame
             base.OnInit();
             packageName = UI_OpenServerFightUI.PACKAGE_NAME;
             _ui = UI_OpenServerFightUI.Create();
-            viewCom = _ui.target;
+            this.viewCom = _ui.target;
             isfullScreen = true;
             isReturnView = true;
             _ui.m_list.itemRenderer = RenderListItem;

+ 12 - 0
GameClient/Assets/Game/HotUpdate/Views/OpenServerActivity/OpenServerStoryView.cs

@@ -13,9 +13,16 @@ namespace GFGGame
         private int _activityId;
         private int _activityType;
         private ActivityOpenCfg _activityCfg;
+        private ValueBarController _valueBarController;
 
         public override void Dispose()
         {
+            if (_valueBarController != null)
+            {
+                _valueBarController.Dispose();
+                _valueBarController = null;
+            }
+
             if (_ui != null)
             {
                 _ui.Dispose();
@@ -38,6 +45,8 @@ namespace GFGGame
             isfullScreen = true;
             isReturnView = true;
 
+            _valueBarController = new ValueBarController(_ui.m_valueBar);
+
             _ui.m_btnBack.onClick.Add(OnClickBtnBack);
             _ui.m_list.itemRenderer = RenderListItem;
         }
@@ -50,6 +59,8 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            _valueBarController.OnShown();
+            _valueBarController.UpdateList(new List<int>() {  ConstItemID.GET_TICKETS });
             _activityType = (int)this.viewData;
             StudioDataManager.Instance.VIEW_NAME = typeof(OpenServerStoryView).FullName;
             StudioDataManager.Instance.PROPERTY_SELECT_INDEX = _activityType;
@@ -63,6 +74,7 @@ namespace GFGGame
         protected override void OnHide()
         {
             base.OnHide();
+            _valueBarController.OnHide();
         }
 
         protected override void RemoveEventListener()

二进制
GameClient/Assets/ResIn/UI/OpenServerActivity/OpenServerActivity_fui.bytes