chore: 移除Sample本地运行时重复加载外服资源,避免产生潜在的错误

This commit is contained in:
status102
2024-01-06 16:08:44 +08:00
parent c768b64bcb
commit b83feac462

View File

@@ -20,7 +20,7 @@ int main([[maybe_unused]] int argc, char** argv)
return -1;
}
#ifdef SMOKE_TESTING
#ifdef ASST_DEBUG
if (argc >= 2) {
std::string overseas_type(argv[1]); // "YoStarJP", "YoStarEN", "YoStarKR", "txwy"
std::cout << "load overseas_type:" << overseas_type << std::endl;
@@ -31,22 +31,6 @@ int main([[maybe_unused]] int argc, char** argv)
return -1;
}
}
#elif defined(ASST_DEBUG)
bool load_error = false;
const auto overseas_dir = cur_path / "resource" / "global";
for (const auto& client : { "YoStarJP", "YoStarEN", "YoStarKR", "txwy" }) {
const auto overseas_path = overseas_dir / client;
bool loaded = AsstLoadResource(cur_path.string().c_str());
// 增量更新外服的资源
loaded &= AsstLoadResource(overseas_path.string().c_str());
if (!loaded) {
load_error = true;
std::cerr << "-------- load resource failed: " << client << " --------" << std::endl;
}
}
if (load_error) {
return -1;
}
#endif
auto ptr = AsstCreate();