예제 #1
0
    public void SetLevelValue()
    {
        if (this.m_DisableContorl)
        {
            return;
        }
        CAMERASETTING_DATA cameraData = NrTSingleton <NkCameraSettingsManager> .Instance.GetCameraData(this.m_nCameraLevel);

        if (this.m_bUseCameraLevel && cameraData != null)
        {
            this.yMaxLimit          = cameraData.m_YRotate;
            this.yDeg               = maxCamera.ClampAngle(this.yDeg, this.yMinLimit, this.yMaxLimit);
            this.rotation           = Quaternion.Euler(this.yDeg, this.xDeg, 0f);
            base.transform.rotation = this.rotation;
            NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

            if (charPersonInfo != null)
            {
                NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(0);
                if (soldierInfo == null)
                {
                    return;
                }
                if (soldierInfo.GetSolID() <= 0L)
                {
                    return;
                }
                this.fLevelHeight = cameraData.GetTribeHeight(soldierInfo.GetCharKindInfo().GetCharTribe());
                if (this.fTargetHeight == 0f)
                {
                    this.fTargetHeight = this.fLevelHeight;
                }
                if (Scene.CurScene == Scene.Type.WORLD)
                {
                    this.minDistance = cameraData.GetTribeZoom(soldierInfo.GetCharKindInfo().GetCharTribe());
                    this.maxDistance = cameraData.GetTribeZoom(soldierInfo.GetCharKindInfo().GetCharTribe());
                }
                else
                {
                    this.minDistance = cameraData.m_Zoom;
                    this.maxDistance = cameraData.m_Zoom;
                }
            }
            if (Scene.CurScene == Scene.Type.WORLD && this.m_nCameraLevel >= NrTSingleton <NkCameraSettingsManager> .Instance.GetMaxLevel() - 1)
            {
                NrCharBase @char = NrTSingleton <NkCharManager> .Instance.GetChar(1);

                if (@char != null && @char.IsReady3DModel())
                {
                    @char.SetShowHide3DModel(false, false, false);
                }
            }
            this.m_bDistanceMove = true;
        }
    }
    public override bool CheckGameGuideOnce()
    {
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo != null)
        {
            for (int i = 0; i < 6; i++)
            {
                NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
                if (soldierInfo != null)
                {
                    if (soldierInfo.GetSolID() != 0L)
                    {
                        if (soldierInfo.GetCharKindInfo() != null)
                        {
                            if ("2070" == soldierInfo.GetCharKindInfo().GetCHARKIND_INFO().SoldierSpec1)
                            {
                                return(false);
                            }
                            if (soldierInfo.GetCharKind() == 6)
                            {
                                return(false);
                            }
                        }
                    }
                }
            }
            NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

            if (readySolList == null)
            {
                return(false);
            }
            int num = -1;
            foreach (NkSoldierInfo current in readySolList.GetList().Values)
            {
                if (current != null)
                {
                    if (current.GetSolID() != 0L)
                    {
                        if ("2070" == current.GetCharKindInfo().GetCHARKIND_INFO().SoldierSpec1&& num < (int)current.GetGrade())
                        {
                            num = (int)current.GetGrade();
                            this.m_nCharKind = current.GetCharKind();
                        }
                    }
                }
            }
            if (0 < this.m_nCharKind)
            {
                return(true);
            }
        }
        return(false);
    }
예제 #3
0
    private int[] GetStat(NkSoldierInfo pSoldierinfo, short nLevel, int nGrade = -1)
    {
        NrCharKindInfo charKindInfo = pSoldierinfo.GetCharKindInfo();

        int[] array    = new int[4];
        int   solgrade = (nGrade != -1) ? nGrade : ((int)pSoldierinfo.GetGrade());

        array[0]  = charKindInfo.GetGradePlusSTR(solgrade);
        array[1]  = charKindInfo.GetGradePlusVIT(solgrade);
        array[2]  = charKindInfo.GetGradePlusDEX(solgrade);
        array[3]  = charKindInfo.GetGradePlusINT(solgrade);
        array[0] += charKindInfo.GetIncSTR(solgrade, (int)nLevel);
        array[1] += charKindInfo.GetIncVIT(solgrade, (int)nLevel);
        array[2] += charKindInfo.GetIncDEX(solgrade, (int)nLevel);
        array[3] += charKindInfo.GetIncINT(solgrade, (int)nLevel);
        TsLog.Log("Grade : {4} Level : {5} ,STR : {0} VIT : {1} DEX: {2} INT:{3}", new object[]
        {
            array[0],
            array[1],
            array[2],
            array[3],
            nGrade,
            nLevel
        });
        return(array);
    }
