Пример #1
0
    //초대수락
    public void ResponseButton_AcceptInvite()
    {
        User       _user = UserDataManager.instance.user;
        User_Units unit  = null;

        Activate_publicLobbyObj(EumLobbyObj.InviteMsg, false);

        //유닛 소유하고 있다면
        if (_user.User_Units.ContainsKey(_user.User_useUnit.UnitIdx))
        {
            unit = _user.User_Units[_user.User_useUnit.UnitIdx];
        }
        else //유닛 소유 않고 있다면 가지고 있는것중 아무거나 할당
        {
            foreach (var hUnit in _user.User_Units)
            {
                unit = hUnit.Value;
                _user.User_useUnit.UnitIdx = unit.Unitidx; //배틀 에 값정보 전달하기위해 User_useUnit 값변경해야한다.
                break;
            }
        }


        Network_MainMenuSoketManager.Getsingleton.Send_CTS_Answer_IntiveRoom(inviterUserID, true, (int)unit.Unitidx, unit.RefLv,
                                                                             (int)unit.MainWpnIdx, (int)unit.SubWpnIdx, unit.DecoIdx1, unit.DecoIdx2);

        inviterUserID = 0;

        //초대 수락했으니  초대 리스브 정보들 클리어
        _user.User_LstRcvRoomInvites.Clear();
    }
    //강화 이전 서브 스킬이름 가져오기
    public string Get_BfSubSkillName()
    {
        string     name     = string.Empty;
        int        bfIdx    = 0;
        User_Units userUnit = UserDataManager.instance.user.User_Units[UnitIdx];

        for (int i = 0; i < webResponse.GetResultInfoList.Count; i++)
        {
            if (webResponse.GetResultInfoList[i].ItTp == ITEMTYPE.UNIT)
            {
                bfIdx = userUnit.SubSkill + webResponse.GetResultInfoList[i].gainUserUnit.SubSkillIdxDiff;
                break;
            }
        }

        if (TableDataManager.instance.Infos_Skills.ContainsKey((byte)bfIdx))
        {
            name = TableDataManager.instance.Infos_Skills[(byte)bfIdx].SkillName;
        }
        else
        {
            name = "----";
        }

        return(name);
    }
    void Apply_SlotElementsInfo()
    {
        User _user = UserDataManager.instance.user;

        Dictionary <uint, infos_unit> _dicInfosUnit = TableDataManager.instance.Infos_units;

        if (Lst_ResultSlotElement.Count > 0)
        {
            int idx = 0;
            foreach (var infounit in Dic_infosUnit)
            {
                if (_user.User_Units.ContainsKey(infounit.Value.UnitIdx))           // 가지고 잇는 유닛 슬롯 설정
                {
                    User_Units unit = _user.User_Units[infounit.Value.UnitIdx];
                    Lst_ResultSlotElement[idx].IsActiveSlot = true;
                    Lst_ResultSlotElement[idx].Set_unitIcon(infounit.Value.UnitIdx);
                    idx++;
                }
            }


            foreach (var infounit in Dic_infosUnit)
            {
                if (!_user.User_Units.ContainsKey(infounit.Value.UnitIdx))
                {
                    Lst_ResultSlotElement[idx].IsActiveSlot = false;// 가지고 있지 않으니 유닛슬롯 미설정
                    Lst_ResultSlotElement[idx].Set_unitIcon(infounit.Value.UnitIdx);
                    idx++;
                }
            }
        }
    }
    void SetSendBuffer_roomMake()
    {
        //비공개 방 만들기
        //int : 유닛 인덱스
        //byte : 유닛 강화도
        //int : 메인무기
        //int : 보조무기
        //int : 치장1 인덱스
        //int : 치장2 인덱스


        User _user = UserDataManager.instance.user;

        User_Units unit = _user.User_Units[_user.User_useUnit.UnitIdxs[0]];

        SendBuffer = new ByteData(512, 0);
        SendBuffer.InPutByte((int)unit.Unitidx);
        SendBuffer.InPutByte(unit.RefLv);
        SendBuffer.InPutByte((int)unit.MainWpnIdx);
        SendBuffer.InPutByte((int)unit.SubWpnIdx);
        SendBuffer.InPutByte((int)unit.DecoIdx1);
        SendBuffer.InPutByte((int)unit.DecoIdx2);
        SendBuffer.InPutByte((int)unit.DecoIdx3);
        SendBuffer.InPutByte(unit.SubSkill);
    }
