From fc9bd730cd012a81edd4d53ba30b2a3a8a25ad92 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Fri, 13 Dec 2019 14:54:19 +0800 Subject: [PATCH] 1 --- server/gameserver/jsondatamgr.cc | 23 ++++++++++++++++------- server/gameserver/metamgr.cc | 21 +++++++++++++-------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/server/gameserver/jsondatamgr.cc b/server/gameserver/jsondatamgr.cc index 5d50982..2cc6dba 100644 --- a/server/gameserver/jsondatamgr.cc +++ b/server/gameserver/jsondatamgr.cc @@ -7,13 +7,22 @@ void JsonDataMgr::Init() { - if (!f8::IsOnlineEnv() && App::Instance()->HasFlag(2)) { - work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/gameserver", - { - GAME_ID, - App::Instance()->instance_id, - GAME_ID - }); + if (!f8::IsOnlineEnv()) { + if (f8::IsTestEnv()) { + work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/gameserver.test", + { + GAME_ID, + App::Instance()->instance_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; gameserver_cluster_json_file = a8::Format("%s/node%d/game%d.gameserver.cluster.json", diff --git a/server/gameserver/metamgr.cc b/server/gameserver/metamgr.cc index 098c43a..2281695 100755 --- a/server/gameserver/metamgr.cc +++ b/server/gameserver/metamgr.cc @@ -75,15 +75,20 @@ 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 - }); + if (f8::IsTestEnv()) { + res_path = a8::Format("/root/pub/%d/%d/conf_test/game%d/gameserver.test/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("/root/pub/%d/%d/conf_test/game%d/gameserver.dev/res/", + { + GAME_ID, + App::Instance()->instance_id, + GAME_ID + }); } } else { res_path = "../res/";