예제 #4
0
    public static int COMPARE_NAME(NkSoldierInfo a, NkSoldierInfo b)
    {
        string name  = a.GetCharKindInfo().GetName();
        string name2 = b.GetCharKindInfo().GetName();

        return(string.Compare(name, name2));
    }
예제 #5
0
    private void MessageBox_PreviewHero(object a_oObject)
    {
        NkSoldierInfo nkSoldierInfo = (NkSoldierInfo)a_oObject;

        if (nkSoldierInfo == null)
        {
            return;
        }
        if (nkSoldierInfo.GetCharKindInfo() == null)
        {
            return;
        }
        GS_PREVIEW_HERO_START_REQ gS_PREVIEW_HERO_START_REQ = new GS_PREVIEW_HERO_START_REQ();

        gS_PREVIEW_HERO_START_REQ.i32CharKind      = nkSoldierInfo.GetCharKind();
        gS_PREVIEW_HERO_START_REQ.i32CostumeUnique = (int)nkSoldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME);
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_PREVIEW_HERO_START_REQ, gS_PREVIEW_HERO_START_REQ);
        SolMilitaryGroupDlg solMilitaryGroupDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLMILITARYGROUP_DLG) as SolMilitaryGroupDlg;

        if (solMilitaryGroupDlg != null)
        {
            solMilitaryGroupDlg.ChangeSceneDestory = false;
            solMilitaryGroupDlg.Hide();
            NrTSingleton <NkClientLogic> .Instance.GidPrivewHero = 82;
        }
    }
예제 #6
0
    public List <BATTLESKILL_TRAINING> GetBattleSkillTrainingGroup(NkSoldierInfo SoldierData)
    {
        if (SoldierData == null)
        {
            return(null);
        }
        List <BATTLESKILL_TRAINING> list = new List <BATTLESKILL_TRAINING>();
        string code = SoldierData.GetCharKindInfo().GetCode();

        if (!this.mHash_BattleSkillTraining_CharName.ContainsKey(code))
        {
            Debug.LogError("Cannot Find Skill : " + code);
            return(null);
        }
        List <BATTLESKILL_TRAINING> list2 = this.mHash_BattleSkillTraining_CharName[code];

        if (list2 == null)
        {
            return(null);
        }
        for (int i = 0; i < list2.Count; i++)
        {
            if (list2[i].m_nSkillLevel == 1)
            {
                BATTLESKILL_BASE battleSkillBase = this.GetBattleSkillBase(list2[i].m_nSkillUnique);
                if (battleSkillBase != null)
                {
                    if (battleSkillBase.m_nSkilNeedWeapon > 0)
                    {
                        if (SoldierData.CheckNeedWeaponType(battleSkillBase.m_nSkilNeedWeapon))
                        {
                            list.Add(list2[i]);
                        }
                    }
                    else if (SoldierData.CheckNeedWeaponType(SoldierData.GetWeaponType()))
                    {
                        list.Add(list2[i]);
                    }
                }
            }
        }
        if (list.Count == 0)
        {
            return(null);
        }
        return(list);
    }
