This commit is contained in:
aozhiwei 2019-12-13 14:54:19 +08:00
parent c53bd1dbd9
commit fc9bd730cd
2 changed files with 29 additions and 15 deletions

View File

@ -7,13 +7,22 @@
void JsonDataMgr::Init() void JsonDataMgr::Init()
{ {
if (!f8::IsOnlineEnv() && App::Instance()->HasFlag(2)) { if (!f8::IsOnlineEnv()) {
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/gameserver", if (f8::IsTestEnv()) {
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/gameserver.test",
{ {
GAME_ID, GAME_ID,
App::Instance()->instance_id, App::Instance()->instance_id,
GAME_ID GAME_ID
}); });
} else {
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/gameserver.dev",
{
GAME_ID,
App::Instance()->instance_id,
GAME_ID
});
}
} }
std::string gameserver_cluster_json_file; std::string gameserver_cluster_json_file;
gameserver_cluster_json_file = a8::Format("%s/node%d/game%d.gameserver.cluster.json", gameserver_cluster_json_file = a8::Format("%s/node%d/game%d.gameserver.cluster.json",

View File

@ -75,15 +75,20 @@ public:
void Load() void Load()
{ {
if (!f8::IsOnlineEnv()) { if (!f8::IsOnlineEnv()) {
if (App::Instance()->HasFlag(2)) { if (f8::IsTestEnv()) {
res_path = a8::Format("/root/pub/%d/%d/conf_test/game%d/gameserver/res/", res_path = a8::Format("/root/pub/%d/%d/conf_test/game%d/gameserver.test/res/",
{ {
GAME_ID, GAME_ID,
App::Instance()->instance_id, App::Instance()->instance_id,
GAME_ID GAME_ID
}); });
} else { } else {
res_path = a8::Format("/var/data/conf_test/game%d/gameserver/res/", {GAME_ID}); res_path = a8::Format("/root/pub/%d/%d/conf_test/game%d/gameserver.dev/res/",
{
GAME_ID,
App::Instance()->instance_id,
GAME_ID
});
} }
} else { } else {
res_path = "../res/"; res_path = "../res/";