少年修仙传客户端代码仓库
client_Wu Xijin
2019-07-15 73b434be61dcb38cfdbd3362012e9fa680d95470
4479 【主干】多个宝石点击一键合成报错
1个文件已修改
43 ■■■■■ 已修改文件
System/Compose/New/ComposeWinModel.cs 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Compose/New/ComposeWinModel.cs
@@ -704,7 +704,7 @@
                minNoBindCnt = composeCount - minBindCnt;
                ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("Compose107", GetComposeInfoStr(minBindCnt, minNoBindCnt)),
                ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("Compose107", GetComposeInfoStr()),
                   (bool isCompose) =>
                   {
                       if (isCompose)
@@ -715,27 +715,7 @@
            }
            else
            {
                int bindCnt = 0;
                int noBindCnt = 0;
                if (fixedMatIsBindDict[idlist[0]].ContainsKey(1))
                {
                    bindCnt = fixedMatIsBindDict[idlist[0]][1];
                }
                if (fixedMatIsBindDict[idlist[0]].ContainsKey(0))
                {
                    noBindCnt = fixedMatIsBindDict[idlist[0]][0];
                }
                int remainBind = bindCnt % fixedCounts[0];
                int remainNOBind = noBindCnt % fixedCounts[0];
                bindCnt = bindCnt / fixedCounts[0];
                noBindCnt = noBindCnt / fixedCounts[0];
                if (bindCnt + noBindCnt < composeCount)
                {
                    bindCnt = composeCount - noBindCnt;
                }
                ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("Compose107", GetComposeInfoStr(bindCnt, noBindCnt)),
                ConfirmCancel.ShowPopConfirm(Language.Get("Mail101"), Language.Get("Compose107", GetComposeInfoStr()),
                   (bool isCompose) =>
                   {
                       if (isCompose)
@@ -866,25 +846,12 @@
        return isRefineMat;
    }
    private string GetComposeInfoStr(int bindCnt, int noBindCnt)
    private string GetComposeInfoStr()
    {
        if (CurComposeModel == null) return string.Empty;
        int[] makeIds = CurComposeModel.makeID;
        ItemConfig config = ItemConfig.Get(makeIds[0]);
        StringBuilder stringBuilder = new StringBuilder();
        if (bindCnt > 0)
        {
            string s = StringUtility.Contact(config.ItemName, Language.Get("Compose105"), "x", bindCnt, "</r>");
            stringBuilder.Append(s);
        }
        if (noBindCnt > 0)
        {
            string s = StringUtility.Contact(config.ItemName, Language.Get("Compose106"), "x", noBindCnt);
            stringBuilder.Append(s);
        }
        return stringBuilder.ToString();
        return config.ItemName;
    }
    private byte[] DictToArray(Dictionary<int, ItemModel> itemDict)
@@ -1094,7 +1061,7 @@
        secondTypeRedDict.Clear();
        thirdTypeRedDict.Clear();
        var firstType= (int)ComposeFuncType.Item;
        var firstType = (int)ComposeFuncType.Item;
        if (composeDataDict.ContainsKey(firstType))
        {
            var firstTypeData = composeDataDict[firstType];