public short GetLegendType(int kind, int solgrade)
    {
        NrCharKindInfo charKindInfo = this.GetCharKindInfo(kind);

        if (charKindInfo == null)
        {
            return(0);
        }
        return(charKindInfo.GetLegendType(solgrade));
    }
Exemplo n.º 2
0
    public string GetLegendType(NrCharKindInfo kindinfo, int solgrade)
    {
        string result = string.Empty;

        if (kindinfo == null)
        {
            return(result);
        }
        if (kindinfo.GetLegendType(solgrade) == 2)
        {
            result = "rankm";
        }
        else
        {
            result = "rankl";
        }
        return(result);
    }
    public string GetLegendName(int kind, int solgrade, string name)
    {
        string         result       = name;
        NrCharKindInfo charKindInfo = this.GetCharKindInfo(kind);

        if (charKindInfo == null)
        {
            return(name);
        }
        short legendType = charKindInfo.GetLegendType(solgrade);

        if (legendType == 1)
        {
            result = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <CTextParser> .Instance.GetTextColor("1107"), name);
        }
        else if (legendType == 2)
        {
            result = NrTSingleton <UIDataManager> .Instance.GetString(NrTSingleton <CTextParser> .Instance.GetTextColor("1106"), name);
        }
        return(result);
    }
    public UIBaseInfoLoader GetSolGradeImg(int kind, int solgrade)
    {
        string         key          = string.Empty;
        NrCharKindInfo charKindInfo = this.GetCharKindInfo(kind);

        if (charKindInfo == null)
        {
            return(null);
        }
        eLEGENDTYPE legendType = (eLEGENDTYPE)charKindInfo.GetLegendType(solgrade);

        if (legendType == eLEGENDTYPE.LEGEND || legendType == eLEGENDTYPE.MYTHOLOGY)
        {
            if (solgrade == 10 || solgrade == 6)
            {
                key = "Win_I_LankOrbA";
            }
            else if (solgrade == 11 || solgrade == 7)
            {
                key = "Win_I_LankOrbS";
            }
            else if (solgrade == 12 || solgrade == 8)
            {
                key = "Win_I_LankOrbSS";
            }
            else if (solgrade == 13 || solgrade == 9)
            {
                key = "Win_I_LankOrbEX";
            }
        }
        else
        {
            key = "Win_I_WorrGradeS" + (solgrade + 1).ToString();
        }
        return(NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(key));
    }