Пример #5
0
    public void Init_chrctBasicInfo(User_Units _userUnit, infos_unit _infoUnit)
    {
        //오브젝트이름 바꾸기
        //gameObject.name = string.Format("{0}{1}", gameObject.name, unitIdx);

        gainUserUnit = _userUnit;
        unitInfos    = _infoUnit;
        unitIdx      = (int)gainUserUnit.Unitidx;


        //캐릭터 스킨메터릴얼 체크
        Chk_ChrctSkinMeterial();

        //오브젝트에 붙어있는 아이템 정보 가져오기
        Chk_getItemInfo(Dic_ItemHead, EquipItemType.Head);
        Chk_getItemInfo(Dic_ItemFace, EquipItemType.FACE);
        Chk_getItemInfo(Dic_ItemBody, EquipItemType.Body);
        Chk_getItemInfo(Dic_ItemRightWpn, EquipItemType.RWeapon);
        Chk_getItemInfo(Dic_ItemLeftWpn, EquipItemType.LWeapon);
        Chk_getItemInfo(Dic_OverOBJ, EquipItemType.Over);


        if (gainUserUnit != null)
        {
            Apply_CharacterEquip();
        }
    }
    //캐릭터 정보
    void Set_TapCharacterInfomation()
    {
        infos_unit _infoUnit = null;
        User_Units _userUnit = null;

        if (user.User_Units.ContainsKey(nowSelectUnitIdx))
        {
            _userUnit = user.User_Units[nowSelectUnitIdx];
        }

        if (TableDataManager.instance.Infos_units.ContainsKey(nowSelectUnitIdx))
        {
            _infoUnit = TableDataManager.instance.Infos_units[nowSelectUnitIdx];
        }

        if (_infoUnit != null)
        {
            //스킬이미지
            Image_MainSkillTumnail.sprite = ImageManager.instance.Get_Sprite(string.Format("{0}{1}", DefineKey.lobbySkill, (int)_infoUnit.SkillKind));

            //이름
            Text_UnitName.text = _infoUnit.UnitName;

            //스킬설명
            Text_SkillDescrip.text = TextDataManager.Dic_TranslateText[(int)_infoUnit.UnitIdx];

            //레벨
            int lv = _userUnit != null ? _userUnit.RefLv : 1;
            Text_RefLv.text = string.Format("Lv.{0}", lv);



            float initHp  = _infoUnit.Hp;
            float initMv  = _infoUnit.MvSpeed;
            float initRld = _infoUnit.RldSpeed;
            int   reflv   = _userUnit != null ? _userUnit.RefLv : 1;

            //hp
            Text_Hp.text = ((int)StaticMethod.Get_nextSpec(initHp, reflv, true)).ToString();

            //movespeed
            Text_MoveSpeed.text = reflv > 4
            ? (StaticMethod.Get_nextSpec(initMv, reflv, false, 0.05f, 4)).ToString() //5렙이상시
            : initMv.ToString();                                                     // 5렙이하시 기본값

            //reloadSpeed
            Text_ReloadSpeed.text = reflv > 9
            ? "+" + Mathf.Abs((int)StaticMethod.Get_nextSpec(initRld, reflv, true, 5f, 9)).ToString() //9렙이상시
            : "+" + initRld.ToString();                                                               // 9렙이하시 기본값



            //선택 캐릭와 현재배치의캐릭 과 같은지 체크
            bool isUseChar = nowSelectUnitIdx == user.User_useUnit.UnitIdxs[(int)user.User_useUnit.nowSelectBatch]
                ? true : false;
            //같으면 disable 활성
            DisableUseCharObj.SetActive(isUseChar);
        }
    }
    void complete_ChkWeaponEquipment(uint unitidx, uint changingEquipIdx, User_Units _UseUnit)
    {
        webRequest.SetEquipItem(unitidx, changingEquipIdx, _UseUnit.SubWpnIdx,
                                (uint)_UseUnit.DecoIdx1, (uint)_UseUnit.DecoIdx2, (uint)_UseUnit.DecoIdx3, callback_complete_Equip);


        //연탁형이 다른유닛 무기스위칭 처리해서 데이터보내줄것임
    }
