Esempio n. 1
0
 public string GetStringById(string id)
 {
     this.txt = string.Empty;
     if (this.getDataReady)
     {
         this.tampLanguageVo = BaseDataMgr.instance.GetLanguageData(id);
         if (this.tampLanguageVo == null)
         {
             ClientLogger.Error("语言包中找不到语言id为* " + id + " *的文本内容,详情请咨询相关策划在检查Language之后");
             Match match = Regex.Match(id, "[\\u4e00-\\u9fa5]");
             if (match.Success)
             {
                 this.txt = id;
             }
             else
             {
                 this.txt = string.Empty;
             }
         }
         else
         {
             this.txt = this.tampLanguageVo.content;
         }
     }
     this.FixBrokenWord(this.txt, 1);
     return(this.txt);
 }
Esempio n. 2
0
    public static string StrById(string strId)
    {
        SysLanguageVo languageData = BaseDataMgr.instance.GetLanguageData(strId);

        if (languageData != null)
        {
            return(languageData.content);
        }
        return(string.Empty);
    }
Esempio n. 3
0
        private void NewbieSetUserNameForRobot()
        {
            string text  = string.Empty;
            string text2 = string.Empty;

            for (int i = 0; i < this._pvpPlayers.Count; i++)
            {
                ReadyPlayerSampleInfo readyPlayerSampleInfo = this._pvpPlayers[i];
                if (readyPlayerSampleInfo != null)
                {
                    if (string.IsNullOrEmpty(readyPlayerSampleInfo.userName))
                    {
                        if (readyPlayerSampleInfo.heroInfo != null)
                        {
                            text = readyPlayerSampleInfo.heroInfo.heroId;
                            if (!string.IsNullOrEmpty(text))
                            {
                                SysHeroMainVo heroMainData = BaseDataMgr.instance.GetHeroMainData(text);
                                if (heroMainData != null)
                                {
                                    text2 = heroMainData.name;
                                    if (!string.IsNullOrEmpty(text2))
                                    {
                                        SysLanguageVo languageData = BaseDataMgr.instance.GetLanguageData(text2);
                                        if (languageData != null)
                                        {
                                            readyPlayerSampleInfo.userName = languageData.content + "(电脑)";
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }