public bool IsChangeChar(E_CHAR_TRIBE eCharTribe)
    {
        if (this.m_lNeedMoney > NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.m_Money)
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("89"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return(false);
        }
        NkSoldierInfo leaderSoldierInfo = charPersonInfo.GetLeaderSoldierInfo();

        if (leaderSoldierInfo == null)
        {
            return(false);
        }
        int changeCharKindFormIndex = CharChangeMainDlg.GetChangeCharKindFormIndex(eCharTribe);

        if (changeCharKindFormIndex == leaderSoldierInfo.GetCharKind())
        {
            Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("212"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE);
            return(false);
        }
        if (leaderSoldierInfo.IsEquipItem())
        {
            CharChangeMainDlg.ShowMessageBoxEquipItem();
            return(false);
        }
        return(true);
    }
Exemple #2
0
    public void SelectCharInfo(E_CHAR_TRIBE eCharTribe)
    {
        int            changeCharKindFormIndex = CharChangeMainDlg.GetChangeCharKindFormIndex(eCharTribe);
        NrCharKindInfo charKindInfo            = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(changeCharKindFormIndex);

        if (charKindInfo == null)
        {
            return;
        }
        this.SetMainTexture(eCharTribe);
        CharChangeMainDlg.SetCharImage(this.m_dtCharBG, changeCharKindFormIndex);
        BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(charKindInfo.GetCHARKIND_STATINFO().kBattleSkillData[0].BattleSkillUnique);

        if (battleSkillBase != null)
        {
            this.m_dtSkillIcon1.SetTexture(NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(battleSkillBase.m_nSkillUnique));
            this.m_lbSkillName1.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey));
        }
        BATTLESKILL_BASE battleSkillBase2 = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(charKindInfo.GetCHARKIND_STATINFO().kBattleSkillData[1].BattleSkillUnique);

        if (battleSkillBase2 != null)
        {
            this.m_dtSkillIcon2.SetTexture(NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillIconTexture(battleSkillBase2.m_nSkillUnique));
            this.m_lbSkillName2.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase2.m_strTextKey));
        }
        switch (eCharTribe)
        {
        case E_CHAR_TRIBE.HUMAN:
            this.m_dtWeapon1.SetTextureKey("Win_I_Weapon1");
            this.m_dtWeapon2.SetTextureKey("Win_I_Weapon2");
            this.m_lbClass.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50006"));
            this.m_lbInfo.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50011"));
            break;

        case E_CHAR_TRIBE.FURRY:
            this.m_dtWeapon1.SetTextureKey("Win_I_Weapon3");
            this.m_dtWeapon2.SetTextureKey("Win_I_Weapon6");
            this.m_lbClass.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50004"));
            this.m_lbInfo.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50008"));
            break;

        case E_CHAR_TRIBE.ELF:
            this.m_dtWeapon1.SetTextureKey("Win_I_Weapon7");
            this.m_dtWeapon2.SetTextureKey("Win_I_Weapon8");
            this.m_lbClass.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50007"));
            this.m_lbInfo.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50009"));
            break;

        case E_CHAR_TRIBE.HUMANF:
            this.m_dtWeapon1.SetTextureKey("Win_I_Weapon4");
            this.m_dtWeapon2.SetTextureKey("Win_I_Weapon5");
            this.m_lbClass.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50005"));
            this.m_lbInfo.SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromCharInfo("50010"));
            break;
        }
    }
    public static bool Send_GS_CHANGE_CLASS_REQ(E_CHAR_TRIBE eCharTribe)
    {
        if (0 >= CharChangeMainDlg.GetChangeCharKindFormIndex(eCharTribe))
        {
            return(false);
        }
        GS_CHANGE_CLASS_REQ gS_CHANGE_CLASS_REQ = new GS_CHANGE_CLASS_REQ();

        gS_CHANGE_CLASS_REQ.i32CharTribe = (int)eCharTribe;
        SendPacket.GetInstance().SendObject(eGAME_PACKET_ID.GS_CHANGE_CLASS_REQ, gS_CHANGE_CLASS_REQ);
        NrTSingleton <FormsManager> .Instance.CloseForm(G_ID.CHARCHANGE_DLG);

        return(true);
    }
Exemple #4
0
    public void ClickMovie(IUIObject obj)
    {
        NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(CharChangeMainDlg.GetChangeCharKindFormIndex(this.m_eCharTribe));

        if (charKindInfo == null)
        {
            return;
        }
        string sOLINTRO = charKindInfo.GetCHARKIND_INFO().SOLINTRO;

        if (NrTSingleton <NrGlobalReference> .Instance.localWWW)
        {
            if (NrTSingleton <NrGlobalReference> .Instance.useCache)
            {
                string str = string.Format("{0}SOLINTRO/", Option.GetProtocolRootPath(Protocol.HTTP));
                NmMainFrameWork.PlayMovieURL(str + sOLINTRO + ".mp4", true, false, true);
            }
            else
            {
                NmMainFrameWork.PlayMovieURL("http://klohw.ndoors.com/at2mobile_android/SOLINTRO/" + sOLINTRO + ".mp4", true, false, true);
            }
        }
        else
        {
            string str2 = string.Format("{0}SOLINTRO/", NrTSingleton <NrGlobalReference> .Instance.basePath);
            NmMainFrameWork.PlayMovieURL(str2 + sOLINTRO + ".mp4", true, false, true);
        }
    }