Пример #8
0
    public void Refresh_ChrctInfo(User_Units _userUnit, infos_unit _infoUnit)
    {
        gainUserUnit = _userUnit;
        unitInfos    = _infoUnit;
        unitIdx      = gainUserUnit != null ?(int)gainUserUnit.Unitidx : (int)unitInfos.UnitIdx;

        Apply_CharacterEquip();

        Active_SkinnedMeshMeterial();
    }
    //아이템 장착하기
    public void ResponseButton_Equip(int equipState)
    {
        if (Selected_Item != null)
        {
            User       _user          = UserDataManager.instance.user;
            User_Units nowUseUnit     = _user.User_Units[nowSelectUnitIdx];
            uint       willBeEquipIdx = 0;

            if (equipState == 0)
            {
                Selected_Item.isDoubleClick = true;

                if (Selected_Item.IsHave)
                {
                    willBeEquipIdx = Selected_Item.ItemIdx;

                    uint alreadyEquipedWeaponUnitidx = user.GetUnitidxsWithEquipedThisWeapon(willBeEquipIdx);
                    //다른유닛이 무기를 착용하고 잇는지 체크
                    if (alreadyEquipedWeaponUnitidx != 0)
                    {
                        UI_Popup_Selective popup = UI_Manager.Getsingleton.CreatAndGetPopup <UI_Popup_Selective>(UIPOPUP.POPUPSELECTIVE);
                        popup.Set_PopupTitleMessage(TextDataManager.Dic_TranslateText[145]); // 친구삭제
                        popup.SetPopupMessage("다른 히어로가 장착하고 있는 무기 입니다 \n장착하시겠습니까?");
                        popup.Set_addEventButton(() => complete_ChkWeaponEquipment(nowSelectUnitIdx, willBeEquipIdx, nowUseUnit));
                        return;
                    }
                }
                else if (Selected_Item.isUnEquipBtn)
                {
                    //Apply_EquipItem();
                    willBeEquipIdx = 0;
                }
                else
                {
                    return;
                }
            }
            else if (equipState == 1)
            {
                uint chkEquipIdx = 0;
                chkEquipIdx = nowUseUnit.MainWpnIdx;


                if (chkEquipIdx == 0)
                {
                    return;
                }

                willBeEquipIdx = 0;
            }


            webRequest.SetEquipItem(nowSelectUnitIdx, willBeEquipIdx, nowUseUnit.SubWpnIdx, (uint)nowUseUnit.DecoIdx1, (uint)nowUseUnit.DecoIdx2, (uint)nowUseUnit.DecoIdx3, callback_complete_Equip);
        }
    }
    void Set_ViewCharacter()
    {
        User_Units _userUnit = null;
        infos_unit _infoUnit = null;

        if (user.User_Units.ContainsKey(nowSelectUnitIdx))
        {
            _userUnit = user.User_Units[nowSelectUnitIdx];
        }

        if (TableDataManager.instance.Infos_units.ContainsKey(nowSelectUnitIdx))
        {
            _infoUnit = TableDataManager.instance.Infos_units[nowSelectUnitIdx];
        }

        if (viewCharacter == null)
        {
            if (_userUnit != null)
            {
                //선택한 캐릭터 생성
                Transform unitTr = ObjectPoolManager.Getinstance.Get_ObjectLobbyUnit(nowSelectUnitIdx.ToString());
                unitTr.transform.parent        = viewCharacterParentTr;
                unitTr.transform.localPosition = new Vector3(0, 0, 500f);
                unitTr.transform.localRotation = Quaternion.Euler(new Vector3(0, 180, 0));
                unitTr.transform.localScale    = new Vector3(225.0f, 225.0f, 225.0f); // 크기 225로 잡기

                characterInfo lc = unitTr.GetComponent <characterInfo>();

                //캐릭 초기화
                lc.Init_chrctBasicInfo(_userUnit, _infoUnit);

                //회전관련 값 할당
                CharRotateSector.Init_RotateSector(unitTr);

                //생성된캐릭 할당
                viewCharacter = lc;
            }
        }
        else
        {
            //소유중인 유닛이면
            //if (_userUnit != null)
            {
                // characterInfo 갱신위한 파라미터 재할당
                viewCharacter.Refresh_ChrctInfo(_userUnit, _infoUnit);
            }
        }


        //배치값
        Text_BatchNum.text = user.GetBatchTxt(user.User_useUnit.nowSelectBatch);
    }
    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));
    }
