초기커밋
This commit is contained in:
35
UGQApiServer/UGQData/UGQDataHelper.cs
Normal file
35
UGQApiServer/UGQData/UGQDataHelper.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using ServerCommon;
|
||||
|
||||
|
||||
namespace UGQApiServer.UGQData;
|
||||
|
||||
public static class UGQDataHelper
|
||||
{
|
||||
public static string? getText(LangEnum langEnum, string textId)
|
||||
{
|
||||
MetaData.Instance._textTable.TryGetValue(textId, out var textData);
|
||||
if (textData == null)
|
||||
return null;
|
||||
|
||||
string text;
|
||||
switch (langEnum)
|
||||
{
|
||||
case LangEnum.Ko:
|
||||
text = textData.SourceString;
|
||||
break;
|
||||
case LangEnum.En:
|
||||
text = textData.en;
|
||||
break;
|
||||
case LangEnum.Jp:
|
||||
text = textData.ja;
|
||||
break;
|
||||
default:
|
||||
text = textData.SourceString;
|
||||
break;
|
||||
}
|
||||
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user