|  | @@ -80,93 +80,9 @@ namespace Fort23.Mono
 | 
											
												
													
														|  |                  SetSelectIcon(currentFaBaoWidget.SelectRoot);
 |  |                  SetSelectIcon(currentFaBaoWidget.SelectRoot);
 | 
											
												
													
														|  |              });
 |  |              });
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -            Btn_UpGrade.onClick.AddListener(() =>
 |  | 
 | 
											
												
													
														|  | -            {
 |  | 
 | 
											
												
													
														|  | -                if (selectedFaBaoInfo != null)
 |  | 
 | 
											
												
													
														|  | -                {
 |  | 
 | 
											
												
													
														|  | -                    if (selectedFaBaoInfo.FabaoPowerupConfig.ID >=
 |  | 
 | 
											
												
													
														|  | -                        ConfigComponent.Instance.GetAll<FabaoPowerupConfig>().Length)
 |  | 
 | 
											
												
													
														|  | -                    {
 |  | 
 | 
											
												
													
														|  | -                        TipMessagePanel.OpenTipMessagePanel(10338);
 |  | 
 | 
											
												
													
														|  | -                        return;
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -                    if (PlayerManager.Instance.myHero.powerUpConfig.ID < selectedFaBaoInfo.FabaoPowerupConfig.NeedLv)
 |  | 
 | 
											
												
													
														|  | -                    {
 |  | 
 | 
											
												
													
														|  | -                        string jingjie =
 |  | 
 | 
											
												
													
														|  | -                            LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig
 |  | 
 | 
											
												
													
														|  | -                                .jingjieLanIDs[0]) +
 |  | 
 | 
											
												
													
														|  | -                            LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig
 |  | 
 | 
											
												
													
														|  | -                                .jingjieLanIDs[1]) +
 |  | 
 | 
											
												
													
														|  | -                            LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[2]);
 |  | 
 | 
											
												
													
														|  | -                        TipMessagePanel.OpenTipMessagePanel(LanguageManager.Instance.Text(10337, jingjie));
 |  | 
 | 
											
												
													
														|  | -                        return;
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  | 
 |  | +            Btn_UpGrade.onClick.AddListener(() => { UpGrade(); });
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -                    for (var i = 0; i < selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs.Length; i++)
 |  | 
 | 
											
												
													
														|  | -                    {
 |  | 
 | 
											
												
													
														|  | -                        if (!PlayerManager.Instance.BagController.IsEnough(
 |  | 
 | 
											
												
													
														|  | -                                selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i],
 |  | 
 | 
											
												
													
														|  | -                                selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemCosts[i]))
 |  | 
 | 
											
												
													
														|  | -                        {
 |  | 
 | 
											
												
													
														|  | -                            ItemSourcePanel.OpenPanel(selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i]);
 |  | 
 | 
											
												
													
														|  | -                            // TipMessagePanel.OpenTipMessagePanel("道具不足");
 |  | 
 | 
											
												
													
														|  | -                            return;
 |  | 
 | 
											
												
													
														|  | -                        }
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -                    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 (!PlayerManager.Instance.BagController.IsEnough(itemConfig.associateVlaue[0],
 |  | 
 | 
											
												
													
														|  | -                                selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1]))
 |  | 
 | 
											
												
													
														|  | -                        {
 |  | 
 | 
											
												
													
														|  | -                            ItemSourcePanel.OpenPanel(itemConfig.associateVlaue[0]);
 |  | 
 | 
											
												
													
														|  | -                            TipMessagePanel.OpenTipMessagePanel("道具不足");
 |  | 
 | 
											
												
													
														|  | -                            return;
 |  | 
 | 
											
												
													
														|  | -                        }
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -                    for (var i = 0; i < selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs.Length; i++)
 |  | 
 | 
											
												
													
														|  | -                    {
 |  | 
 | 
											
												
													
														|  | -                        PlayerManager.Instance.BagController.DeductItem(
 |  | 
 | 
											
												
													
														|  | -                            selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i],
 |  | 
 | 
											
												
													
														|  | -                            selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemCosts[i]);
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -                    if (selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum != null &&
 |  | 
 | 
											
												
													
														|  | -                        selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1] != -1)
 |  | 
 | 
											
												
													
														|  | -                    {
 |  | 
 | 
											
												
													
														|  | -                        PlayerManager.Instance.BagController.DeductItem(itemConfig.associateVlaue[0],
 |  | 
 | 
											
												
													
														|  | -                            selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1]);
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -                    selectedFaBaoInfo.UpGrade();
 |  | 
 | 
											
												
													
														|  | -                    PlayerManager.Instance.myHero.ComputeHeroInfo();
 |  | 
 | 
											
												
													
														|  | -                    fx_ui_fabao_shengji.gameObject.SetActive(true);
 |  | 
 | 
											
												
													
														|  | -                    fx_ui_fabao_shengji.Play();
 |  | 
 | 
											
												
													
														|  | -                    UpdateCurrentFaBaoWidget();
 |  | 
 | 
											
												
													
														|  | -                    UpadaFabaoBag();
 |  | 
 | 
											
												
													
														|  | -                    UpdateUI(selectedFaBaoInfo);
 |  | 
 | 
											
												
													
														|  | -                    UpdataGradeUI(true);
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -                    foreach (var faBaoSkillWidget in faBaoSkillWidgets)
 |  | 
 | 
											
												
													
														|  | -                    {
 |  | 
 | 
											
												
													
														|  | -                        if (selectedFaBaoInfo.FabaoPowerupConfig.ID ==
 |  | 
 | 
											
												
													
														|  | -                            faBaoSkillWidget._faBaoInfo.FabaoPowerupConfig.ID)
 |  | 
 | 
											
												
													
														|  | -                        {
 |  | 
 | 
											
												
													
														|  | -                            faBaoSkillWidget.fx_ui_fabao_tiaomu.gameObject.SetActive(true);
 |  | 
 | 
											
												
													
														|  | -                            faBaoSkillWidget.fx_ui_fabao_tiaomu.Play();
 |  | 
 | 
											
												
													
														|  | -                        }
 |  | 
 | 
											
												
													
														|  | -                    }
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | -                    AudioManager.Instance.PlayAudio("ui_fbgfsj.wav");
 |  | 
 | 
											
												
													
														|  | -                }
 |  | 
 | 
											
												
													
														|  | -            });
 |  | 
 | 
											
												
													
														|  | 
 |  | +            Btn_UpGradeLongPress.longPress = () => { UpGrade(); };
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |              Btn_PeiYang.onClick.AddListener(() =>
 |  |              Btn_PeiYang.onClick.AddListener(() =>
 | 
											
												
													
														|  |              {
 |  |              {
 | 
											
										
											
												
													
														|  | @@ -195,6 +111,94 @@ namespace Fort23.Mono
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +        private void UpGrade()
 | 
											
												
													
														|  | 
 |  | +        {
 | 
											
												
													
														|  | 
 |  | +            if (selectedFaBaoInfo != null)
 | 
											
												
													
														|  | 
 |  | +            {
 | 
											
												
													
														|  | 
 |  | +                if (selectedFaBaoInfo.FabaoPowerupConfig.ID >=
 | 
											
												
													
														|  | 
 |  | +                    ConfigComponent.Instance.GetAll<FabaoPowerupConfig>().Length)
 | 
											
												
													
														|  | 
 |  | +                {
 | 
											
												
													
														|  | 
 |  | +                    TipMessagePanel.OpenTipMessagePanel(10338);
 | 
											
												
													
														|  | 
 |  | +                    return;
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                if (PlayerManager.Instance.myHero.powerUpConfig.ID < selectedFaBaoInfo.FabaoPowerupConfig.NeedLv)
 | 
											
												
													
														|  | 
 |  | +                {
 | 
											
												
													
														|  | 
 |  | +                    string jingjie =
 | 
											
												
													
														|  | 
 |  | +                        LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig
 | 
											
												
													
														|  | 
 |  | +                            .jingjieLanIDs[0]) +
 | 
											
												
													
														|  | 
 |  | +                        LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig
 | 
											
												
													
														|  | 
 |  | +                            .jingjieLanIDs[1]) +
 | 
											
												
													
														|  | 
 |  | +                        LanguageManager.Instance.Text(PlayerManager.Instance.myHero.powerUpConfig.jingjieLanIDs[2]);
 | 
											
												
													
														|  | 
 |  | +                    TipMessagePanel.OpenTipMessagePanel(LanguageManager.Instance.Text(10337, jingjie));
 | 
											
												
													
														|  | 
 |  | +                    return;
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                for (var i = 0; i < selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs.Length; i++)
 | 
											
												
													
														|  | 
 |  | +                {
 | 
											
												
													
														|  | 
 |  | +                    if (!PlayerManager.Instance.BagController.IsEnough(
 | 
											
												
													
														|  | 
 |  | +                            selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i],
 | 
											
												
													
														|  | 
 |  | +                            selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemCosts[i]))
 | 
											
												
													
														|  | 
 |  | +                    {
 | 
											
												
													
														|  | 
 |  | +                        ItemSourcePanel.OpenPanel(selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i]);
 | 
											
												
													
														|  | 
 |  | +                        // TipMessagePanel.OpenTipMessagePanel("道具不足");
 | 
											
												
													
														|  | 
 |  | +                        return;
 | 
											
												
													
														|  | 
 |  | +                    }
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                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 (!PlayerManager.Instance.BagController.IsEnough(itemConfig.associateVlaue[0],
 | 
											
												
													
														|  | 
 |  | +                            selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1]))
 | 
											
												
													
														|  | 
 |  | +                    {
 | 
											
												
													
														|  | 
 |  | +                        ItemSourcePanel.OpenPanel(itemConfig.associateVlaue[0]);
 | 
											
												
													
														|  | 
 |  | +                        TipMessagePanel.OpenTipMessagePanel("道具不足");
 | 
											
												
													
														|  | 
 |  | +                        return;
 | 
											
												
													
														|  | 
 |  | +                    }
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                for (var i = 0; i < selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs.Length; i++)
 | 
											
												
													
														|  | 
 |  | +                {
 | 
											
												
													
														|  | 
 |  | +                    PlayerManager.Instance.BagController.DeductItem(
 | 
											
												
													
														|  | 
 |  | +                        selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemIDs[i],
 | 
											
												
													
														|  | 
 |  | +                        selectedFaBaoInfo.FabaoPowerupConfig.PowerupItemCosts[i]);
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                if (selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum != null &&
 | 
											
												
													
														|  | 
 |  | +                    selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1] != -1)
 | 
											
												
													
														|  | 
 |  | +                {
 | 
											
												
													
														|  | 
 |  | +                    PlayerManager.Instance.BagController.DeductItem(itemConfig.associateVlaue[0],
 | 
											
												
													
														|  | 
 |  | +                        selectedFaBaoInfo.FabaoPowerupConfig.PromotePieceNum[itemConfig2.quality - 1]);
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                selectedFaBaoInfo.UpGrade();
 | 
											
												
													
														|  | 
 |  | +                PlayerManager.Instance.myHero.ComputeHeroInfo();
 | 
											
												
													
														|  | 
 |  | +                fx_ui_fabao_shengji.gameObject.SetActive(true);
 | 
											
												
													
														|  | 
 |  | +                fx_ui_fabao_shengji.Play();
 | 
											
												
													
														|  | 
 |  | +                UpdateCurrentFaBaoWidget();
 | 
											
												
													
														|  | 
 |  | +                UpadaFabaoBag();
 | 
											
												
													
														|  | 
 |  | +                UpdateUI(selectedFaBaoInfo);
 | 
											
												
													
														|  | 
 |  | +                UpdataGradeUI(true);
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                foreach (var faBaoSkillWidget in faBaoSkillWidgets)
 | 
											
												
													
														|  | 
 |  | +                {
 | 
											
												
													
														|  | 
 |  | +                    if (selectedFaBaoInfo.FabaoPowerupConfig.ID ==
 | 
											
												
													
														|  | 
 |  | +                        faBaoSkillWidget._faBaoInfo.FabaoPowerupConfig.ID)
 | 
											
												
													
														|  | 
 |  | +                    {
 | 
											
												
													
														|  | 
 |  | +                        faBaoSkillWidget.fx_ui_fabao_tiaomu.gameObject.SetActive(true);
 | 
											
												
													
														|  | 
 |  | +                        faBaoSkillWidget.fx_ui_fabao_tiaomu.Play();
 | 
											
												
													
														|  | 
 |  | +                    }
 | 
											
												
													
														|  | 
 |  | +                }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +                AudioManager.Instance.PlayAudio("ui_fbgfsj.wav");
 | 
											
												
													
														|  | 
 |  | +            }
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |          public async override CTask<bool> AsyncInit(object[] uiData)
 |  |          public async override CTask<bool> AsyncInit(object[] uiData)
 | 
											
												
													
														|  |          {
 |  |          {
 | 
											
												
													
														|  |              // await UpadaFabaoBag();
 |  |              // await UpadaFabaoBag();
 |