Пример #12
0
    //캐릭터 슬롯정보
    void Apply_CharacterSlot(User_Units _userUnit, BatchType batch)
    {
        if (_userUnit != null)
        {
            infos_unit infoUnit = null;
            if (Dic_infosUnit.ContainsKey(_userUnit.Unitidx))
            {
                infoUnit = Dic_infosUnit[_userUnit.Unitidx];
            }
            //이름
            Lst_TextCharName[(int)batch].text = infoUnit.UnitName;

            //강화 레벨
            Lst_TextCharRefLv[(int)batch].text = string.Format("Lv.{0}", _userUnit.RefLv);
        }
    }
Пример #13
0
    //같이하기
    public void ResponseButton_Together()
    {
        User _user = UserDataManager.instance.user;

        if (_user.User_Units.ContainsKey(_user.User_useUnit.UnitIdx))
        {
            User_Units unit = _user.User_Units[_user.User_useUnit.UnitIdx];

            Network_MainMenuSoketManager.Getsingleton.Send_CTS_FriendRoomJoin(clan_member.UserID,
                                                                              (int)unit.Unitidx, unit.RefLv, (int)unit.MainWpnIdx, (int)unit.SubWpnIdx,
                                                                              unit.DecoIdx1, unit.DecoIdx2, unit.DecoIdx3, unit.SubSkill);
        }
        else
        {
            UserEditor.Getsingleton.EditLog("don't have use unitidx");
        }
    }
Пример #14
0
    //로비 캐릭터 정보 설정
    public void Set_LobbyCharacterInfo()
    {
        uint[] useUnitidxs = user.User_useUnit.UnitIdxs;

        for (int i = 0; i < useUnitidxs.Length; i++)
        {
            User_Units userUnit = null;

            if (user.User_Units.ContainsKey(useUnitidxs[i]))
            {
                userUnit = user.User_Units[useUnitidxs[i]];
            }

            //캐릭터 오브젝트정보
            Apply_CharacterConfig(userUnit, (BatchType)i);

            //캐릭터 슬롯정보
            Apply_CharacterSlot(userUnit, (BatchType)i);
        }
    }
Пример #15
0
    public bool IsChanged(User_Units otherUnit)
    {
        bool changed = false;

        bool[] chkbolean = new bool[4];

        chkbolean[0] = (otherUnit.UnitRk == this.UnitRk);
        chkbolean[1] = (otherUnit.UnitExp == this.UnitExp);
        chkbolean[2] = (otherUnit.RefLv == this.RefLv);
        chkbolean[3] = (otherUnit.RefFailCnt == this.RefFailCnt);

        for (int i = 0; i < chkbolean.Length; i++)
        {
            if (chkbolean[i] == false)
            {
                changed = true;
            }
        }

        return(changed);
    }
Пример #16
0
    //캐릭터 오브젝트정보
    void Apply_CharacterConfig(User_Units _userUnit, BatchType batch)
    {
        if (_userUnit != null)
        {
            Lst_LobbyChar[(int)batch].gameObject.SetActive(true);

            if (!Dic_characterInfos.ContainsKey((int)batch))
            {
                //캐릭에 구성정보 할당
                infos_unit infoUnit = null;
                if (Dic_infosUnit.ContainsKey(_userUnit.Unitidx))
                {
                    infoUnit = Dic_infosUnit[_userUnit.Unitidx];
                }

                //캐릭 초기화
                Lst_LobbyChar[(int)batch].Init_chrctBasicInfo(_userUnit, infoUnit);


                //초기화된 캐릭터 Dic에 할당
                Dic_characterInfos[(int)batch] = Lst_LobbyChar[(int)batch];
            }
            else
            {
                infos_unit infoUnit = null;
                if (Dic_infosUnit.ContainsKey(_userUnit.Unitidx))
                {
                    infoUnit = Dic_infosUnit[_userUnit.Unitidx];
                }

                //characterInfo 갱신위한 파라미터 재할당
                Dic_characterInfos[(int)batch].Refresh_ChrctInfo(_userUnit, infoUnit);
            }
        }
        else
        {
            Lst_LobbyChar[(int)batch].gameObject.SetActive(false);
        }
    }