예제 #7
0
    public MYTHSKILL_TRAINING GetMythSkillTrainingData(NkSoldierInfo SoldierData)
    {
        if (SoldierData == null)
        {
            return(null);
        }
        string code = SoldierData.GetCharKindInfo().GetCode();

        foreach (int current in this.m_hashMythSkillTraining.Keys)
        {
            foreach (KeyValuePair <int, MYTHSKILL_TRAINING> current2 in this.m_hashMythSkillTraining[current])
            {
                for (int i = 0; i < 20; i++)
                {
                    if (!(code != current2.Value.m_strCharCode[i]))
                    {
                        if (current2.Value.m_i32SkillLevel == 1)
                        {
                            BATTLESKILL_BASE battleSkillBase = this.GetBattleSkillBase(current2.Value.m_i32SkillUnique);
                            if (battleSkillBase != null)
                            {
                                if (battleSkillBase.m_nMythSkillType == 1)
                                {
                                    int battleskillNeedWeapon;
                                    if (battleSkillBase.m_nSkilNeedWeapon > 0)
                                    {
                                        battleskillNeedWeapon = battleSkillBase.m_nSkilNeedWeapon;
                                    }
                                    else
                                    {
                                        battleskillNeedWeapon = SoldierData.GetWeaponType();
                                    }
                                    if (SoldierData.CheckNeedWeaponType(battleskillNeedWeapon))
                                    {
                                        return(current2.Value);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return(null);
    }
예제 #8
0
    private string SetFaceImageKey(NkSoldierInfo kSol)
    {
        string text = string.Empty;

        if (kSol == null)
        {
            return(text);
        }
        NrCharKindInfo charKindInfo = kSol.GetCharKindInfo();

        if (charKindInfo == null)
        {
            TsLog.LogError("SetImage SolID ={0} Not Found Kind", new object[]
            {
                kSol.GetCharKind()
            });
            return(text);
        }
        int    costumeUnique       = (int)kSol.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME);
        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(costumeUnique);

        string portraitFile = charKindInfo.GetPortraitFile1((int)kSol.GetGrade(), costumePortraitPath);

        if (UIDataManager.IsUse256Texture())
        {
            text = portraitFile + "_256";
        }
        else
        {
            text = portraitFile + "_512";
        }
        if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(text))
        {
            NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(text, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage));
        }
        return(text);
    }
예제 #9
0
    public void SetData(byte bPreGrade, long lPreLevel, long lGetExp, NkSoldierInfo kSolInfo)
    {
        string text     = string.Empty;
        string text2    = string.Empty;
        string text3    = string.Empty;
        int    charkind = 0;
        int    solgrade = 0;

        if (kSolInfo != null)
        {
            text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1731");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
            {
                text,
                "count",
                lGetExp
            });

            if (lPreLevel != (long)kSolInfo.GetLevel())
            {
                text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1732");

                NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[]
                {
                    text2,
                    "count1",
                    lPreLevel,
                    "count2",
                    kSolInfo.GetLevel()
                });
            }
            BASE_SOLGRADEINFO    cHARKIND_SOLGRADEINFO  = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)bPreGrade);
            CHARKIND_SOLSTATINFO kSolStatInfo           = cHARKIND_SOLGRADEINFO.kSolStatInfo;
            BASE_SOLGRADEINFO    cHARKIND_SOLGRADEINFO2 = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)kSolInfo.GetGrade());
            CHARKIND_SOLSTATINFO kSolStatInfo2          = cHARKIND_SOLGRADEINFO2.kSolStatInfo;
            text3    = kSolInfo.GetName();
            charkind = kSolInfo.GetCharKind();
            solgrade = (int)kSolInfo.GetGrade();
            NrSound.ImmedatePlay("UI_SFX", "QUEST", "SOLDIERRECRUIT");
            short[] propertys = this.GetPropertys(kSolStatInfo, kSolStatInfo2);
            if (propertys.Length != this.arPerpertyKeys.Length)
            {
                Debug.LogError(string.Format("Property size V:{0} != S:{1}", propertys.Length, this.arPerpertyKeys.Length));
                return;
            }
            for (int i = 0; i < 4; i++)
            {
                this.lbPropertyText[i].Visible  = false;
                this.lbPropertyValue[i].Visible = false;
            }
            int num = 0;
            for (int j = 0; j < propertys.Length; j++)
            {
                string strTextKey = this.arPerpertyKeys[j];
                short  num2       = propertys[j];
                if (0 < num2)
                {
                    this.lbPropertyText[num].Visible = true;
                    this.lbPropertyText[num].SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(strTextKey));
                    this.lbPropertyValue[num].Visible = true;
                    this.lbPropertyValue[num].SetText(num2.ToString());
                    num++;
                    if (num > 4)
                    {
                        Debug.LogError(string.Format("VALID_PROPERTY_MAX {0}", j));
                        break;
                    }
                }
            }
        }
        this.itSoldier.SetSolImageTexure(eCharImageType.LARGE, charkind, solgrade);
        this.lbAddExp.SetText(text);
        this.lbAddLevel.SetText(text2);
        this.lbName.SetText(text3);
    }
