diff --git a/server/gameserver/jsondatamgr.cc b/server/gameserver/jsondatamgr.cc index e98c06c..4376317 100644 --- a/server/gameserver/jsondatamgr.cc +++ b/server/gameserver/jsondatamgr.cc @@ -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 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 }); diff --git a/server/gameserver/metamgr.cc b/server/gameserver/metamgr.cc index 6d9bfff..e4a02bc 100755 --- a/server/gameserver/metamgr.cc +++ b/server/gameserver/metamgr.cc @@ -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/", - { - GAME_ID, - App::Instance()->instance_id, - GAME_ID - }); - } else { - res_path = a8::Format("/var/data/conf_test/game%d/gameserver/res/", {GAME_ID}); - } + res_path = a8::Format("../../../conf_test/game%d/gameserver/res/", + { + GAME_ID, + }); } else { res_path = "../res/"; }