Пример #17
0
    //===================================================================================================================================================================================================================

    //플레이어 기본 정보 셋팅
    public void User_Data_Init()
    {
        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

        Server_IP   = SendManager.Instance.Get_GameServerInfo().PubIp;
        Server_Port = SendManager.Instance.Get_GameServerInfo().CnPort;

        Game_Versoin = SendManager.Instance.Get_version();

        User_ID         = SendManager.Instance.Get_userInfo().UserID;
        User_NickName   = SendManager.Instance.Get_userInfo().NkNm;
        Killing_Message = SendManager.Instance.Get_KillingMessage(USERWORD_TYPE.WRD_KILL);
        Suicide_Message = SendManager.Instance.Get_KillingMessage(USERWORD_TYPE.WRD_SUICIDE);

        //현재 재화 셋팅
        Player_Diamond = SendManager.Instance.Get_userGoods(ITEMTYPE.GEM);
        Player_Gold    = SendManager.Instance.Get_userGoods(ITEMTYPE.GOLD);

        User_Team         = 0;
        User_Clan_Mark    = SendManager.Instance.Get_userInfo().ClanMark;
        User_Clan_Name    = SendManager.Instance.Get_userInfo().ClanName;
        User_Country_Mark = SendManager.Instance.Get_UserCountryCode();

        //현재 지정되어있는 캐릭터 인덱스
        //Char_Index = (int)SendManager.Instance.Get_useCharacterIdx();
        Get_UseCharacterIdx = SendManager.Instance.Get_useCharacterIdx();
        Char_Index          = (int)Get_UseCharacterIdx[0];

        //유저가 소유한 모든 캐릭터 정보
        Get_ALL_Char_Data = SendManager.Instance.Get_userCharacters();

        //플레이어가 소유한 총의 모든 정보
        Get_Char_ALL_Gun_Data = SendManager.Instance.Get_userWeapons();

        //지정된 캐릭터의 모든 정보
        User_Units Char_Data = Get_ALL_Char_Data[(uint)Char_Index];

        Char_Level      = Char_Data.RefLv;
        Char_Now_HP     = SendManager.Instance.Get_ReinfCharacter((uint)Char_Index, Char_Level).Hp;
        Char_Move_Speed = SendManager.Instance.Get_ReinfCharacter((uint)Char_Index, Char_Level).MvSpeed;

        Costume_Kind_1 = Char_Data.DecoIdx1;
        Costume_Kind_2 = Char_Data.DecoIdx2;
        Costume_Kind_3 = Char_Data.DecoIdx3;

        User_weapon Main_Gun_Data = Get_Char_ALL_Gun_Data[Char_Data.MainWpnIdx];

        Main_Gun_Index = (int)Main_Gun_Data.WpnIdx;
        Main_Gun_Level = Main_Gun_Data.RefLv;
        Main_Gun_Type  = (byte)SendManager.Instance.Get_WeaponType(Main_Gun_Index);

        if (Get_Char_ALL_Gun_Data.ContainsKey(Char_Data.SubWpnIdx))
        {
            User_weapon Sub_Gun_Data = Get_Char_ALL_Gun_Data[Char_Data.SubWpnIdx];

            Sub_Gun_Index = (int)Sub_Gun_Data.WpnIdx;
            Sub_Gun_Level = Sub_Gun_Data.RefLv;
            Sub_Gun_Type  = (byte)SendManager.Instance.Get_WeaponType(Sub_Gun_Index);
        }



        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

        //총 무기의 인덱스
        int[] Weapon_Index = SendManager.Instance.GetAll_WeaponIdx();
        W_Index = new int[Weapon_Index.Length];
        Array.Copy(Weapon_Index, 0, W_Index, 0, W_Index.Length);

        //총 무기중의 더블핸드건 체크
        int Count = 0;

        for (int i = 0; i < W_Index.Length; i++)
        {
            if ((GUN_TYPE)SendManager.Instance.Get_WeaponType(W_Index[i]) == GUN_TYPE.DOUBLE_HANDGUN)
            {
                Count++;
            }
        }
        W_Left_Index = new int[Count];
        Count        = 0;
        for (int i = 0; i < W_Index.Length; i++)
        {
            if ((GUN_TYPE)SendManager.Instance.Get_WeaponType(W_Index[i]) == GUN_TYPE.DOUBLE_HANDGUN)
            {
                W_Left_Index[Count++] = W_Index[i];
            }
        }

        //총 무기중 런처,화염방사기 체크
        for (int i = 0; i < W_Index.Length; i++)
        {
            if ((GUN_TYPE)SendManager.Instance.Get_WeaponType(W_Index[i]) == GUN_TYPE.LAUNCHER)
            {
                W_Launchar_Index = W_Index[i];
            }
            else if ((GUN_TYPE)SendManager.Instance.Get_WeaponType(W_Index[i]) == GUN_TYPE.FLAMER_SKILL)
            {
                W_FlameThrower_Index = W_Index[i];
            }
            else if ((GUN_TYPE)SendManager.Instance.Get_WeaponType(W_Index[i]) == GUN_TYPE.ROCKET_SKILL)
            {
                W_Rocket_Index = W_Index[i];
            }
            else if ((GUN_TYPE)SendManager.Instance.Get_WeaponType(W_Index[i]) == GUN_TYPE.THROUGH_SHOT_SKILL)
            {
                W_ThroughShot_Index = W_Index[i];
            }
        }


        //수류탄 인덱스
        W_Grenade_Index = 21000;

        //총 코스튬 인덱스
        int[] Item_Index = SendManager.Instance.GetAll_DecoIdx();
        I_Index = new int[Item_Index.Length];
        Array.Copy(Item_Index, 0, I_Index, 0, I_Index.Length);

        //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    }
    // 강화아이템 정보 설정
    void Set_RfInfo(REINFORCE_TYPE RfType)
    {
        User _user    = UserDataManager.instance.user;
        uint _unitIdx = UnitIdx;

        if (RfType == REINFORCE_TYPE.UNIT)
        {
            Dictionary <uint, infos_unit> _dic_unitinfo = TableDataManager.instance.Infos_units;
            byte maxRfLv  = TableDataManager.instance.Get_MaxRefLv();
            byte nowRfLv  = (byte)(_user.User_Units[UnitIdx].RefLv - 1);
            byte nextRfLv = (byte)(_user.User_Units[UnitIdx].RefLv);

            if (nextRfLv >= maxRfLv)
            {
                nowRfLv  = maxRfLv;
                nextRfLv = maxRfLv;
            }

            //레벨 대하여 spec 오브젝트 활성화
            Activate_ReinfObects(RfType, nextRfLv);

            //강화 이름
            text_RfItemName.text = string.Format("{0} <color=#ff3e56>Lv.{1}</color>", _dic_unitinfo[UnitIdx].UnitName, nextRfLv);

            //능력치이름
            Lst_textSpecName[0].text = TextDataManager.Dic_TranslateText[400];             //체력
            Lst_textSpecName[1].text = TextDataManager.Dic_TranslateText[401];             //이동속도
            Lst_textSpecName[2].text = TextDataManager.Dic_TranslateText[402];             //장전속도
            Lst_textSpecName[3].text = TextDataManager.Dic_TranslateText[403];             //서브스킬
            //현재능력치
            Lst_textNowSpecValue[0].text = StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].Hp, nowRfLv, true).ToString();
            //다음능력치
            Lst_textNxtSpecValue[0].text = StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].Hp, nextRfLv, true).ToString();

            if (nextRfLv >= 5)
            {
                //현재능력치
                Lst_textNowSpecValue[1].text = StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].MvSpeed, nowRfLv, false, 0.05f, 4).ToString();

                //다음능력치
                Lst_textNxtSpecValue[1].text = StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].MvSpeed, nextRfLv, false, 0.05f, 4).ToString();
            }
            else
            {
                //현재능력치
                Lst_textNowSpecValue[1].text = _dic_unitinfo[UnitIdx].MvSpeed.ToString();
            }
            if (nextRfLv >= 10)
            {
                //현재능력치
                Lst_textNowSpecValue[2].text = string.Format("+{0}", StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].RldSpeed, nowRfLv, true, 5f, 9));

                //다음능력치
                Lst_textNxtSpecValue[2].text = string.Format("+{0}", StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].RldSpeed, nextRfLv, true, 5f, 9));
            }
            else
            {
                //현재능력치
                Lst_textNowSpecValue[2].text = "+" + _dic_unitinfo[UnitIdx].RldSpeed.ToString();
            }
            if (nextRfLv >= 15)
            {
                User_Units userUnit = _user.User_Units[UnitIdx];

                if (userUnit.SubSkill == 0)
                {
                    //현재능력치
                    Lst_textNowSpecValue[3].text = "----";
                }
                else
                {
                    //현재능력치
                    Lst_textNowSpecValue[3].text = /*Get_BfSubSkillName()*/ TableDataManager.instance.Infos_Skills[userUnit.SubSkill].SkillName;
                }

                if (_user.User_DrawSkills[UnitIdx].SubSkill != 0)
                {
                    //다음능력치
                    Lst_textNxtSpecValue[3].text = TableDataManager.instance.Infos_Skills[_user.User_DrawSkills[UnitIdx].SubSkill].SkillName;

                    //현재 가진 서브스킬있으므로 서브스킬바꿀껀지 로직들어감
                    IsAskChangeSubSkill = true;
                }
                else
                {
                    //현재 가진 서브스킬없으므로 서브스킬바꿀껀지 로직안들어가도됨
                    IsAskChangeSubSkill = false;
                }
            }
        }
        else if (RfType == REINFORCE_TYPE.WEAPON)
        {
            //스펙=============
            Dictionary <uint, Infos_Weapon> _dic_weaponinfo = TableDataManager.instance.Infos_weapons;
            byte nowRfLv  = (byte)(_user.User_Weapons[ItemIdx].RefLv - 1);
            byte nextRfLv = (byte)(_user.User_Weapons[ItemIdx].RefLv);

            //강화 아이템 이름
            text_RfItemName.text = string.Format("{0} <color=#ff3e56>Lv.{1}</color>", TableDataManager.instance.Infos_weapons[ItemIdx].WpnName, nextRfLv);

            //레벨 대하여 spec 오브젝트 활성화
            Activate_ReinfObects(RfType, nextRfLv);

            Lst_textSpecName[0].text = TextDataManager.Dic_TranslateText[405];             //위력
            Lst_textSpecName[1].text = TextDataManager.Dic_TranslateText[406];             // 크리티컬

            //현재능력치
            float nowAtkMin = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].AtkMin, nowRfLv, true);
            float nowAtkMax = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].AtkMax, nowRfLv, true);
            Lst_textNowSpecValue[0].text = string.Format("{0}~{1}", nowAtkMin, nowAtkMax);
            Lst_textNowSpecValue[1].text = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].Critical, nowRfLv, false).ToString();

            //다음능력치
            float nextAtkMin = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].AtkMin, nextRfLv, true);
            float nextAtkMax = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].AtkMax, nextRfLv, true);
            Lst_textNxtSpecValue[0].text = string.Format("{0}~{1}", nextAtkMin, nextAtkMax);
            Lst_textNxtSpecValue[1].text = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].Critical, nextRfLv, false).ToString();
        }
    }
    //현재 세트장비 타입 반환
    public SetBufKnd Chk_EquipSet(uint _unitidx)
    {
        User user = UserDataManager.instance.user;

        bool      isSet   = false;
        SetBufKnd setKind = SetBufKnd.NONE;

        User_Units gainUserUnit = null;

        if (user.User_Units.ContainsKey(_unitidx))
        {
            gainUserUnit = user.User_Units[_unitidx];
        }

        if (gainUserUnit != null)
        {
            foreach (var sb in infosSetbuff)
            {
                bool correct = true;

                if (isSet == true)
                {
                    break;
                }

                if (sb.Value.MainWpnIdx != gainUserUnit.MainWpnIdx)
                {
                    correct = false;
                }
                else if (sb.Value.MainWpnIdx == 0)
                {
                    correct = true;
                }
                if (sb.Value.SubWpnIdx != gainUserUnit.SubWpnIdx)
                {
                    correct = false;
                }
                else if (sb.Value.SubWpnIdx == 0)
                {
                    correct = true;
                }
                if (sb.Value.DecoIdx1 != gainUserUnit.DecoIdx1)
                {
                    correct = false;
                }
                if (sb.Value.DecoIdx2 != gainUserUnit.DecoIdx2)
                {
                    correct = false;
                }
                if (sb.Value.DecoIdx3 != gainUserUnit.DecoIdx3)
                {
                    correct = false;
                }

                if (correct == true)
                {
                    isSet   = correct;
                    setKind = (SetBufKnd)sb.Value.BufKind;
                }
            }
        }

        return(setKind);
    }
