Browse Source

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

hexiaojie 1 year ago
parent
commit
b71820f9f8

+ 21 - 0
GameClient/Assets/Game/HotUpdate/Data/MainStoryDataManager.cs

@@ -109,6 +109,27 @@ namespace GFGGame
             }
             return true;
         }
+        public static int CheckChapterPassIndex(int subtype)
+        {
+            int count = 2;
+            List<StoryChapterCfg> chapList = StoryChapterCfgArray.Instance.GetCfgsBysubType(subtype);
+            foreach (StoryChapterCfg item in chapList)
+            {
+                var preChapterCfg = StoryChapterCfgArray.Instance.GetCfg(item.id);
+                if (preChapterCfg != null)
+                {
+                    if(InstanceZonesDataManager.CheckChapterPass(preChapterCfg.type, preChapterCfg.subType, preChapterCfg.id, preChapterCfg.levelCount))
+                    {
+                        count++;
+                    }
+                }
+            }
+            if(count> chapList.Count)
+            {
+                count = chapList.Count;
+            }
+            return count;
+        }
 
         public static bool CheckChapterUnlock(int chapterId, bool checkRoleLv = true)
         {

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/ClothingUpgrade/UI_ClothingUpgradeUI.cs

@@ -14,7 +14,9 @@ namespace UI.ClothingUpgrade
         public GComponent m_item1;
         public GComponent m_item2;
         public GTextField m_desc1Text;
+        public GTextField m_desc2;
         public GTextField m_desc2Text;
+        public GTextField m_desc3;
         public GTextField m_desc3Text;
         public GButton m_upgradeBtn;
         public GButton m_levelUpBtn;
@@ -75,7 +77,9 @@ namespace UI.ClothingUpgrade
             m_item1 = (GComponent)comp.GetChild("item1");
             m_item2 = (GComponent)comp.GetChild("item2");
             m_desc1Text = (GTextField)comp.GetChild("desc1Text");
+            m_desc2 = (GTextField)comp.GetChild("desc2");
             m_desc2Text = (GTextField)comp.GetChild("desc2Text");
+            m_desc3 = (GTextField)comp.GetChild("desc3");
             m_desc3Text = (GTextField)comp.GetChild("desc3Text");
             m_upgradeBtn = (GButton)comp.GetChild("upgradeBtn");
             m_levelUpBtn = (GButton)comp.GetChild("levelUpBtn");
@@ -92,7 +96,9 @@ namespace UI.ClothingUpgrade
             m_item1 = null;
             m_item2 = null;
             m_desc1Text = null;
+            m_desc2 = null;
             m_desc2Text = null;
+            m_desc3 = null;
             m_desc3Text = null;
             m_upgradeBtn = null;
             m_levelUpBtn = null;

+ 6 - 0
GameClient/Assets/Game/HotUpdate/FairyGUI/GenCode/Main/UI_ListCardFightItem.cs

@@ -18,6 +18,8 @@ namespace UI.Main
         public UI_ComDodgeFightStar m_dodgeStar1;
         public UI_ComDodgeFightStar m_dodgeStar2;
         public UI_ComDodgeFightStar m_dodgeStar3;
+        public GGraph m_effect;
+        public Transition m_t0;
         public const string URL = "ui://mfvz4q8kr1a99f";
         public const string PACKAGE_NAME = "Main";
         public const string RES_NAME = "ListCardFightItem";
@@ -76,6 +78,8 @@ namespace UI.Main
             m_dodgeStar1 = (UI_ComDodgeFightStar)UI_ComDodgeFightStar.Create(comp.GetChild("dodgeStar1"));
             m_dodgeStar2 = (UI_ComDodgeFightStar)UI_ComDodgeFightStar.Create(comp.GetChild("dodgeStar2"));
             m_dodgeStar3 = (UI_ComDodgeFightStar)UI_ComDodgeFightStar.Create(comp.GetChild("dodgeStar3"));
+            m_effect = (GGraph)comp.GetChild("effect");
+            m_t0 = comp.GetTransition("t0");
         }
         public void Dispose(bool disposeTarget = false)
         {
@@ -95,6 +99,8 @@ namespace UI.Main
             m_dodgeStar2 = null;
             m_dodgeStar3.Dispose();
             m_dodgeStar3 = null;
+            m_effect = null;
+            m_t0 = null;
             if(disposeTarget && target != null)
             {
                 target.RemoveFromParent();

+ 4 - 2
GameClient/Assets/Game/HotUpdate/Views/ClothingUpgarde/ClothingAnsweringView.cs

@@ -106,10 +106,12 @@ namespace GFGGame
                 else
                 {
                     UpdateQuestion();
-                }  
+                }
+                PromptController.Instance.ShowFloatTextPrompt("回答正确!");
             }
             else