예제 #10
0
    public void SetData(byte bPreGrade, int lPreLevel, long lExp, NkSoldierInfo kSolInfo, long nAddEvolutionExp, long nMaxLvEvolution)
    {
        this.m_TargetSolInfo = kSolInfo;
        if (kSolInfo != null)
        {
            string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1731");

            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
            {
                textFromInterface,
                "count",
                lExp
            });

            this.lbExp.SetText(textFromInterface);
            this.lbName.SetText(kSolInfo.GetName());
            if (!NrTSingleton <ContentsLimitManager> .Instance.IsReincarnation())
            {
                if (kSolInfo.IsLeader())
                {
                    this.SolRank.Visible = false;
                }
                else
                {
                    UIBaseInfoLoader solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade());

                    if (solLargeGradeImg != null)
                    {
                        if (0 < NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade()))
                        {
                            this.SolRank.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
                        }
                        this.SolRank.SetTexture(solLargeGradeImg);
                    }
                }
            }
            else
            {
                UIBaseInfoLoader solLargeGradeImg2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade());

                if (solLargeGradeImg2 != null)
                {
                    if (0 < NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade()))
                    {
                        this.SolRank.SetSize(solLargeGradeImg2.UVs.width, solLargeGradeImg2.UVs.height);
                    }
                    this.SolRank.SetTexture(solLargeGradeImg2);
                }
            }
            int costumeUnique = (int)kSolInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME);
            this.dtImg.SetTexture(eCharImageType.LARGE, kSolInfo.GetCharKind(), (int)kSolInfo.GetGrade(), NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(costumeUnique));
            long  num  = kSolInfo.GetNextExp() - kSolInfo.GetCurBaseExp();
            float num2 = ((float)num - (float)kSolInfo.GetRemainExp()) / (float)num;
            if (num2 > 1f)
            {
                num2 = 1f;
            }
            if (kSolInfo.IsMaxLevel())
            {
                string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("286");

                this.lbExpRate.SetText(textFromInterface2);
                num2 = 1f;
            }
            else
            {
                this.lbExpRate.SetText(string.Format("{0:F2}%", num2 * 100f));
            }
            this.pbGage.Value = num2;
            BASE_SOLGRADEINFO cHARKIND_SOLGRADEINFO  = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)kSolInfo.GetGrade());
            BASE_SOLGRADEINFO cHARKIND_SOLGRADEINFO2 = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)bPreGrade);
            if (cHARKIND_SOLGRADEINFO != null && cHARKIND_SOLGRADEINFO2 != null)
            {
                int  level = (int)kSolInfo.GetLevel();
                bool flag  = lPreLevel != level;
                this.lbLevel[1].SetText(lPreLevel.ToString());
                this.lbLevel[2].Visible = flag;
                this.lbLevel[3].Visible = flag;
                this.lbLevel[3].SetText(level.ToString());
                this.m_bLevelUP = (lPreLevel != level);
                if (flag)
                {
                    base.SetShowLayer(2, true);
                }
                else
                {
                    base.SetShowLayer(2, false);
                }
                if (flag)
                {
                    int[] levelChangeValue = this.GetLevelChangeValue(kSolInfo, (short)lPreLevel, (short)level, (int)bPreGrade);
                    this.SetTextShowOrNot(ref this.m_lbLevelUpStat, levelChangeValue);
                }
            }
            if (nAddEvolutionExp > 0L)
            {
                textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1731");

                if (nMaxLvEvolution > 0L)
                {
                    textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2593");

                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
                    {
                        textFromInterface,
                        "count",
                        nAddEvolutionExp,
                        "count1",
                        nAddEvolutionExp - nMaxLvEvolution,
                        "count2",
                        nMaxLvEvolution
                    });
                }
                else
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref textFromInterface, new object[]
                    {
                        textFromInterface,
                        "count",
                        nAddEvolutionExp
                    });
                }
                if (!kSolInfo.IsMaxGrade())
                {
                    this.m_lbGetGradeExpText.SetText(textFromInterface);
                }
                else
                {
                    this.m_lbGetGradeExpText.SetText(string.Empty);
                }
                base.SetShowLayer(3, true);
                bool flag2 = kSolInfo.GetGrade() != bPreGrade;
                this.dtGradeUpImg.Visible = flag2;
                bool flag3 = false;
                if (COMMON_CONSTANT_Manager.GetInstance().GetValue(eCOMMON_CONSTANT.eCOMMON_CONSTANT_TRADECOUNT_USE) == 1 && flag2 && kSolInfo.IsMaxGrade())
                {
                    int num3 = (int)kSolInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_TRADE_COUNT);
                    this.lbGradeUpText.Visible = true;
                    string empty = string.Empty;
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2127"),
                        "count",
                        num3
                    });

                    this.lbGradeUpText.SetText(empty);
                    flag3 = true;
                }
                if (!flag3)
                {
                    this.lbGradeUpText.Visible = false;
                }
                if (flag2)
                {
                    short legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)bPreGrade);

                    UIBaseInfoLoader solLargeGradeImg3 = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)bPreGrade);

                    if (0 < legendType)
                    {
                        this.m_txPreRank.SetSize(solLargeGradeImg3.UVs.width, solLargeGradeImg3.UVs.height);
                    }
                    this.m_txPreRank.SetTexture(solLargeGradeImg3);
                    legendType = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(kSolInfo.GetCharKind(), (int)(bPreGrade + 1));

                    solLargeGradeImg3 = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(kSolInfo.GetCharKind(), (int)(bPreGrade + 1));

                    if (0 < legendType)
                    {
                        this.m_txCurRank.SetSize(solLargeGradeImg3.UVs.width, solLargeGradeImg3.UVs.height);
                    }
                    this.m_txCurRank.SetTexture(solLargeGradeImg3);
                    base.SetShowLayer(4, true);
                    int[] gradeChangeValue = this.GetGradeChangeValue(kSolInfo, kSolInfo.GetLevel(), (int)bPreGrade, (int)kSolInfo.GetGrade());
                    this.SetTextShowOrNot(ref this.m_lbRankUpStat, gradeChangeValue);
                }
                else
                {
                    base.SetShowLayer(4, false);
                }
                this.GradeExpBG.Visible   = true;
                this.GradeExpGage.Visible = true;
                this.GradeExpText.Visible = true;
                long   num4 = kSolInfo.GetEvolutionExp() - kSolInfo.GetCurBaseEvolutionExp();
                long   num5 = kSolInfo.GetNextEvolutionExp() - kSolInfo.GetCurBaseEvolutionExp();
                float  evolutionExpPercent = kSolInfo.GetEvolutionExpPercent();
                string text = string.Empty;
                this.GradeExpGage.SetSize(228f * evolutionExpPercent, this.GradeExpGage.height);
                if (!kSolInfo.IsMaxGrade())
                {
                    NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[]
                    {
                        NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1871"),
                        "exp",
                        num4.ToString(),
                        "maxexp",
                        num5.ToString()
                    });
                }
                else
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("484");
                }
                this.GradeExpText.SetText(text);
            }
            else
            {
                base.SetShowLayer(3, false);
                base.SetShowLayer(4, false);
            }
        }
    }