Пример #20
0
    //스펙 표시 설정
    void Set_SpecInfo(REINFORCE_TYPE rfType)
    {
        User _user = UserDataManager.instance.user;

        if (rfType == REINFORCE_TYPE.UNIT)
        {
            Dictionary <uint, infos_unit> _dic_unitinfo = TableDataManager.instance.Infos_units;
            byte maxRfLv  = TableDataManager.instance.Get_MaxRefLv();
            byte nowRfLv  = (byte)(_user.User_Units[UnitIdx].RefLv);
            byte nextRfLv = (byte)(_user.User_Units[UnitIdx].RefLv + 1);

            if (nextRfLv >= maxRfLv)
            {
                nextRfLv = maxRfLv;
            }

            //레벨 대하여 spec 오브젝트 활성화
            Activate_ReinfObects(rfType, nowRfLv, nextRfLv);



            //능력치이름
            Lst_textSpecName[0].text = TextDataManager.Dic_TranslateText[400];                     //체력
            Lst_textSpecName[1].text = TextDataManager.Dic_TranslateText[401];                     //이동속도
            Lst_textSpecName[2].text = TextDataManager.Dic_TranslateText[402];                     //장전속도
            Lst_textSpecName[3].text = TextDataManager.Dic_TranslateText[403];                     //서브스킬

            //현재능력치
            Lst_textNowSpecValue[0].text = StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].Hp, nowRfLv, true).ToString();
            //다음능력치
            Lst_textNxtSpecValue[0].text = StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].Hp, nextRfLv, true).ToString();

            if (nowRfLv >= 4)
            {
                //현재능력치
                Lst_textNowSpecValue[1].text = StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].MvSpeed, nowRfLv, false, 0.05f, 4).ToString();

                //다음능력치
                Lst_textNxtSpecValue[1].text = StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].MvSpeed, nextRfLv, false, 0.05f, 4).ToString();
            }
            else
            {
                //현재능력치
                Lst_textNowSpecValue[1].text = _dic_unitinfo[UnitIdx].MvSpeed.ToString();
            }
            if (nowRfLv >= 9)
            {
                //현재능력치
                Lst_textNowSpecValue[2].text = string.Format("+{0}", StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].RldSpeed, nowRfLv, true, 5f, 9));

                //다음능력치
                Lst_textNxtSpecValue[2].text = string.Format("+{0}", StaticMethod.Get_nextSpec(_dic_unitinfo[UnitIdx].RldSpeed, nextRfLv, true, 5f, 9));
            }
            else
            {
                //현재능력치
                Lst_textNowSpecValue[2].text = "+" + _dic_unitinfo[UnitIdx].RldSpeed.ToString();
            }
            if (nowRfLv >= 15)
            {
                User_Units userUnit = _user.User_Units[UnitIdx];

                if (userUnit.SubSkill == 0)
                {
                    isFirstBuySubskill = true;                     //처음 서브스킬 구매한다.

                    //현재능력치
                    Lst_textNowSpecValue[3].text = "----";
                }
                else
                {
                    //현재능력치
                    Lst_textNowSpecValue[3].text = TableDataManager.instance.Infos_Skills[userUnit.SubSkill].SkillName;
                }

                //다음능력치
                Lst_textNxtSpecValue[3].text = "?";
            }
        }
        else if (rfType == REINFORCE_TYPE.WEAPON)
        {
            Dictionary <uint, Infos_Weapon> _dic_weaponinfo = TableDataManager.instance.Infos_weapons;
            byte nowRfLv  = (byte)(_user.User_Weapons[ItemIdx].RefLv);
            byte nextRfLv = (byte)(_user.User_Weapons[ItemIdx].RefLv + 1);

            //spec 오브젝트 활성화
            Activate_ReinfObects(rfType, nowRfLv, nextRfLv);

            Lst_textSpecName[0].text = TextDataManager.Dic_TranslateText[405];             //위력
            Lst_textSpecName[1].text = TextDataManager.Dic_TranslateText[406];             // 크리티컬

            //현재능력치
            float nowAtkMin = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].AtkMin, nowRfLv, true);
            float nowAtkMax = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].AtkMax, nowRfLv, true);
            Lst_textNowSpecValue[0].text = string.Format("{0}~{1}", nowAtkMin, nowAtkMax);
            Lst_textNowSpecValue[1].text = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].Critical, nowRfLv, false).ToString();

            //다음능력치
            float nextAtkMin = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].AtkMin, nextRfLv, true);
            float nextAtkMax = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].AtkMax, nextRfLv, true);
            Lst_textNxtSpecValue[0].text = string.Format("{0}~{1}", nextAtkMin, nextAtkMax);
            Lst_textNxtSpecValue[1].text = StaticMethod.Get_nextSpec(_dic_weaponinfo[ItemIdx].Critical, nextRfLv, false).ToString();
        }
    }