diff --git a/server/gameserver/jsondatamgr.cc b/server/gameserver/jsondatamgr.cc index 4508197..6ee9dfd 100644 --- a/server/gameserver/jsondatamgr.cc +++ b/server/gameserver/jsondatamgr.cc @@ -10,9 +10,14 @@ void JsonDataMgr::Init() std::string gameserver_cluster_json_file; if (!f8::IsOnlineEnv()) { if (App::Instance()->flags.find(2) != App::Instance()->flags.end()) { - gameserver_cluster_json_file = a8::Format("/root/pub/conf_test/game%d/gameserver/" + gameserver_cluster_json_file = a8::Format("/root/pub/%d/%d/conf_test/game%d/gameserver/" "game%d.gameserver.cluster.json", - {GAME_ID, GAME_ID}); + { + GAME_ID, + App::Instance()->instance_id, + GAME_ID, + GAME_ID + }); } else { gameserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/gameserver/" "game%d.gameserver.cluster.json", diff --git a/server/gameserver/metamgr.cc b/server/gameserver/metamgr.cc index c5dba78..7943a40 100755 --- a/server/gameserver/metamgr.cc +++ b/server/gameserver/metamgr.cc @@ -6,6 +6,7 @@ #include "framework/cpp/utils.h" #include "metamgr.h" +#include "app.h" class MetaDataLoader { @@ -55,7 +56,16 @@ public: void Load() { if (!f8::IsOnlineEnv()) { - res_path = a8::Format("/var/data/conf_test/game%d/gameserver/res/", {GAME_ID}); + if (App::Instance()->flags.find(2) != App::Instance()->flags.end()) { + 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}); + } } else { res_path = "../res/"; }