예제 #11
0
    public void ShowSolInfo(bool bStatCalc)
    {
        NkSoldierInfo soldierInfo = this.GetSoldierInfo();

        if (soldierInfo == null)
        {
            return;
        }
        if (soldierInfo.GetCharKindInfo() == null)
        {
            return;
        }
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strText, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("290"),
            "targetname",
            soldierInfo.GetName(),
            "count1",
            soldierInfo.GetLevel(),
            "count2",
            soldierInfo.GetSolMaxLevel()
        });

        this.m_lbSolName.SetText(this.m_strText);
        this.m_dtSolImage.SetUVMask(new Rect(4f / this.TEX_SIZE, 0f, 504f / this.TEX_SIZE, 448f / this.TEX_SIZE));
        string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(soldierInfo);

        this.m_dtSolImage.SetTexture(eCharImageType.LARGE, soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade(), costumePortraitPath);
        UIBaseInfoLoader solLargeGradeImg = NrTSingleton <NrCharKindInfoManager> .Instance.GetSolLargeGradeImg(soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade());

        if (solLargeGradeImg != null)
        {
            this.m_dtSolGrade.Hide(false);
            if (0 < NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendType(soldierInfo.GetCharKind(), (int)soldierInfo.GetGrade()))
            {
                this.m_dtSolGrade.SetSize(solLargeGradeImg.UVs.width, solLargeGradeImg.UVs.height);
            }
            this.m_dtSolGrade.SetTexture(solLargeGradeImg);
        }
        else
        {
            this.m_dtSolGrade.Hide(true);
        }
        SUBDATA_UNION sUBDATA_UNION = default(SUBDATA_UNION);

        sUBDATA_UNION.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_STRDEX);
        SUBDATA_UNION sUBDATA_UNION2 = default(SUBDATA_UNION);

        sUBDATA_UNION2.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_VITINT);
        SUBDATA_UNION sUBDATA_UNION3 = default(SUBDATA_UNION);

        sUBDATA_UNION3.nSubData = soldierInfo.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_AWAKENING_INFO);
        short n16SubData_ = sUBDATA_UNION3.n16SubData_0;
        int   statSTR     = soldierInfo.GetStatSTR();
        int   statDEX     = soldierInfo.GetStatDEX();
        int   statVIT     = soldierInfo.GetStatVIT();
        int   statINT     = soldierInfo.GetStatINT();

        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[0], statSTR, sUBDATA_UNION.n32SubData_0);
        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[1], statDEX, sUBDATA_UNION.n32SubData_1);
        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[2], statVIT, sUBDATA_UNION2.n32SubData_0);
        this.ShowBaseSolStatAwakening(this.m_lbBaseStat[3], statINT, sUBDATA_UNION2.n32SubData_1);
        if (this.IsAwakening())
        {
            for (int i = 0; i < 4; i++)
            {
                this.m_lbSolStat_2[i].Hide(false);
            }
            this.ShowBaseSolStat(this.m_lbCurStat[0], statSTR, sUBDATA_UNION.n32SubData_0, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[1], statDEX, sUBDATA_UNION.n32SubData_1, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[2], statVIT, sUBDATA_UNION2.n32SubData_0, this.m_strBaseTextColor);
            this.ShowBaseSolStat(this.m_lbCurStat[3], statINT, sUBDATA_UNION2.n32SubData_1, this.m_strBaseTextColor);
        }
        else
        {
            for (int i = 0; i < 4; i++)
            {
                this.m_lbSolStat_2[i].Hide(true);
                this.m_lbCurStat[i].SetText(string.Empty);
            }
        }
        if (bStatCalc)
        {
            for (int i = 0; i < 4; i++)
            {
                this.m_lbSolStat_2[i].Hide(true);
                this.m_lbCurStat[i].Hide(true);
            }
        }
        int needAwakeningItemNum = this.GetNeedAwakeningItemNum((int)(n16SubData_ + 1), soldierInfo.GetSeason());

        this.m_lbNeedAwakeningItemNum.SetText(needAwakeningItemNum.ToString());
        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref this.m_strStat, new object[]
        {
            NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2289"),
            "count",
            (int)(n16SubData_ + 1)
        });

        this.m_btStatCalc.SetText(this.m_strStat);
    }
