| | |
| | | [SerializeField] Image getMatIcon;
|
| | | [SerializeField] Text getMatProgressText;
|
| | | [SerializeField] ButtonEx gotoShenfj;
|
| | | [SerializeField] ItemCell devItemCell;
|
| | |
|
| | | [SerializeField] int singleLineNum = 5;
|
| | | [SerializeField] int sumGridNum = 100;
|
| | |
| | | List<ItemModel> devourModellist;
|
| | | bool isOpen = true;
|
| | | int getMatCycle = 0;
|
| | | int devItemID;//分解装备获得的材料ID
|
| | | string devourFormula; //分解公式
|
| | | int preViewDevItemCnt; //分解获得的材料数量
|
| | | protected override void BindController()
|
| | | {
|
| | | colorlistObj.SetActive(true);
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | getMatCycle = int.Parse(FuncConfigConfig.Get("EquipDecomposeAward").Numerical1);
|
| | | if (getMatCycle == 0)
|
| | | { |
| | | var config = FuncConfigConfig.Get("EquipDecomposeAward");
|
| | | getMatCycle = int.Parse(config.Numerical1);
|
| | | devItemID = int.Parse(config.Numerical4);
|
| | | devourFormula = config.Numerical5;
|
| | | }
|
| | | isOpen = true;
|
| | | playerPack.selectDevourlist.Clear();
|
| | | devourModellist = playerPack.GetDevourModellist();
|
| | |
| | | devourModellist = playerPack.GetDevourModellist();
|
| | | playerPack.GetSelectDevourList();
|
| | | gridCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | RefreshDecomposeAttr();
|
| | | RefreshDecomPreviewAttr();
|
| | | RefreshGeMatProgress();
|
| | | }
|
| | |
|
| | | private void OnRefreshColor(PackModel.EquipColorType type)
|
| | |
| | | colorlistObj.SetActive(false);
|
| | | playerPack.GetSelectDevourList();
|
| | | gridCtrl.m_Scorller.RefreshActiveCellViews();
|
| | | RefreshDecomposeAttr();
|
| | | RefreshDecomPreviewAttr();
|
| | | RefreshGeMatProgress();
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | {
|
| | | equipAddExpPreview = 0;
|
| | | EquipDeComposeConfig deComposeConfig = EquipDeComposeConfig.Get(playerPack.decomposeLv);
|
| | | devItemCell.SetActive(false);
|
| | | if (playerPack.selectDevourlist.Count > 0)
|
| | | {
|
| | | equipAddExpPreview = GetPreviewExpByDevour();
|
| | |
| | | }
|
| | | string previewExp = StringUtility.Contact(playerPack.decomposeExp, "+", equipAddExpPreview);
|
| | | expNumText.text = StringUtility.Contact(UIHelper.AppendColor(TextColType.Green, previewExp, true), "/" + deComposeConfig.UpNeedExp);
|
| | | if (preViewDevItemCnt != 0)
|
| | | {
|
| | | devItemCell.SetActive(true);
|
| | | devItemCell.Init(new ItemCellModel(devItemID, false, (ulong)preViewDevItemCnt));
|
| | | devItemCell.button.AddListener(() => { |
| | | ItemTipUtility.Show(devItemID);
|
| | | });
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | return count;
|
| | | }
|
| | |
|
| | |
|
| | | int GetPreviewExpByDevour()
|
| | | {
|
| | | int sumExp = 0;
|
| | | preViewDevItemCnt = 0; |
| | | for (int i = 0; i < playerPack.selectDevourlist.Count; i++)
|
| | | {
|
| | | int curExp = 0;
|
| | |
| | | {
|
| | | curExp = tagPet.Exp;
|
| | | }
|
| | | preViewDevItemCnt += GetDogzScoreById(itemModel);
|
| | | }
|
| | | sumExp += curExp;
|
| | | }
|
| | |
| | | return sumExp;
|
| | | }
|
| | |
|
| | |
|
| | | public int GetDogzScoreById(ItemModel itemModel)
|
| | | {
|
| | | if (itemModel == null)
|
| | | return 0;
|
| | | if (itemModel.config.ItemColor < 4)
|
| | | return 0;
|
| | | Equation.Instance.Clear();
|
| | | Equation.Instance.AddKeyValue("itemColor", itemModel.config.ItemColor);
|
| | | Equation.Instance.AddKeyValue("isSuite", itemModel.config.SuiteiD == 0 ? 0 : 1);
|
| | | Equation.Instance.AddKeyValue("itemClass", itemModel.config.LV);
|
| | | return Equation.Instance.Eval<int>(devourFormula);
|
| | | }
|
| | | }
|
| | | }
|