void completeBuySetItem(List <uint> _insufficientItems, uint _itemidx, int setidx)
    {
        _insufficientItems.RemoveAt(0); //구매햇던거 리스트 삭제

        if (_insufficientItems.Count > 0)
        {
            //다시구매
            BuyItem(_insufficientItems, setidx);
        }
        else
        {
            Infos_SetBuf infoset = null;
            if (TableDataManager.instance.Infos_SetBuffs.ContainsKey((ushort)setidx))
            {
                infoset = TableDataManager.instance.Infos_SetBuffs[(ushort)setidx];
            }

            //UI_EquipItem 의 Select_Item 데이터 재할당
            Asign_SelectItemData(infoset);
            //갱신
            UI_Equipment.Getsingleton.callback_complete_BuyItem();

            //장착
            EquipItem(setidx);
        }
    }
    void Applydata_SetBuff(List <object> lstData)
    {
        for (int i = 0; i < lstData.Count; i++)
        {
            List <object> _lstSetBuf    = (List <object>)lstData[i];
            Infos_SetBuf  _infos_SetBuf = new Infos_SetBuf();
            for (int j = 0; j < _lstSetBuf.Count; j++)
            {
                if (j == 0)
                {
                    _infos_SetBuf.SetIdx = Convert.ToUInt16(_lstSetBuf[j]);
                }
                else if (j == 1)
                {
                    _infos_SetBuf.BufKind = (SetBufKnd)Convert.ToByte(_lstSetBuf[j]);
                }
                else if (j == 2)
                {
                    if ((int)_infos_SetBuf.BufKind != 0)
                    {
                        uint  val  = Convert.ToUInt32(_lstSetBuf[j]);
                        float fval = ((float)val / (1000f));
                        _infos_SetBuf.BufVal = fval;
                    }
                    else
                    {
                        _infos_SetBuf.BufVal = 0;
                    }
                }
                else if (j == 3)
                {
                    _infos_SetBuf.MainWpnIdx = Convert.ToUInt32(_lstSetBuf[j]);
                }
                else if (j == 4)
                {
                    _infos_SetBuf.SubWpnIdx = Convert.ToUInt32(_lstSetBuf[j]);
                }
                else if (j == 5)
                {
                    _infos_SetBuf.DecoIdx1 = Convert.ToUInt32(_lstSetBuf[j]);
                }
                else if (j == 6)
                {
                    _infos_SetBuf.DecoIdx2 = Convert.ToUInt32(_lstSetBuf[j]);
                }
                else if (j == 7)
                {
                    _infos_SetBuf.DecoIdx3 = Convert.ToUInt32(_lstSetBuf[j]);
                }
            }

            Infos_SetBuffs[_infos_SetBuf.SetIdx] = _infos_SetBuf;
        }
    }
    void EquipItem(int setidx)
    {
        Infos_SetBuf infoset = null;

        if (TableDataManager.instance.Infos_SetBuffs.ContainsKey((ushort)setidx))
        {
            infoset = TableDataManager.instance.Infos_SetBuffs[(ushort)setidx];
        }

        User_Units nowUseUnit = UserDataManager.instance.user.User_Units[unitIdx];

        webRequest.SetEquipItem(unitIdx, nowUseUnit.MainWpnIdx, nowUseUnit.SubWpnIdx
                                , infoset.DecoIdx1, infoset.DecoIdx2, infoset.DecoIdx3, () => CompleteEquip(infoset));
    }
    // 세트하기위해서 부족한 아이템들 반환
    public List <uint> Get_insufficientSetItems(int setIdx, uint unitidx)
    {
        User         user    = UserDataManager.instance.user;
        Infos_SetBuf infoset = null;

        if (TableDataManager.instance.Infos_SetBuffs.ContainsKey((ushort)setIdx))
        {
            infoset = TableDataManager.instance.Infos_SetBuffs[(ushort)setIdx];
        }

        List <uint> insufficientItemIndexList = new List <uint>();


        if (infoset != null)
        {
            Dictionary <uint, user_Deco> dicUserDecos = null;
            if (user.User_Decos.ContainsKey(unitidx))
            {
                dicUserDecos = user.User_Decos[unitIdx];
            }


            if (dicUserDecos != null)
            {
                if (!dicUserDecos.ContainsKey(infoset.DecoIdx1))
                {
                    insufficientItemIndexList.Add(infoset.DecoIdx1);
                }
                if (!dicUserDecos.ContainsKey(infoset.DecoIdx2))
                {
                    insufficientItemIndexList.Add(infoset.DecoIdx2);
                }
                if (!dicUserDecos.ContainsKey(infoset.DecoIdx3))
                {
                    insufficientItemIndexList.Add(infoset.DecoIdx3);
                }
            }
            else //한번구매안해서 데이터 키값이없다
            {
                insufficientItemIndexList.Add(infoset.DecoIdx1);
                insufficientItemIndexList.Add(infoset.DecoIdx2);
                insufficientItemIndexList.Add(infoset.DecoIdx3);
            }
        }

        return(insufficientItemIndexList);
    }
    void CompleteEquip(Infos_SetBuf _infoset)
    {
        //UI_EquipItem 의 Select_Item 데이터 재할당
        Asign_SelectItemData(_infoset);

        //갱신
        UI_Equipment.Getsingleton.callback_complete_Equip();

        //토스트팝업
        UI_Popup_Toast popupToast = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Toast>(UIPOPUP.POPUPTOAST);
        string         txt        = string.Format("{0}를 장착했습니다.", TableDataManager.instance.GetSetName(_infoset.BufKind));

        popupToast.SetPopupMessage(txt);

        //세트팝업창닫기
        gameObject.SetActive(false);
    }
    void Asign_SelectItemData(Infos_SetBuf _infoset)
    {
        //현재 탭에 대해 선택아이템 변경
        EquipType _nowEquipType = UI_Equipment.Getsingleton.nowEquipInven;
        uint      targetItemIdx = 0;

        if (_nowEquipType == EquipType.Main)
        {
            targetItemIdx = _infoset.MainWpnIdx;
        }
        if (_nowEquipType == EquipType.Sub)
        {
            targetItemIdx = _infoset.SubWpnIdx;
        }
        if (_nowEquipType == EquipType.Dress_HEAD)
        {
            targetItemIdx = _infoset.DecoIdx1;
        }
        if (_nowEquipType == EquipType.Dress_BODY)
        {
            targetItemIdx = _infoset.DecoIdx2;
        }
        if (_nowEquipType == EquipType.Dress_FACE)
        {
            targetItemIdx = _infoset.DecoIdx3;
        }

        List <UIItem_EquipItem> _lst_Items = UI_Equipment.Getsingleton.Get_nowEquipItemList(UI_Equipment.Getsingleton.nowEquipInven);

        for (int i = 0; i < _lst_Items.Count; i++)
        {
            if (_lst_Items[i].ItemIdx == targetItemIdx)
            {
                UI_Equipment.Getsingleton.Selected_Item = _lst_Items[i]; //선택아이템 변경
            }
        }
    }