1
This commit is contained in:
parent
cf9a023a31
commit
70f0469b30
@ -8,24 +8,17 @@
|
||||
#include "jsondatamgr.h"
|
||||
#include "app.h"
|
||||
|
||||
static const char* WORK_PATH = "../config";
|
||||
|
||||
void JsonDataMgr::Init()
|
||||
{
|
||||
if (!f8::IsOnlineEnv()) {
|
||||
work_path_ = a8::Format
|
||||
("../../../conf_test/game%d/%s",
|
||||
{
|
||||
GAME_ID,
|
||||
f8::IsTestEnv() ? "wsproxy.test" : "wsproxy.dev"
|
||||
});
|
||||
}
|
||||
|
||||
std::string wsproxy_cluster_json_file;
|
||||
std::string master_cluster_json_file;
|
||||
std::string kcp_conf_json_file;
|
||||
wsproxy_cluster_json_file = a8::Format
|
||||
("%s/zone%d/node%d/game%d.wsproxy.cluster.json",
|
||||
{
|
||||
work_path_,
|
||||
WORK_PATH,
|
||||
f8::App::Instance()->GetZoneId(),
|
||||
f8::App::Instance()->GetNodeId(),
|
||||
GAME_ID
|
||||
@ -33,7 +26,7 @@ void JsonDataMgr::Init()
|
||||
master_cluster_json_file = a8::Format
|
||||
("%s/zone%d/node%d/game%d.masterserver.cluster.json",
|
||||
{
|
||||
work_path_,
|
||||
WORK_PATH,
|
||||
f8::App::Instance()->GetZoneId(),
|
||||
f8::App::Instance()->GetNodeId(),
|
||||
GAME_ID
|
||||
@ -41,7 +34,7 @@ void JsonDataMgr::Init()
|
||||
kcp_conf_json_file = a8::Format
|
||||
("%s/zone%d/kcp_conf.json",
|
||||
{
|
||||
work_path_,
|
||||
WORK_PATH,
|
||||
f8::App::Instance()->GetZoneId(),
|
||||
});
|
||||
|
||||
|
@ -36,7 +36,6 @@ class JsonDataMgr : public a8::Singleton<JsonDataMgr>
|
||||
void SetKcpSwitch(int is_open);
|
||||
|
||||
private:
|
||||
std::string work_path_ = "../config";
|
||||
a8::XObject wsproxy_cluster_json_;
|
||||
a8::XObject master_cluster_json_;
|
||||
a8::XObject kcp_conf_json_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user