|
@@ -74,8 +74,8 @@ namespace Fort23.Mono
|
|
|
CustomInit(selectIndex);
|
|
|
UpdateBjUI(false);
|
|
|
AudioManager.Instance.PlayAudio("ui_zbfbcg.wav");
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
SetSelectIcon(currentFaBaoWidget.SelectRoot);
|
|
|
});
|
|
|
|
|
@@ -83,7 +83,8 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
if (selectedFaBaoInfo != null)
|
|
|
{
|
|
|
- if (selectedFaBaoInfo.FabaoPowerupConfig.ID >= ConfigComponent.Instance.GetAll<FabaoPowerupConfig>().Length)
|
|
|
+ if (selectedFaBaoInfo.FabaoPowerupConfig.ID >=
|
|
|
+ ConfigComponent.Instance.GetAll<FabaoPowerupConfig>().Length)
|
|
|
{
|
|
|
TipMessagePanel.OpenTipMessagePanel("已经满级");
|
|
|
return;
|
|
@@ -91,7 +92,9 @@ namespace Fort23.Mono
|
|
|
|
|
|
for (var i = 0; i < selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs.Length; i++)
|
|
|
{
|
|
|
- if (!PlayerManager.Instance.BagController.IsEnough(selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i], selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemCosts[i]))
|
|
|
+ if (!PlayerManager.Instance.BagController.IsEnough(
|
|
|
+ selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i],
|
|
|
+ selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemCosts[i]))
|
|
|
{
|
|
|
ItemSourcePanel.OpenPanel(selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i]);
|
|
|
TipMessagePanel.OpenTipMessagePanel("道具不足");
|
|
@@ -102,10 +105,11 @@ namespace Fort23.Mono
|
|
|
ItemConfig itemConfig =
|
|
|
ConfigComponent.Instance.Get<ItemConfig>(selectedFaBaoInfo.FabaoConfig.ItemID);
|
|
|
ItemConfig itemConfig2 = ConfigComponent.Instance.Get<ItemConfig>(itemConfig.associateVlaue[0]);
|
|
|
- if (selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum != null && selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality-1] != -1)
|
|
|
+ if (selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum != null &&
|
|
|
+ selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1] != -1)
|
|
|
{
|
|
|
-
|
|
|
- if (!PlayerManager.Instance.BagController.IsEnough(itemConfig.associateVlaue[0], selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality-1]))
|
|
|
+ if (!PlayerManager.Instance.BagController.IsEnough(itemConfig.associateVlaue[0],
|
|
|
+ selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1]))
|
|
|
{
|
|
|
ItemSourcePanel.OpenPanel(itemConfig.associateVlaue[0]);
|
|
|
TipMessagePanel.OpenTipMessagePanel("道具不足");
|
|
@@ -162,8 +166,8 @@ namespace Fort23.Mono
|
|
|
|
|
|
Text_NextLv.text = "+1";
|
|
|
Text_NextPower.text = "+" + (nextFabaoInfo.qiangDu - selectedFaBaoInfo.qiangDu);
|
|
|
- Text_NextLv.color = new Color32(15,241,150,255);
|
|
|
- Text_NextPower.color = new Color32(15,241,150,255);
|
|
|
+ Text_NextLv.color = new Color32(15, 241, 150, 255);
|
|
|
+ Text_NextPower.color = new Color32(15, 241, 150, 255);
|
|
|
Text_NextLv.gameObject.SetActive(true);
|
|
|
Text_NextPower.gameObject.SetActive(true);
|
|
|
}
|
|
@@ -185,20 +189,21 @@ namespace Fort23.Mono
|
|
|
{
|
|
|
if (currentFaBaoInfo != selectedFaBaoInfo && selectedFaBaoInfo != null)
|
|
|
{
|
|
|
- if (currentFaBaoInfo == null || selectedFaBaoInfo.FabaoPowerupConfig.ID > currentFaBaoInfo.FabaoPowerupConfig.ID)
|
|
|
+ if (currentFaBaoInfo == null ||
|
|
|
+ selectedFaBaoInfo.FabaoPowerupConfig.ID > currentFaBaoInfo.FabaoPowerupConfig.ID)
|
|
|
{
|
|
|
Text_NextLv.gameObject.SetActive(true);
|
|
|
Text_NextLv.text =
|
|
|
$"+{selectedFaBaoInfo.FabaoPowerupConfig.ID - currentFaBaoInfo.FabaoPowerupConfig.ID}";
|
|
|
- Text_NextLv.color = new Color32(15,241,150,255);
|
|
|
-
|
|
|
+ Text_NextLv.color = new Color32(15, 241, 150, 255);
|
|
|
+
|
|
|
// Icon_LvBj.icon_name = "dec_fbjia";
|
|
|
}
|
|
|
else if (selectedFaBaoInfo.FabaoPowerupConfig.ID < currentFaBaoInfo.FabaoPowerupConfig.ID)
|
|
|
{
|
|
|
Text_NextLv.text =
|
|
|
$"{selectedFaBaoInfo.FabaoPowerupConfig.ID - currentFaBaoInfo.FabaoPowerupConfig.ID}";
|
|
|
- Text_NextLv.color = new Color32(235,110,109,255);
|
|
|
+ Text_NextLv.color = new Color32(235, 110, 109, 255);
|
|
|
Text_NextLv.gameObject.SetActive(true);
|
|
|
// Icon_LvBj.icon_name = "dec_fbjian";
|
|
|
}
|
|
@@ -210,14 +215,14 @@ namespace Fort23.Mono
|
|
|
if (currentFaBaoInfo == null || selectedFaBaoInfo.qiangDu > currentFaBaoInfo.qiangDu)
|
|
|
{
|
|
|
Text_NextPower.text = $"+{selectedFaBaoInfo.qiangDu - currentFaBaoInfo.qiangDu}";
|
|
|
- Text_NextPower.color = new Color32(15,241,150,255);
|
|
|
+ Text_NextPower.color = new Color32(15, 241, 150, 255);
|
|
|
Text_NextPower.gameObject.SetActive(true);
|
|
|
// Icon_PowrBj.icon_name = "dec_bjia";
|
|
|
}
|
|
|
else if (selectedFaBaoInfo.qiangDu < currentFaBaoInfo.qiangDu)
|
|
|
{
|
|
|
- Text_NextPower.text = $"{ selectedFaBaoInfo.qiangDu - currentFaBaoInfo.qiangDu}";
|
|
|
- Text_NextPower.color = new Color32(235,110,109,255);
|
|
|
+ Text_NextPower.text = $"{selectedFaBaoInfo.qiangDu - currentFaBaoInfo.qiangDu}";
|
|
|
+ Text_NextPower.color = new Color32(235, 110, 109, 255);
|
|
|
Text_NextPower.gameObject.SetActive(true);
|
|
|
// Icon_PowrBj.icon_name = "dec_fbjian";
|
|
|
}
|
|
@@ -341,12 +346,12 @@ namespace Fort23.Mono
|
|
|
BtnChangeRoot.SetActive(true);
|
|
|
currentFaBaoInfo = PlayerManager.Instance.FaBaoControl.FightFaBao[selectIndex];
|
|
|
selectedFaBaoInfo = currentFaBaoInfo;
|
|
|
-
|
|
|
+
|
|
|
UpdateUI(selectedFaBaoInfo);
|
|
|
UpadaFabaoBag();
|
|
|
await UpdateCurrentFaBaoWidget();
|
|
|
-
|
|
|
- if(currentFaBaoWidget != null)
|
|
|
+
|
|
|
+ if (currentFaBaoWidget != null)
|
|
|
SetSelectIcon(currentFaBaoWidget.SelectRoot);
|
|
|
}
|
|
|
|
|
@@ -481,8 +486,11 @@ namespace Fort23.Mono
|
|
|
itemWidgetType1s.Clear();
|
|
|
for (var i = 0; i < faBaoInfo.FabaoPowerupConfig.PowerupItemIDs.Length; i++)
|
|
|
{
|
|
|
- ItemWidgetType1 itemWidgetType1 = await UIManager.Instance.CreateGComponentForObject<ItemWidgetType1>(ItemWidgetType1Game,null, ItemRoot);
|
|
|
- itemWidgetType1.CustomInit(faBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i], faBaoInfo.FabaoPowerupConfig.PowerupItemCosts[i]);
|
|
|
+ ItemWidgetType1 itemWidgetType1 =
|
|
|
+ await UIManager.Instance.CreateGComponentForObject<ItemWidgetType1>(ItemWidgetType1Game, null,
|
|
|
+ ItemRoot);
|
|
|
+ itemWidgetType1.CustomInit(faBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i],
|
|
|
+ faBaoInfo.FabaoPowerupConfig.PowerupItemCosts[i]);
|
|
|
itemWidgetType1s.Add(itemWidgetType1);
|
|
|
}
|
|
|
|
|
@@ -490,10 +498,14 @@ namespace Fort23.Mono
|
|
|
ConfigComponent.Instance.Get<ItemConfig>(selectedFaBaoInfo.FabaoConfig.ItemID);
|
|
|
ItemConfig itemConfig2 = ConfigComponent.Instance.Get<ItemConfig>(itemConfig.associateVlaue[0]);
|
|
|
//大突破需要消耗对应的法宝碎片
|
|
|
- if (faBaoInfo.FabaoPowerupConfig.PromotePieceNum != null && faBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1] != -1)
|
|
|
- {
|
|
|
- ItemWidgetType1 itemWidgetType1 = await UIManager.Instance.CreateGComponentForObject<ItemWidgetType1>(ItemWidgetType1Game,null, ItemRoot);
|
|
|
- itemWidgetType1.CustomInit(itemConfig.associateVlaue[0], faBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1]);
|
|
|
+ if (faBaoInfo.FabaoPowerupConfig.PromotePieceNum != null &&
|
|
|
+ faBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1] != -1)
|
|
|
+ {
|
|
|
+ ItemWidgetType1 itemWidgetType1 =
|
|
|
+ await UIManager.Instance.CreateGComponentForObject<ItemWidgetType1>(ItemWidgetType1Game, null,
|
|
|
+ ItemRoot);
|
|
|
+ itemWidgetType1.CustomInit(itemConfig.associateVlaue[0],
|
|
|
+ faBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1]);
|
|
|
itemWidgetType1s.Add(itemWidgetType1);
|
|
|
}
|
|
|
}
|
|
@@ -507,17 +519,25 @@ namespace Fort23.Mono
|
|
|
|
|
|
faBaoSkillWidgets.Clear();
|
|
|
|
|
|
- List<FabaoPowerupConfig> fabaoPowerupConfigs = ConfigComponent.Instance.GetAll<FabaoPowerupConfig>().ToList();
|
|
|
+ List<FabaoPowerupConfig> fabaoPowerupConfigs =
|
|
|
+ ConfigComponent.Instance.GetAll<FabaoPowerupConfig>().ToList();
|
|
|
|
|
|
- var fanappower = fabaoPowerupConfigs.GroupBy(f => f.SkillLevel).Select(g => new { config = g.OrderBy(f => f.ID).FirstOrDefault() }).ToList();
|
|
|
+ var fanappower = fabaoPowerupConfigs.GroupBy(f => f.SkillLevel)
|
|
|
+ .Select(g => new { config = g.OrderBy(f => f.ID).FirstOrDefault() }).ToList();
|
|
|
|
|
|
foreach (var powerupConfigse in fanappower)
|
|
|
{
|
|
|
+ if (powerupConfigse.config.ID == 1)
|
|
|
+ {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
AccountFileInfo.FaBaoData faBaoData = new AccountFileInfo.FaBaoData();
|
|
|
faBaoData.id = selectedFaBaoInfo.FaBaoData.id;
|
|
|
faBaoData.level = powerupConfigse.config.ID;
|
|
|
FaBaoInfo _faBaoInfo = new FaBaoInfo(faBaoData);
|
|
|
- FaBaoSkillWidget faBaoSkillWidget = await UIManager.Instance.CreateGComponent<FaBaoSkillWidget>(null, SkillContent);
|
|
|
+ FaBaoSkillWidget faBaoSkillWidget =
|
|
|
+ await UIManager.Instance.CreateGComponent<FaBaoSkillWidget>(null, SkillContent);
|
|
|
faBaoSkillWidget.CustomInit(selectedFaBaoInfo, _faBaoInfo);
|
|
|
faBaoSkillWidgets.Add(faBaoSkillWidget);
|
|
|
}
|