Exemplo n.º 5
0
    public void GetComposeTranscendence(bool bCompose, int i32BaseKind, byte i8BaseRank, byte i8UpgradeRank, int i32SubKind, byte i8SubRank, int i32ItemNum, int i32CostumeUnique)
    {
        this.InitComposeData();
        this.m_bComposeTranscendence = bCompose;
        this.m_i32FailItemNum        = i32ItemNum;
        if (bCompose)
        {
            this.m_bSetrankText = false;
        }
        else
        {
            this.m_bSetrankText = true;
        }
        this.m_bSetrank      = false;
        this.m_bSetface      = false;
        this.m_bEffectUpdate = false;
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32BaseKind);

        if (charKindInfo == null)
        {
            return;
        }
        NrCharKindInfo charKindInfo2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32SubKind);

        if (charKindInfo2 == null)
        {
            return;
        }
        NrCharKindInfo charKindInfo3 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32BaseKind);

        if (charKindInfo3 == null)
        {
            return;
        }
        this.m_strBaserankImageKey    = this.GetLegendType(charKindInfo, (int)i8BaseRank) + ((int)(i8BaseRank + 1)).ToString();
        this.m_strUpgraderankImageKey = this.GetLegendType(charKindInfo3, (int)i8UpgradeRank) + ((int)(i8UpgradeRank + 1)).ToString();
        this.m_strSubrankImageKey     = this.GetLegendType(charKindInfo2, (int)i8SubRank) + ((int)(i8SubRank + 1)).ToString();
        if (charKindInfo.GetLegendType((int)i8BaseRank) == 2)
        {
            this.m_bLegendBaseType = true;
        }
        else
        {
            this.m_bLegendBaseType = false;
        }
        if (charKindInfo2.GetLegendType((int)i8SubRank) == 2)
        {
            this.m_bLegendSubType = true;
        }
        else
        {
            this.m_bLegendSubType = false;
        }
        string str = string.Empty;

        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strBaserankImageKey))
        {
            str = string.Format("{0}", "UI/Soldier/" + this.m_strBaserankImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath);
            WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);
            wWWItem.SetItemType(ItemType.USER_ASSETB);
            wWWItem.SetCallback(new PostProcPerItem(this.SetBundleImage), this.m_strBaserankImageKey);
            TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true);
        }
        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strUpgraderankImageKey))
        {
            str = string.Format("{0}", "UI/Soldier/" + this.m_strUpgraderankImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath);
            WWWItem wWWItem2 = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);
            wWWItem2.SetItemType(ItemType.USER_ASSETB);
            wWWItem2.SetCallback(new PostProcPerItem(this.SetBundleImage), this.m_strUpgraderankImageKey);
            TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem2, DownGroup.RUNTIME, true);
        }
        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strSubrankImageKey))
        {
            str = string.Format("{0}", "UI/Soldier/" + this.m_strSubrankImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath);
            WWWItem wWWItem3 = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);
            wWWItem3.SetItemType(ItemType.USER_ASSETB);
            wWWItem3.SetCallback(new PostProcPerItem(this.SetBundleImage), this.m_strSubrankImageKey);
            TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem3, DownGroup.RUNTIME, true);
        }
        if (!this.m_bSetrankText)
        {
            this.m_strUpgraderankTextImageKey = this.GetRankText((int)i8UpgradeRank);
            if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strUpgraderankTextImageKey))
            {
                str = string.Format("{0}", "UI/Soldier/" + this.m_strUpgraderankTextImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath);
                WWWItem wWWItem4 = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);
                wWWItem4.SetItemType(ItemType.USER_ASSETB);
                wWWItem4.SetCallback(new PostProcPerItem(this.SetBundleImage), this.m_strUpgraderankTextImageKey);
                TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem4, DownGroup.RUNTIME, true);
            }
        }
        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(i32CostumeUnique);

        if (UIDataManager.IsUse256Texture())
        {
            this.m_strBasefaceImageKey = charKindInfo.GetPortraitFile1((int)i8BaseRank, costumePortraitPath) + "_256";
        }
        else
        {
            this.m_strBasefaceImageKey = charKindInfo.GetPortraitFile1((int)i8BaseRank, costumePortraitPath) + "_512";
        }
        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strBasefaceImageKey))
        {
            NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.m_strBasefaceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage));
        }
        if (UIDataManager.IsUse256Texture())
        {
            this.m_strUpgradefaceImageKey = charKindInfo3.GetPortraitFile1((int)i8UpgradeRank, string.Empty) + "_256";
        }
        else
        {
            this.m_strUpgradefaceImageKey = charKindInfo3.GetPortraitFile1((int)i8UpgradeRank, string.Empty) + "_512";
        }
        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strUpgradefaceImageKey))
        {
            NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.m_strUpgradefaceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage));
        }
        if (UIDataManager.IsUse256Texture())
        {
            this.m_strSubfaceImageKey = charKindInfo2.GetPortraitFile1((int)i8SubRank, string.Empty) + "_256";
        }
        else
        {
            this.m_strSubfaceImageKey = charKindInfo2.GetPortraitFile1((int)i8SubRank, string.Empty) + "_512";
        }
        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strSubfaceImageKey))
        {
            NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.m_strSubfaceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage));
        }
        str = string.Format("{0}", "UI/Soldier/fx_legendcard_compose" + NrTSingleton <UIDataManager> .Instance.AddFilePath);
        WWWItem wWWItem5 = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);

        wWWItem5.SetItemType(ItemType.USER_ASSETB);
        wWWItem5.SetCallback(new PostProcPerItem(this.SolComposeSuccess), null);
        TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem5, DownGroup.RUNTIME, true);
        this.eBUNDLEDOWN = SolTranscendenceSuccess.eBUNDLEDOWNSTATE.eBUNDLE_DOWNING;
    }