예제 #12
0
    public void SetList()
    {
        NrMyCharInfo kMyCharInfo = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo;

        this.m_lbCurrentStatus.Clear();
        string text  = string.Empty;
        string empty = string.Empty;
        int    num   = 0;

        foreach (EXPEDITION_CURRENT_STATE_INFO current in this.m_listExpedition_CurrentStatus)
        {
            NewListItem newListItem = new NewListItem(this.m_lbCurrentStatus.ColumnNum, true, string.Empty);
            if ((current.ui8ExpeditionState == 1 || current.ui8ExpeditionState == 3) && current.i64Time == current.i64CheckBattleTime)
            {
                newListItem.SetListItemData(0, true);
                newListItem.SetListItemData(0, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1615"), current, new EZValueChangedDelegate(this.OnClickBackMove), null);
            }
            else
            {
                newListItem.SetListItemData(0, false);
            }
            newListItem.SetListItemData(1, this.GetExpeditionState(current), null, null, null);
            if (current.ui8ExpeditionState == 1 || current.ui8ExpeditionState == 2 || current.ui8ExpeditionState == 4)
            {
                NkExpeditionMilitaryInfo validExpeditionMilitaryInfo = kMyCharInfo.GetMilitaryList().GetValidExpeditionMilitaryInfo(current.ui8ExpeditionMilitaryUniq);
                if (validExpeditionMilitaryInfo != null)
                {
                    NkSoldierInfo leaderSolInfo = validExpeditionMilitaryInfo.GetLeaderSolInfo();
                    if (leaderSolInfo != null)
                    {
                        EVENT_HERODATA eventHeroCharCode = NrTSingleton <NrTableEvnetHeroManager> .Instance.GetEventHeroCharCode(leaderSolInfo.GetCharKind(), leaderSolInfo.GetGrade());

                        if (eventHeroCharCode != null)
                        {
                            newListItem.SetListItemData(5, "Win_I_EventSol", null, null, null);
                        }
                        else
                        {
                            UIBaseInfoLoader legendFrame = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(leaderSolInfo.GetCharKind(), (int)leaderSolInfo.GetGrade());

                            if (legendFrame != null)
                            {
                                newListItem.SetListItemData(5, legendFrame, null, null, null);
                            }
                            else
                            {
                                newListItem.SetListItemData(5, "Win_I_Cancel", null, null, null);
                            }
                        }
                        newListItem.SetListItemData(7, leaderSolInfo.GetListSolInfo(false), null, null, null);
                        newListItem.SetListItemData(3, string.Empty, current, new EZValueChangedDelegate(this.OnClickDetailInfo), null);
                    }
                    newListItem.SetListItemData(9, leaderSolInfo.GetCharKindInfo().GetName(), null, null, null);
                }
                EXPEDITION_CREATE_DATA expedtionCreateData = BASE_EXPEDITION_CREATE_DATA.GetExpedtionCreateData(current.i16ExpeditionCreateDataID);
                if (expedtionCreateData != null)
                {
                    EXPEDITION_DATA expeditionDataFromGrade = BASE_EXPEDITION_DATA.GetExpeditionDataFromGrade(expedtionCreateData.EXPEDITION_GRADE);
                    if (expeditionDataFromGrade != null)
                    {
                        newListItem.SetListItemData(8, false);
                        UIBaseInfoLoader uIBaseInfoLoader = NrTSingleton <UIImageInfoManager> .Instance.FindUIImageDictionary(expeditionDataFromGrade.Expedition_ICON_NAME);

                        if (uIBaseInfoLoader != null)
                        {
                            newListItem.SetListItemData(4, uIBaseInfoLoader, current, new EZValueChangedDelegate(this.OnClickMonDetailInfo), null);
                        }
                        newListItem.SetListItemData(10, NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(expeditionDataFromGrade.Expedition_GRADE_INTERFACEKEY), null, null, null);
                    }
                }
            }
            else if (current.ui8ExpeditionState == 3)
            {
                EXPEDITION_CREATE_DATA expedtionCreateData2 = BASE_EXPEDITION_CREATE_DATA.GetExpedtionCreateData(current.i16ExpeditionCreateDataID);
                if (expedtionCreateData2 != null)
                {
                    int num2 = expedtionCreateData2.EXPEDITION_ECO[0];
                    ECO eco  = NrTSingleton <NrBaseTableManager> .Instance.GetEco(num2.ToString());

                    if (eco != null)
                    {
                        newListItem.SetListItemData(7, NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0]), null, null, null);
                        newListItem.SetListItemData(3, NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0]), current, new EZValueChangedDelegate(this.OnClickMonDetailInfo), null);
                        newListItem.SetListItemData(9, NrTSingleton <NrCharKindInfoManager> .Instance.GetName(NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(eco.szCharCode[0])), null, null, null);
                    }
                }
                NkExpeditionMilitaryInfo validExpeditionMilitaryInfo2 = kMyCharInfo.GetMilitaryList().GetValidExpeditionMilitaryInfo(current.ui8ExpeditionMilitaryUniq);
                if (validExpeditionMilitaryInfo2 != null)
                {
                    NkSoldierInfo leaderSolInfo2 = validExpeditionMilitaryInfo2.GetLeaderSolInfo();
                    if (leaderSolInfo2 != null)
                    {
                        UIBaseInfoLoader legendFrame2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetLegendFrame(leaderSolInfo2.GetCharKind(), (int)leaderSolInfo2.GetGrade());

                        if (legendFrame2 != null)
                        {
                            newListItem.SetListItemData(6, legendFrame2, null, null, null);
                        }
                        else
                        {
                            newListItem.SetListItemData(6, "Win_I_Cancel", null, null, null);
                        }
                        newListItem.SetListItemData(8, leaderSolInfo2.GetListSolInfo(false), null, null, null);
                    }
                    newListItem.SetListItemData(4, string.Empty, current, new EZValueChangedDelegate(this.OnClickDetailInfo), null);
                    newListItem.SetListItemData(10, leaderSolInfo2.GetCharKindInfo().GetName(), null, null, null);
                }
            }
            newListItem.Data = current;
            this.m_lbCurrentStatus.Add(newListItem);
            num++;
        }
        text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1633");

        NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
        {
            text,
            "count1",
            this.m_Page,
            "count2",
            this.m_MaxPage
        });

        this.m_bxPage.SetText(empty);
        this.m_lbCurrentStatus.RepositionItems();
    }
    public override void ExcuteGameGuide()
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return;
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        int num = -1;

        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
            if (soldierInfo != null)
            {
                if (soldierInfo.GetSolID() == 0L)
                {
                    if (myCharInfo.IsAddBattleSoldier(i))
                    {
                        num = i;
                        break;
                    }
                }
            }
        }
        if (num == -1)
        {
            return;
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return;
        }
        if (1 > readySolList.GetCount())
        {
            return;
        }
        List <NkSoldierInfo> list = new List <NkSoldierInfo>(readySolList.GetList().Values);

        if (list == null)
        {
            return;
        }
        list.Sort(new Comparison <NkSoldierInfo>(this.CompareExp));
        for (int j = 0; j < list.Count; j++)
        {
            NkSoldierInfo nkSoldierInfo = list[j];
            if (nkSoldierInfo != null)
            {
                NrCharKindInfo charKindInfo = nkSoldierInfo.GetCharKindInfo();
                if (charKindInfo != null)
                {
                    if (charKindInfo.GetCHARKIND_CLASSINFO() != null)
                    {
                        int num2 = 0;
                        for (int k = 0; k < 6; k++)
                        {
                            NkSoldierInfo soldierInfo2 = charPersonInfo.GetSoldierInfo(k);
                            if (soldierInfo2 != null)
                            {
                                if (soldierInfo2.GetSolID() != 0L)
                                {
                                    if (soldierInfo2.GetCharKind() == nkSoldierInfo.GetCharKind())
                                    {
                                        num2++;
                                    }
                                }
                            }
                        }
                        if (num2 < (int)nkSoldierInfo.GetJoinCount())
                        {
                            this.SendSolChangeToServer(ref nkSoldierInfo, 1, 1);
                            return;
                        }
                    }
                }
            }
        }
    }
    public override bool CheckGameGuideOnce()
    {
        NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo();

        if (myCharInfo == null)
        {
            return(false);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(false);
        }
        bool flag = false;

        for (int i = 0; i < 6; i++)
        {
            NkSoldierInfo soldierInfo = charPersonInfo.GetSoldierInfo(i);
            if (soldierInfo != null)
            {
                if (soldierInfo.GetSolID() == 0L)
                {
                    if (myCharInfo.IsAddBattleSoldier(i))
                    {
                        flag = true;
                    }
                }
            }
        }
        if (!flag)
        {
            return(false);
        }
        NkReadySolList readySolList = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetReadySolList();

        if (readySolList == null)
        {
            return(false);
        }
        if (1 > readySolList.GetCount())
        {
            return(false);
        }
        List <NkSoldierInfo> list = new List <NkSoldierInfo>(readySolList.GetList().Values);

        if (list == null)
        {
            return(false);
        }
        list.Sort(new Comparison <NkSoldierInfo>(this.CompareExp));
        for (int j = 0; j < list.Count; j++)
        {
            NkSoldierInfo nkSoldierInfo = list[j];
            if (nkSoldierInfo != null)
            {
                NrCharKindInfo charKindInfo = nkSoldierInfo.GetCharKindInfo();
                if (charKindInfo != null)
                {
                    if (charKindInfo.GetCHARKIND_CLASSINFO() != null)
                    {
                        if (nkSoldierInfo.GetSolPosType() != 2 && nkSoldierInfo.GetSolPosType() != 6)
                        {
                            int num = 0;
                            for (int k = 0; k < 6; k++)
                            {
                                NkSoldierInfo soldierInfo2 = charPersonInfo.GetSoldierInfo(k);
                                if (soldierInfo2 != null)
                                {
                                    if (soldierInfo2.GetSolID() != 0L)
                                    {
                                        if (soldierInfo2.GetCharKind() == nkSoldierInfo.GetCharKind())
                                        {
                                            num++;
                                        }
                                    }
                                }
                            }
                            if (num < (int)nkSoldierInfo.GetJoinCount())
                            {
                                this.m_kSolInfo = nkSoldierInfo;
                                return(true);
                            }
                        }
                    }
                }
            }
        }
        return(false);
    }