-            {  
+            {
+                PromptController.Instance.ShowFloatTextPrompt("回答错误!");
                 item.m_c1.selectedIndex = 0;  
             }
             UI_Button123.ProxyEnd();

+ 10 - 0
GameClient/Assets/Game/HotUpdate/Views/ClothingUpgarde/ClothingSelectView.cs

@@ -46,6 +46,11 @@ namespace GFGGame
             _effectUI1 = EffectUIPool.CreateEffectUI(_ui.m_bgEffect, "ui_gyp", "GYP_ALL");
             _effectUI2 = EffectUIPool.CreateEffectUI(_ui.m_birdEffect, "ui_gyp", "GYP_Bird");
         }
+        protected override void AddEventListener()
+        {
+            base.AddEventListener();
+            EventAgent.AddEventListener(ConstMessage.COLLEGE_UPGRADE, UpdateList);
+        }
 
         protected override void OnShown()
         {
@@ -54,6 +59,11 @@ namespace GFGGame
             UpdateList();
         }
 
+        protected override void RemoveEventListener()
+        {
+            base.RemoveEventListener();
+            EventAgent.RemoveEventListener(ConstMessage.COLLEGE_UPGRADE, UpdateList);
+        }
         protected override void OnHide()
         {
             base.OnHide();

+ 22 - 14
GameClient/Assets/Game/HotUpdate/Views/ClothingUpgarde/ClothingUpgradeView.cs

@@ -83,7 +83,7 @@ namespace GFGGame
             if (levelNum > 0)
             {
                 //当前数据
-                collegegBoostCfg = CollegeBoostCfgArray.Instance.GetCfgBytypePartsAndtypePhaseAndlayer(partIndexCommon, level, levelNum);
+                collegegBoostCfg = CollegeBoostCfgArray.Instance.GetCfgBytypePartsAndtypePhaseAndlayer(_partIndex, level, levelNum);
                 AddNum = (float)collegegBoostCfg.value / CollectPartDataManager.Instance.AddtitionRatio;
                 //下一级数据
                 levelNum = CollectPartDataManager.Instance.CollectPartDataDic[_partIndex][1];
@@ -110,7 +110,7 @@ namespace GFGGame
                 nextPartData.LevelNum = levelNum + 1;
                 status = 1;
             }
-            collegeBoostNextCfg = CollegeBoostCfgArray.Instance.GetCfgBytypePartsAndtypePhaseAndlayer(partIndexCommon, nextPartData.LevelID, nextPartData.LevelNum);
+            collegeBoostNextCfg = CollegeBoostCfgArray.Instance.GetCfgBytypePartsAndtypePhaseAndlayer(_partIndex, nextPartData.LevelID, nextPartData.LevelNum);
             if(collegeBoostNextCfg == null || collegeBoostNextCfg.value == 0)
             {
                 nextPartData.AddNum = 0;
@@ -129,8 +129,10 @@ namespace GFGGame
             string name = CollegeRankCfgArray.Instance.GetCfgByRankPartsIdAndSecondLevelRank(partIndexCommon, level).gradeName;
             string partName = CollectPartDataManager.Instance.partNameDic[_partIndex];
             _ui.m_desc1Text.text = string.Format("{0}{1}级", name,levelNum);
-            _ui.m_desc2Text.text = string.Format("当  前:{0}基础属性+{1}%", partName, AddNum.ToString());
-            _ui.m_desc3Text.text = string.Format("下一级:{0}基础属性+{1}%", partName, nextPartData.AddNum);
+            _ui.m_desc2.text = string.Format("当  前:{0}", partName);
+            _ui.m_desc2Text.text = string.Format("基础属性+{0}%", AddNum.ToString());
+            _ui.m_desc3.text = string.Format("下一级:{0}", partName);
+            _ui.m_desc3Text.text = string.Format("基础属性+{0}%", nextPartData.AddNum);
             if(status != 3)
             {
                 _ui.m_c2.selectedIndex = collegeBoostNextCfg.consumeArr.Length;  
@@ -141,7 +143,12 @@ namespace GFGGame
                     int count = collegeBoostNextCfg.consumeArr[i][1];
                     ItemData itemDate = ItemUtil.createItemData(id, count);
                     ItemView itemView = new ItemView(item.target);
-                    itemView.SetData(itemDate);
+                    itemView.SetData(itemDate); 
+                    if(item.target.data == null)
+                    {
+                        item.target.onClick.Add(OnClickListDressUpItem);
+                    }
+                    item.target.data = id;
                     UI_ComItem000.ProxyEnd();
                 }
             }
@@ -151,7 +158,7 @@ namespace GFGGame
             if (_partIndex != 99)
             {
                 maxRank = CollectPartDataManager.Instance.MaxNormalRank;
-                partIndexCommon = _partIndex;
+                partIndexCommon = 0;
             }
             else
             {
@@ -164,20 +171,21 @@ namespace GFGGame
                 itemList.Add(item);
             }
         }
