Exemplo n.º 1
0
    public void SetBase()
    {
        if (this.m_pkChar != null)
        {
            NrCharKindInfo faceCharKindInfo = this.m_pkChar.GetFaceCharKindInfo();
            if (faceCharKindInfo != null)
            {
                string text = faceCharKindInfo.GetBundlePath();
                string faceCostumeBundlePath = this.GetFaceCostumeBundlePath();
                if (!string.IsNullOrEmpty(faceCostumeBundlePath))
                {
                    text = faceCostumeBundlePath;
                }
                string text2 = "Char/" + text;
                text2 = text2.ToLower();
                base.bStartDownloadBundle = true;
                base.downloadCounter++;
                NrTSingleton <NkBundleCallBack> .Instance.RequestBundleRuntime(text2, NkBundleCallBack.PlayerBundleStackName, ItemType.SKIN_BONE, 0, text.ToLower(), NkBundleParam.eBundleType.BUNDLE_CHAR_NONEPART, base.GetID().ToString(), true);

                this.m_bFaceSoldier = true;
                return;
            }
        }
        if (TsPlatform.IsMobile)
        {
            string text3 = "Char/Player/" + this.m_szModelPath;
            text3 = text3.ToLower();
            base.bStartDownloadBundle = true;
            base.downloadCounter++;
            NrTSingleton <NkBundleCallBack> .Instance.RequestBundleRuntime(text3, NkBundleCallBack.PlayerBundleStackName, ItemType.SKIN_BONE, 0, this.m_szModelPath.ToLower(), NkBundleParam.eBundleType.BUNDLE_CHAR_NONEPART, base.GetID().ToString(), true);

            return;
        }
        string text4 = "Char/Player/" + this.m_szModelPath + "/";

        text4 = text4 + this.m_szModelPath + "_bone";
        base.bStartDownloadBundle = true;
        base.downloadCounter++;
        GameObject playerModelClone = NrTSingleton <Nr3DCharSystem> .Instance.GetPlayerModelClone(this.m_szModelPath);

        if (playerModelClone == null)
        {
            NrTSingleton <NkBundleCallBack> .Instance.RequestBundleRuntime(text4, NkBundleCallBack.PlayerBundleStackName, ItemType.SKIN_BONE, 0, this.m_szCharCode, NkBundleParam.eBundleType.BUNDLE_CHAR_BONE, base.GetID().ToString());
        }
        else
        {
            this._AssignBaseObject(playerModelClone);
        }
    }