예제 #15
0
    public void SetSeleteSol(long nSolID)
    {
        NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser;

        NkSoldierInfo soldierInfoFromSolID = nrCharUser.GetPersonInfo().GetSoldierInfoFromSolID(nSolID);

        if (soldierInfoFromSolID == null)
        {
            base.SetShowLayer(1, true);
            base.SetShowLayer(2, false);
        }
        else
        {
            base.SetShowLayer(1, false);
            base.SetShowLayer(2, true);
            string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("567");

            string empty = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[]
            {
                textFromInterface,
                "targetname",
                soldierInfoFromSolID.GetName(),
                "count",
                soldierInfoFromSolID.GetLevel().ToString()
            });

            string         text         = string.Empty;
            NrCharKindInfo charKindInfo = soldierInfoFromSolID.GetCharKindInfo();
            if (charKindInfo != null)
            {
                if (charKindInfo.GetCHARKIND_ATTACKINFO().ATTACKTYPE == soldierInfoFromSolID.GetAttackInfo().ATTACKTYPE)
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(charKindInfo.GetCHARKIND_INFO().SoldierSpec1);
                }
                else
                {
                    text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(charKindInfo.GetCHARKIND_INFO().SoldierSpec2);
                }
            }
            string textFromInterface2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("992");

            string empty2 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty2, new object[]
            {
                textFromInterface2,
                "type",
                text
            });

            int    num   = 0;
            string text2 = string.Empty;
            List <BATTLESKILL_TRAINING> battleSkillTrainingGroup = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillTrainingGroup(soldierInfoFromSolID);

            if (battleSkillTrainingGroup != null)
            {
                foreach (BATTLESKILL_TRAINING current in battleSkillTrainingGroup)
                {
                    int nSkillUnique = current.m_nSkillUnique;
                    BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(nSkillUnique);

                    if (battleSkillBase != null)
                    {
                        if (!soldierInfoFromSolID.IsCostumeEquip() || this.IsCostumeSkill(soldierInfoFromSolID, nSkillUnique))
                        {
                            num   = soldierInfoFromSolID.GetBattleSkillLevel(current.m_nSkillUnique);
                            text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey);

                            break;
                        }
                    }
                }
            }
            string textFromInterface3 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1292");

            string empty3 = string.Empty;
            NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty3, new object[]
            {
                textFromInterface3,
                "skillname",
                text2,
                "skilllevel",
                num.ToString()
            });

            this.m_lCharName.Text  = empty;
            this.m_lCharType.Text  = empty2;
            this.m_lSkillInfo.Text = empty3;
        }
        this.GuildBossBattleUserName();
    }