|
@@ -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;
|