diff --git a/server/wsproxy/jsondatamgr.cc b/server/wsproxy/jsondatamgr.cc index aea288a..f8eac26 100644 --- a/server/wsproxy/jsondatamgr.cc +++ b/server/wsproxy/jsondatamgr.cc @@ -20,15 +20,9 @@ void JsonDataMgr::Init() App::Instance()->node_id, GAME_ID }); - targetserver_cluster_json_file = a8::Format("../config/node%d/game%d.gameserver.cluster.json", - { - App::Instance()->node_id, - GAME_ID - }); #else wsproxyserver_cluster_json_file = a8::Format("../config/game%d.wsproxy.cluster.json", {GAME_ID}); masterserver_cluster_json_file = a8::Format("../config/game%d.masterserver.cluster.json", {GAME_ID}); - targetserver_cluster_json_file = a8::Format("../config/game%d.gameserver.cluster.json", {GAME_ID}); #endif } else { #ifdef MASTER_MODE @@ -44,12 +38,6 @@ void JsonDataMgr::Init() App::Instance()->node_id, GAME_ID }); - targetserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/node%d/game%d.gameserver.cluster.json", - { - GAME_ID, - App::Instance()->node_id, - GAME_ID - }); #else wsproxyserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/wsproxy/game%d.wsproxy.cluster.json", {GAME_ID, GAME_ID}); @@ -84,7 +72,10 @@ std::shared_ptr JsonDataMgr::GetMasterServerClusterConf() return std::make_shared(masterserver_cluster_json_); } +#if MASTER_MODE +#else std::shared_ptr JsonDataMgr::GetTargetServerClusterConf() { return std::make_shared(targetserver_cluster_json_); } +#endif diff --git a/server/wsproxy/jsondatamgr.h b/server/wsproxy/jsondatamgr.h index bdc5bac..b70f95d 100644 --- a/server/wsproxy/jsondatamgr.h +++ b/server/wsproxy/jsondatamgr.h @@ -12,11 +12,16 @@ class JsonDataMgr : public a8::Singleton std::shared_ptr GetConf(); std::shared_ptr GetMasterServerClusterConf(); +#if MASTER_MODE +#else std::shared_ptr GetTargetServerClusterConf(); +#endif private: a8::XObject wsproxyserver_cluster_json_; a8::XObject masterserver_cluster_json_; +#if MASTER_MODE +#else a8::XObject targetserver_cluster_json_; - +#endif };