فهرست منبع

修复卡牌故事跳转bug

leiyasi 1 سال پیش
والد
کامیت
e8684f66ec

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Data/VO/CardData.cs

@@ -36,5 +36,7 @@ namespace GFGGame
                 return ItemCfgArray.Instance.GetCfg(id);
             }
         }
+
+        public string fromUIType;
     }
 }

+ 9 - 12
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -239,23 +239,20 @@ namespace GFGGame
             _comFosterBottom = _ui.m_ComFosterBottom;
             _valueBarController.OnShown();
 
-            // old
-            if ((this.viewData as object[]) == null)
+            if (this.viewData != null)
             {
-                _cardData = CardDataManager.GetCardDataById((this.viewData as CardData).id);
-                _ui.m_ComFosterBottom.m_c_from.selectedIndex = (int)Source.COMMON;
-                _selectTab = 0;
-            }
-            // New
-            else
-            {
-                _cardData = CardDataManager.GetCardDataById((int)(this.viewData as object[])[0]);
-                string fromViewName = (string)((this.viewData as object[])[1]);
-                if (fromViewName.Equals(typeof(CardGuideView).FullName))
+                _cardData = (CardData)this.viewData;
+                if (_cardData.fromUIType != null && _cardData.fromUIType.Equals(typeof(CardGuideView).FullName))
                 {
                     _ui.m_ComFosterBottom.m_c_from.selectedIndex = (int)Source.DISPLAY;
                     _selectTab = 2; // 默认选中技能tab
                 }
+                else
+                {
+                    _ui.m_ComFosterBottom.m_c_from.selectedIndex = (int)Source.COMMON;
+                    _selectTab = 0;
+                }
+
             }
 
             _ui.m_ComFosterTop.m_c1.selectedIndex = _ui.m_ComFosterBottom.m_c_from.selectedIndex;

+ 3 - 1
GameClient/Assets/Game/HotUpdate/Views/FieldGuide/CardGuideView.cs

@@ -133,7 +133,9 @@ namespace GFGGame
             }
             else
             {
-                ViewManager.Show<CardFosterView>(new object[] { _cardList[index], typeof(CardGuideView).FullName}, new object[] { typeof(CardGuideView).FullName, _ui.m_listRole.selectedIndex });
+                CardData cardData = CardDataManager.GetCardDataById(_cardList[index]);
+                cardData.fromUIType = typeof(CardGuideView).FullName;
+                ViewManager.Show<CardFosterView>(cardData, new object[] { typeof(CardGuideView).FullName, _ui.m_listRole.selectedIndex });
             }   
         }
 

+ 1 - 8
GameClient/Assets/Game/HotUpdate/Views/MainStory/TypingFadeEffectPro.cs

@@ -220,17 +220,10 @@ namespace GFGGame
                     {
                         UpdateFadeProgressSingle(_printIndex, _vertIndex);
                         ++_printIndex;
-                        if(_printIndex == listCnt - 1)
-                        {
-                            Cancel();
-                            typeFinishedAction.Invoke();
-                            break;
-                        }
-                        else
+                        if(_printIndex < listCnt - 1)
                         {
                             _vertIndex += charPositions[_printIndex].vertCount;
                         }
-                        
                     }
                 }
                 timer += Time.deltaTime;