|
@@ -20,6 +20,7 @@ namespace GFGGame
|
|
|
private UI_ComCost _comLvConsumeGold;
|
|
|
private UI_ComCostCurrencyWithHas _comStarCousumeGold;
|
|
|
private CardData _cardData = new CardData();
|
|
|
+ private List<CardStarCfg> _cardStarRewards = new List<CardStarCfg>();
|
|
|
private int _selectTab = 0;
|
|
|
private List<LongPressGesture> _listLongPress = new List<LongPressGesture>();
|
|
|
private GameObject _cardObj;
|
|
@@ -134,6 +135,15 @@ namespace GFGGame
|
|
|
_comFosterBottom.m_ctrlTab.selectedIndex = this._selectTab;
|
|
|
RedDotController.Instance.SetComRedDot(_ui.m_ComFosterBottom.m_btnSkill, RedDotDataManager.Instance.GetCardSkillsRed(_cardData.id));
|
|
|
|
|
|
+ List<CardStarCfg> cardStarCfgs = CardStarCfgArray.Instance.GetCfgsBycardId(_cardData.id);
|
|
|
+ for (int i = 0; i < cardStarCfgs.Count; i++)
|
|
|
+ {
|
|
|
+ if (cardStarCfgs[i].rewardsArr.Length > 0)
|
|
|
+ {
|
|
|
+ _cardStarRewards.Add(cardStarCfgs[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ _ui.m_ComFosterTop.m_btnStarReward.visible = _cardStarRewards.Count > 0;
|
|
|
Timers.inst.AddUpdate(CheckGuide);
|
|
|
}
|
|
|
protected override void AddEventListener()
|
|
@@ -535,7 +545,7 @@ namespace GFGGame
|
|
|
private bool IsUpLvLimit(bool showTips = true)
|
|
|
{
|
|
|
int lvLimit = RoleLevelCfgArray.Instance.GetCfg(RoleDataManager.lvl).cardLeverLimit;
|
|
|
- if (_showLv >= lvLimit)
|
|
|
+ if (_showLv > lvLimit)
|
|
|
{
|
|
|
if (!showTips) return true;
|
|
|
|
|
@@ -564,12 +574,25 @@ namespace GFGGame
|
|
|
private void UpdateUpStarView()
|
|
|
{
|
|
|
CardStarCfg cardStarCfg = CardStarCfgArray.Instance.GetCfgBycardIdAndstarLvl(_cardData.id, _cardData.star);
|
|
|
- _ui.m_ComFosterTop.m_btnStarReward.visible = cardStarCfg.rewardsArr.Length > 0;
|
|
|
if (cardStarCfg == null)
|
|
|
{
|
|
|
ET.Log.Error("卡牌:" + _cardData.id + " 无" + _cardData.star + "星升星配置");
|
|
|
return;
|
|
|
}
|
|
|
+ int index = 1;
|
|
|
+ for (int i = 0; i < 4; i++)
|
|
|
+ {
|
|
|
+ UI_ComStarItem comStarItem = UI_ComStarItem.Proxy(_comFosterBottom.target.GetChild("comStarItem" + i));
|
|
|
+ string starDesc = "";
|
|
|
+ for (int j = 0; j < _cardData.itemCfg.starDescArr[i].Length; j++)
|
|
|
+ {
|
|
|
+ char str = _cardData.itemCfg.starDescArr[i][j];
|
|
|
+ starDesc += index <= _cardData.star ? StringUtil.GetColorText(str.ToString(), "#D07D40") : StringUtil.GetColorText(str.ToString(), "#716660");
|
|
|
+ index++;
|
|
|
+ }
|
|
|
+ comStarItem.m_txtContent.text = starDesc;
|
|
|
+ UI_ComStarItem.ProxyEnd();
|
|
|
+ }
|
|
|
if (CardDataManager.isFullStar(_cardData.id, _cardData.star, false))
|
|
|
{
|
|
|
_comFosterBottom.m_ctrlFullStar.selectedIndex = 1;
|
|
@@ -582,20 +605,7 @@ namespace GFGGame
|
|
|
{
|
|
|
_comFosterBottom.m_ctrlFullStar.selectedIndex = 0;
|
|
|
// List<CardStarCfg> starCfgs = CardStarCfgArray.Instance.GetCfgsBycardId(_cardData.id);
|
|
|
- int index = 1;
|
|
|
- for (int i = 0; i < 4; i++)
|
|
|
- {
|
|
|
- UI_ComStarItem comStarItem = UI_ComStarItem.Proxy(_comFosterBottom.target.GetChild("comStarItem" + i));
|
|
|
- string starDesc = "";
|
|
|
- for (int j = 0; j < _cardData.itemCfg.starDescArr[i].Length; j++)
|
|
|
- {
|
|
|
- char str = _cardData.itemCfg.starDescArr[i][j];
|
|
|
- starDesc += index <= _cardData.star ? StringUtil.GetColorText(str.ToString(), "#D07D40") : StringUtil.GetColorText(str.ToString(), "#716660");
|
|
|
- index++;
|
|
|
- }
|
|
|
- comStarItem.m_txtContent.text = starDesc;
|
|
|
- UI_ComStarItem.ProxyEnd();
|
|
|
- }
|
|
|
+
|
|
|
_comFosterBottom.m_btnUpStar.data = 0;//data 0:可以升级,1:材料不足
|
|
|
|
|
|
ItemUtil.UpdateItemNeedNum(_comFosterBottom.m_comStarCousumeGold, cardStarCfg.costID, cardStarCfg.costNum);
|
|
@@ -603,6 +613,7 @@ namespace GFGGame
|
|
|
_comFosterBottom.m_listStarConsume.data = cardStarCfg;
|
|
|
_comFosterBottom.m_listStarConsume.numItems = cardStarCfg.materiarsArr.Length;
|
|
|
_comFosterBottom.m_txtTips.text = _cardData.lv < cardStarCfg.needLv ? string.Format("需等级达到{0}级", cardStarCfg.needLv) : "";
|
|
|
+ _comFosterBottom.m_comStarCousumeGold.visible = _cardData.lv >= cardStarCfg.needLv;
|
|
|
_comFosterBottom.m_btnUpStar.grayed = int.Parse(_comFosterBottom.m_btnUpStar.data.ToString()) == 1 ? true : false;
|
|
|
// _comFosterBottom.m_btnUpStar.GetChild("ani").asMovieClip.visible = false;// !_comFosterBottom.m_btnUpStar.grayed;
|
|
|
|
|
@@ -622,7 +633,7 @@ namespace GFGGame
|
|
|
int needCount = cardStarCfg.materiarsArr[index][1];
|
|
|
long hasCount = ItemDataManager.GetItemNum(cardStarCfg.materiarsArr[index][0]);
|
|
|
listItem.m_txtNeedCount.text = needCount.ToString();// StringUtil.GetColorText(needCount.ToString(), hasCount < needCount ? "#D27869" : "#FDF3D7"); ;
|
|
|
- listItem.m_txtHasCount.text = StringUtil.GetColorText(hasCount.ToString(), hasCount < needCount ? "#D27869" : "#FDF3D7"); //; hasCount.ToString();
|
|
|
+ listItem.m_txtHasCount.text = StringUtil.GetColorText(hasCount.ToString(), hasCount < needCount ? "#D27869" : "#716660"); //; hasCount.ToString();
|
|
|
listItem.m_btnPlus.visible = false;
|
|
|
if (listItem.target.data == null)
|
|
|
{
|
|
@@ -680,7 +691,7 @@ namespace GFGGame
|
|
|
|
|
|
if (_cardData.lv < cardStarCfg.needLv)
|
|
|
{
|
|
|
- PromptController.Instance.ShowFloatTextPrompt("等级不足");
|
|
|
+ PromptController.Instance.ShowFloatTextPrompt("卡牌等级不足");
|
|
|
return;
|
|
|
}
|
|
|
if (CardDataManager.isFullStar(_cardData.id, _cardData.star) == true)
|
|
@@ -879,7 +890,7 @@ namespace GFGGame
|
|
|
}
|
|
|
private void OnBtnStarRewardClick()
|
|
|
{
|
|
|
- ViewManager.Show<CardStarRewardView>(_cardData);
|
|
|
+ ViewManager.Show<CardStarRewardView>(_cardStarRewards);
|
|
|
}
|
|
|
private void OnClickBtnBack()
|
|
|
{
|
|
@@ -900,6 +911,7 @@ namespace GFGGame
|
|
|
UI_ComCostCurrencyWithHas.ProxyEnd();
|
|
|
// _comFosterBottom.m_listLvConsume.numItems = 0;
|
|
|
_valueBarController.OnHide();
|
|
|
+ _cardStarRewards.Clear();
|
|
|
}
|
|
|
protected override void RemoveEventListener()
|
|
|
{
|