예제 #1
0
    public string GetPartFileName(string strPartPath, string strPartCode, bool bBasePart, int itemunique)
    {
        string text = "000";

        if (!bBasePart)
        {
            ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(itemunique);

            if (itemInfo != null)
            {
                text = itemInfo.m_strModelPath;
            }
        }
        else
        {
            text = itemunique.ToString();
        }
        text = NkUtil.MakeCode(text);
        return(string.Format("{0}/{1}_{2}_{3}", new object[]
        {
            strPartPath,
            this.m_pkTargetKind.GetBundlePath(),
            strPartCode,
            text
        }));
    }
예제 #2
0
    public string GetItemFileName(NrCharDefine.eAT2ItemAssetBundle eItemIndex)
    {
        if (this.m_pkTargetKind == null)
        {
            return(string.Empty);
        }
        string           result           = string.Empty;
        int              weapontype       = this.m_pkTargetKind.GetWeaponType();
        int              data             = this.m_kCharPartInfo.m_kEquipPart.GetData(eAT2CharEquipPart.CHAREQUIPPART_WEAPON1);
        string           arg              = "001";
        NkWeaponTypeInfo nkWeaponTypeInfo = null;

        if (eItemIndex != NrCharDefine.eAT2ItemAssetBundle.weapon1)
        {
            if (eItemIndex == NrCharDefine.eAT2ItemAssetBundle.weapon2)
            {
                if (data > 0)
                {
                    ITEMTYPE_INFO itemTypeInfo = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(data);

                    if (itemTypeInfo != null)
                    {
                        weapontype = itemTypeInfo.WEAPONTYPE;
                    }
                    ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(data);

                    if (itemInfo != null)
                    {
                        arg = NkUtil.MakeCode(itemInfo.m_strModelPath);
                    }
                }
                nkWeaponTypeInfo = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponTypeInfo(weapontype);

                if (nkWeaponTypeInfo != null)
                {
                    if (!nkWeaponTypeInfo.IsATB(8L))
                    {
                        weapontype = 0;
                    }
                    if (this.m_pkTargetKind.IsATB(1L) && this.m_pkTargetKind.GetCharTribe() == 2 && this.m_pkTargetKind.GetGender() == 1)
                    {
                        if (!nkWeaponTypeInfo.IsATB(16L))
                        {
                            weapontype = 0;
                        }
                        else
                        {
                            weapontype = 9;
                        }
                    }
                    nkWeaponTypeInfo = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponTypeInfo(weapontype);
                }
            }
        }
        else
        {
            if (data > 0)
            {
                ITEMTYPE_INFO itemTypeInfo2 = NrTSingleton <ItemManager> .Instance.GetItemTypeInfo(data);

                if (itemTypeInfo2 != null)
                {
                    weapontype = itemTypeInfo2.WEAPONTYPE;
                }
                ITEMINFO itemInfo2 = NrTSingleton <ItemManager> .Instance.GetItemInfo(data);

                if (itemInfo2 != null)
                {
                    arg = NkUtil.MakeCode(itemInfo2.m_strModelPath);
                }
            }
            nkWeaponTypeInfo = NrTSingleton <NkWeaponTypeInfoManager> .Instance.GetWeaponTypeInfo(weapontype);
        }
        if (nkWeaponTypeInfo != null)
        {
            string code = nkWeaponTypeInfo.GetCode();
            result = string.Format("{0}/{0}_{1}", code, arg);
        }
        return(result);
    }