Browse Source

Merge branch 'master' of http://10.108.64.190:3000/gfg/client

guodong 1 year ago
parent
commit
58c6af6550

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

+ 1 - 2
GameClient/Assets/Game/HotUpdate/ServerProxy/NewYearRedEnvelopeSproxy.cs

@@ -76,10 +76,9 @@ namespace GFGGame
                     ItemCfg itemCfg = ItemCfgArray.Instance.GetCfg(NewYearRedEnvelopeDataManager.ItemId);
                     if (!AntiAddictionController.CheckAntiAddictionRecharge(1))
                     {
-                        NewYearRedEnvelopeDataManager.Status = 2;
                         ActivityOpenCfg activityOpenCfg = ActivityOpenCfgArray.Instance.GetCfg(activityId);
                         ShopSProxy.ReqShopBuy(activityOpenCfg.paramsArr[0], 1).Coroutine();
-                        LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
+                        //LogServerHelper.SendPlayParticipationLog((int)PlayParticipationEnum.SHANG_CHENG, 2);
                     }
                     return true;
                 }

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Views/Common/Controller/ValueBarController.cs

@@ -224,6 +224,7 @@ namespace GFGGame
                 case ConstItemID.ARENA_PAST_COST:
                 case ConstItemID.LUCKYBOX_ACTIVITY_STORE_COST_2:
                 case ConstItemID.OPEN_SERVER_COST_1:
+                case ConstItemID.GET_TICKETS:
                     button.m_imgAdd.visible = true;
                     break;
                 default:

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

+ 3 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryDialogView.cs

@@ -177,6 +177,9 @@ namespace GFGGame
 
             _ui.m_btnAutoPlay.selected = _autoPlay;
             _ui.m_btnBack.visible = InstanceZonesDataManager.CheckLevelPass(100001001);
+            if (_storyStartID == "10151")
+                _ui.m_btnBack.visible = false;
+
             StoryDialogDataManager.Instance.Clear();
 
             InitStepListById(_storyStartID);

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -382,7 +382,6 @@ namespace GFGGame
             var titleIndex = PlayerPrefs.GetString("seeOpenServerActivityStory" + GameGlobal.userId);
             if (titleIndex == null || titleIndex == "")
             {
-                PlayerPrefs.SetString("seeOpenServerActivityStory"+ GameGlobal.userId, "1");
                 ViewManager.Show<StoryDialogView>(new object[] { "10151", false, new OnCompleteStoryDialogCall(OnCompletePriorStoryDialog), null, false }, true);
             }
             else
@@ -391,6 +390,7 @@ namespace GFGGame
 
         private static void OnCompletePriorStoryDialog(bool isSkip, object param)
         {
+            PlayerPrefs.SetString("seeOpenServerActivityStory" + GameGlobal.userId, "1");
             ViewManager.DeleteViewStackCountDown(null, 1);
             ViewManager.Show<OpenServerActivityView>();
         }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MiniGame/GameStartView.cs

@@ -87,7 +87,7 @@ namespace GFGGame
         protected override void RemoveEventListener()
         {
             base.RemoveEventListener();
-            EventAgent.AddEventListener(ConstMessage.MINI_GAME_UPDATE, UpdateRed);
+            EventAgent.RemoveEventListener(ConstMessage.MINI_GAME_UPDATE, UpdateRed);
         }
         protected override void OnHide()
         {

+ 10 - 4
GameClient/Assets/Game/HotUpdate/Views/NewYearRedEnvelope/NewYearRedEnvelopeView.cs

@@ -71,13 +71,19 @@ namespace GFGGame
         protected override void AddEventListener()
         {
             base.AddEventListener();
-            EventAgent.AddEventListener(ConstMessage.NEW_YEAR_RED_ENVELOPE_INFO, RefreshViewInfo);
+            EventAgent.AddEventListener(ConstMessage.NEW_YEAR_RED_ENVELOPE_INFO, RefreshBuySuccess);
         }
 
         protected override void RemoveEventListener()
         {
             base.RemoveEventListener();
-            EventAgent.RemoveEventListener(ConstMessage.NEW_YEAR_RED_ENVELOPE_INFO, RefreshViewInfo);
+            EventAgent.RemoveEventListener(ConstMessage.NEW_YEAR_RED_ENVELOPE_INFO, RefreshBuySuccess);
+        }
+
+        private void RefreshBuySuccess()
+        {
+            RefreshOpenView();
+            RefreshViewInfo();
         }
 
         private void RefreshViewInfo()
@@ -129,8 +135,8 @@ namespace GFGGame
             bool result = await NewYearRedEnvelopeSProxy.ReqDoubleRedPacket(actRedPacketId);
             if (result)
             {
-                RefreshOpenView();
-                RefreshViewInfo();
+                //RefreshOpenView();
+                //RefreshViewInfo();
             }
         }
 

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

BIN
GameClient/Assets/ResIn/UI/OpenServerActivity/OpenServerActivity_fui.bytes