Пример #1
0
    public void ShowSmeltWillReturn(List <long> list_equip_uuid)
    {
        bool flag = EquipGlobal.IsContainHighLevel(list_equip_uuid);

        this.return_list.Clear();
        for (int i = 0; i < list_equip_uuid.get_Count(); i++)
        {
            int key = BackpackManager.Instance.OnGetGoodItemId(list_equip_uuid.get_Item(i));
            zZhuangBeiPeiZhiBiao zZhuangBeiPeiZhiBiao = DataReader <zZhuangBeiPeiZhiBiao> .Get(key);

            for (int j = 0; j < zZhuangBeiPeiZhiBiao.smeltDrop.get_Count(); j++)
            {
                zZhuangBeiPeiZhiBiao.SmeltdropPair smeltdropPair = zZhuangBeiPeiZhiBiao.smeltDrop.get_Item(j);
                if (this.return_list.ContainsKey(smeltdropPair.key))
                {
                    this.return_list.set_Item(smeltdropPair.key, this.return_list.get_Item(smeltdropPair.key) + (long)smeltdropPair.value);
                }
                else
                {
                    this.return_list.set_Item(smeltdropPair.key, (long)smeltdropPair.value);
                }
            }
        }
        string text  = string.Empty;
        string text2 = string.Empty;

        using (Dictionary <int, long> .Enumerator enumerator = this.return_list.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                KeyValuePair <int, long> current = enumerator.get_Current();
                int    num = this.GetMaxFund() - GuildManager.Instance.GetEquipSmeltDayFund();
                string text3;
                if (current.get_Key() == MoneyType.GetItemId(6))
                {
                    if (GuildManager.Instance.GetEquipSmeltDayFund() >= this.GetMaxFund())
                    {
                        text2 = TextColorMgr.GetColorByID("本日军团资金贡献已达最大值\n", 1000007);
                        continue;
                    }
                    if ((long)num < current.get_Value())
                    {
                        string itemName = GameDataUtils.GetItemName(current.get_Key(), true, 0L);
                        text3 = text;
                        text  = string.Concat(new object[]
                        {
                            text3,
                            itemName,
                            "x",
                            num,
                            "\n"
                        });
                        continue;
                    }
                }
                string itemName2 = GameDataUtils.GetItemName(current.get_Key(), true, 0L);
                text3 = text;
                text  = string.Concat(new object[]
                {
                    text3,
                    itemName2,
                    "x",
                    current.get_Value(),
                    "\n"
                });
            }
        }
        text += text2;
        string text4 = string.Empty;

        if (flag)
        {
            text4 = "熔炼后将会获得{0}检测到您选中了高级装备\n是否进行熔炼?";
        }
        else
        {
            text4 = "熔炼后将会获得{0}是否进行熔炼?";
        }
        text4 = string.Format(text4, text);
        DialogBoxUIViewModel.Instance.ShowAsOKCancel("熔炼预览", text4, null, delegate
        {
            Dictionary <int, List <long> > dictionary = new Dictionary <int, List <long> >();
            for (int k = 0; k < list_equip_uuid.get_Count(); k++)
            {
                int key2 = BackpackManager.Instance.OnGetGoodItemId(list_equip_uuid.get_Item(k));
                zZhuangBeiPeiZhiBiao zZhuangBeiPeiZhiBiao2 = DataReader <zZhuangBeiPeiZhiBiao> .Get(key2);
                if (dictionary.ContainsKey(zZhuangBeiPeiZhiBiao2.position))
                {
                    List <long> list = dictionary.get_Item(zZhuangBeiPeiZhiBiao2.position);
                    list.Add(list_equip_uuid.get_Item(k));
                }
                else
                {
                    List <long> list2 = new List <long>();
                    list2.Add(list_equip_uuid.get_Item(k));
                    dictionary.Add(zZhuangBeiPeiZhiBiao2.position, list2);
                }
            }
            List <DecomposeEquipInfo> list3 = new List <DecomposeEquipInfo>();
            using (Dictionary <int, List <long> > .Enumerator enumerator2 = dictionary.GetEnumerator())
            {
                while (enumerator2.MoveNext())
                {
                    KeyValuePair <int, List <long> > current2 = enumerator2.get_Current();
                    DecomposeEquipInfo decomposeEquipInfo     = new DecomposeEquipInfo();
                    decomposeEquipInfo.position = current2.get_Key();
                    decomposeEquipInfo.equipIds.AddRange(current2.get_Value());
                    list3.Add(decomposeEquipInfo);
                }
            }
            GuildManager.Instance.SendSmeltEquip(list3);
        }, "取消", "确定", "button_orange_1", "button_yellow_1", null, true, true);
    }