This commit is contained in:
aozhiwei 2022-05-26 09:33:35 +08:00
commit 39a0fa64ce
3 changed files with 6 additions and 2 deletions

1
.gitignore vendored
View File

@ -21,3 +21,4 @@ __pycache__
game.py
*.cxx
compile_commands.json
*.DS_Store

BIN
res/imserver/en/text.xlsx Normal file

Binary file not shown.

View File

@ -181,5 +181,8 @@ std::string MetaMgr::ReplaceDirtyWord(const std::string& text, char c)
std::string MetaMgr::GetText(const std::string& textid, const std::string& def_text)
{
auto itr = loader_->text_hash.find(textid);
return itr != loader_->text_hash.end() ? itr->second : def_text;
if (itr != loader_->text_hash.end()) {
return itr->second;
}
return loader_->text_hash.empty() ? def_text : "";
}