+        private void OnClickListDressUpItem(EventContext eventContext)
+        {
+            int id = (int)(eventContext.sender as GObject).data;
+
+            object[] goBackDatas = ViewManager.GetGoBackDatas(typeof(ClothingUpgradeView).Name);
+            object[] sourceDatas = new object[] { id, goBackDatas, 1 };
+            GoodsItemTipsController.ShowItemTips(id, sourceDatas);
+        }
         private async void OnClickUpgrade()
         {
             var result = await CollegeSProxy.ReqCollectUpgrade(nextPartData.PartID, nextPartData.LevelID,nextPartData.LevelNum);
         }
         private void LevelUpSuccessTip()
         {
-            string exitTip = "恭喜!升级成功!";
-            AlertUI.Show(exitTip)
-            .SetLeftButton(false, "取消", (object data) =>
-            {
-            })
-            .SetRightButton(true, "确定", (object data) =>
-            {
-            });
+            PromptController.Instance.ShowFloatTextPrompt("升级成功!");
         }
         private void OnClickLevelUp()
         {

+ 12 - 0
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryCardChoose.cs

@@ -22,6 +22,7 @@ namespace GFGGame
 
         private EffectUI _effectUI1;
         private EffectUI _effectUI2;
+        private EffectUI _effectUI3;
 
         public override void Dispose()
         {
@@ -29,6 +30,8 @@ namespace GFGGame
             _effectUI1 = null;
             EffectUIPool.Recycle(_effectUI2);
             _effectUI2 = null;
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
 
             //EffectUIPool.Recycle(_effectUI3);
             //_effectUI3 = null;
@@ -241,9 +244,18 @@ namespace GFGGame
 
         private void OnListCardItemClick(EventContext context)
         {
+            GObject obj = context.data as GObject;
+            UI_ListCardFightItem item = UI_ListCardFightItem.Proxy(obj);
+            item.m_t0.Play();
+
+            EffectUIPool.Recycle(_effectUI3);
+            _effectUI3 = null;
+            _effectUI3 = EffectUIPool.CreateEffectUI(item.m_effect, "ui_KP", "KP_Select");
+
             UpdateView(_ui.m_listCard.selectedIndex);
 
             OnCardSelected(cardList[_ui.m_listCard.selectedIndex].id);
+
         }
 
         private void OnCardSelected(int cardId)

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


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