This commit is contained in:
aozhiwei 2019-11-28 20:52:48 +08:00
parent 833a286499
commit 49b96c16a5
2 changed files with 10 additions and 16 deletions

View File

@ -7,18 +7,17 @@
void JsonDataMgr::Init()
{
if (!f8::IsOnlineEnv() && App::Instance()->HasFlag(2)) {
work_path_ = a8::Format("../../conf_test/%d/%d/conf_test/game%d/gameserver",
if (!f8::IsOnlineEnv()) {
work_path_ = a8::Format("../../../conf_test",
{
GAME_ID,
App::Instance()->instance_id,
GAME_ID
});
}
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/game%d/gameserver/node%d/game%d.gameserver.cluster.json",
{
work_path_,
GAME_ID,
App::Instance()->node_id,
GAME_ID
});
@ -48,9 +47,10 @@ std::shared_ptr<a8::XObject> JsonDataMgr::GetMasterServerClusterConf()
void JsonDataMgr::Reload()
{
std::string masterserver_cluster_json_file;
masterserver_cluster_json_file = a8::Format("%s/node%d/game%d.masterserver.cluster.json",
masterserver_cluster_json_file = a8::Format("%s/game%d/gameserver/node%d/game%d.masterserver.cluster.json",
{
work_path_,
GAME_ID,
App::Instance()->node_id,
GAME_ID
});

View File

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