|
@@ -110,6 +110,7 @@ namespace GFGGame
|
|
|
_ui.m_ComFosterBottom.m_btnClearAll.onClick.Add(OnClcikBtnClearAll);
|
|
|
_ui.m_ComFosterBottom.m_btnUpStar.onClick.Add(OnClickBtnUpStar);
|
|
|
_ui.m_ComFosterBottom.m_btnUpSkillLv.onClick.Add(OnBtnUpSkill);
|
|
|
+ _ui.m_ComFosterBottom.m_btnCheckAuto.onClick.Add(OnBtnCheckAuto);
|
|
|
|
|
|
//升级升星消耗材料列表
|
|
|
_ui.m_ComFosterBottom.m_listLvConsume.itemRenderer = RenderListLvConsumeItem;
|
|
@@ -701,6 +702,8 @@ namespace GFGGame
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ _comFosterBottom.m_btnCheckAuto.selected = GameGlobal.myNumericComponent.GetAsInt(NumericType.IsAutoSelect) == 1;
|
|
|
+
|
|
|
//升星后星数正5才不进入
|
|
|
if (refDodgeStar || _cardData.star % 5 != 0) {
|
|
|
UpdateUpStarOfStarAndText();
|
|
@@ -723,7 +726,7 @@ namespace GFGGame
|
|
|
_comFosterBottom.m_ctrlFullStar.selectedIndex = 0;
|
|
|
// List<CardStarCfg> starCfgs = CardStarCfgArray.Instance.GetCfgsBycardId(_cardData.id);
|
|
|
|
|
|
- _comFosterBottom.m_btnUpStar.data = 0;//data 0:材料不足,1:可以升级
|
|
|
+ //_comFosterBottom.m_btnUpStar.data = 0;//data 0:材料不足,1:可以升级
|
|
|
|
|
|
ItemUtil.UpdateItemNeedNum(_comFosterBottom.m_comStarCousumeGold, cardStarCfg.costID, cardStarCfg.costNum);
|
|
|
|
|
@@ -731,7 +734,7 @@ namespace GFGGame
|
|
|
_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()) == 0 ? true : false;
|
|
|
+ //_comFosterBottom.m_btnUpStar.grayed = int.Parse(_comFosterBottom.m_btnUpStar.data.ToString()) == 0 ? true : false;
|
|
|
// _comFosterBottom.m_btnUpStar.GetChild("ani").asMovieClip.visible = false;// !_comFosterBottom.m_btnUpStar.grayed;
|
|
|
}
|
|
|
}
|
|
@@ -786,6 +789,7 @@ namespace GFGGame
|
|
|
listItem.m_QualityType.selectedIndex = 4;
|
|
|
int needCount = cardStarCfg.materiarsArr[index][1];
|
|
|
long hasCount = ItemDataManager.GetItemNum(cardStarCfg.materiarsArr[index][0]);
|
|
|
+
|
|
|
listItem.m_txtDecomCount.text = StringUtil.GetColorText(hasCount.ToString(), hasCount < needCount ? "#D27869" : "#FFFFFF");// StringUtil.GetColorText(needCount.ToString(), hasCount < needCount ? "#D27869" : "#FDF3D7"); ;
|
|
|
listItem.m_txtDecomHasCount.text = "/" + needCount.ToString(); //; hasCount.ToString();
|
|
|
if (listItem.target.data == null)
|
|
@@ -795,7 +799,9 @@ namespace GFGGame
|
|
|
// listItem.m_btnPlus.data = cardStarCfg.materiarsArr[index][0];
|
|
|
listItem.target.data = cardStarCfg.materiarsArr[index][0];
|
|
|
|
|
|
- _comFosterBottom.m_btnUpStar.data = hasCount >= needCount && ItemDataManager.GetItemNum(cardStarCfg.costID) >= cardStarCfg.costNum ? 1 : 0;
|
|
|
+ //if (CardDataManager.GetUpStarEnoughMaterial(_cardData.id) == false) return;
|
|
|
+
|
|
|
+ //_comFosterBottom.m_btnUpStar.data = hasCount >= needCount && ItemDataManager.GetItemNum(cardStarCfg.costID) >= cardStarCfg.costNum ? 1 : 0;
|
|
|
|
|
|
if (hasCount < needCount)
|
|
|
{
|
|
@@ -868,15 +874,11 @@ namespace GFGGame
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- for (int i = 0; i < cardStarCfg.materiarsArr.Length; i++)
|
|
|
- {
|
|
|
- if (!ItemUtil.CheckItemEnough(cardStarCfg.materiarsArr[i][0], cardStarCfg.materiarsArr[i][1], true)) return;
|
|
|
- }
|
|
|
-
|
|
|
this.UpStar();
|
|
|
}
|
|
|
private async void UpStar()
|
|
|
{
|
|
|
+ _comFosterBottom.m_btnCheckAuto.selected = GameGlobal.myNumericComponent.GetAsInt(NumericType.IsAutoSelect) == 1;
|
|
|
bool result = await CardSProxy.UpgradeCardStar(_cardData.id, _comFosterBottom.m_btnCheckAuto.selected);
|
|
|
if (result)
|
|
|
{
|
|
@@ -1001,6 +1003,11 @@ namespace GFGGame
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ private void OnBtnCheckAuto()
|
|
|
+ {
|
|
|
+ var success = CardSProxy.SaveIsAutoSelect(_comFosterBottom.m_btnCheckAuto.selected);
|
|
|
+ }
|
|
|
+
|
|
|
private void OnBtnUpSkill()
|
|
|
{
|
|
|
List<PassivitySkillCfg> skillCfgs = PassivitySkillCfgArray.Instance.GetCfgsBycardId(_cardData.id);
|