1
This commit is contained in:
parent
6169fc61b5
commit
d7555020b9
@ -9,32 +9,28 @@ void JsonDataMgr::Init()
|
|||||||
{
|
{
|
||||||
std::string masterserver_cluster_json_file;
|
std::string masterserver_cluster_json_file;
|
||||||
if (!f8::IsOnlineEnv()) {
|
if (!f8::IsOnlineEnv()) {
|
||||||
if (App::Instance()->flags.find(2) != App::Instance()->flags.end()) {
|
if (f8::IsTestEnv()) {
|
||||||
masterserver_cluster_json_file = a8::Format("/root/pub/%d/%d/conf_test/game%d/masterserver/node%d/"
|
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/masterserver.test",
|
||||||
"game%d.masterserver.cluster.json",
|
|
||||||
{
|
{
|
||||||
GAME_ID,
|
GAME_ID,
|
||||||
App::Instance()->instance_id,
|
App::Instance()->instance_id,
|
||||||
GAME_ID,
|
|
||||||
App::Instance()->node_id,
|
|
||||||
GAME_ID
|
GAME_ID
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
masterserver_cluster_json_file = a8::Format("/var/data/conf_test/game%d/masterserver/node%d/"
|
work_path_ = a8::Format("/root/pub/%d/%d/conf_test/game%d/masterserver.dev",
|
||||||
"game%d.masterserver.cluster.json",
|
|
||||||
{
|
{
|
||||||
GAME_ID,
|
GAME_ID,
|
||||||
App::Instance()->node_id,
|
App::Instance()->instance_id,
|
||||||
GAME_ID
|
GAME_ID
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
masterserver_cluster_json_file = a8::Format("../config/node%d/game%d.masterserver.cluster.json",
|
masterserver_cluster_json_file = a8::Format("%s/node%d/game%d.masterserver.cluster.json",
|
||||||
{
|
{
|
||||||
|
work_path_,
|
||||||
App::Instance()->node_id,
|
App::Instance()->node_id,
|
||||||
GAME_ID
|
GAME_ID
|
||||||
});
|
});
|
||||||
}
|
|
||||||
masterserver_cluster_json_.ReadFromFile(masterserver_cluster_json_file);
|
masterserver_cluster_json_.ReadFromFile(masterserver_cluster_json_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,8 @@ class JsonDataMgr : public a8::Singleton<JsonDataMgr>
|
|||||||
|
|
||||||
std::string ip;
|
std::string ip;
|
||||||
int listen_port = 0;
|
int listen_port = 0;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
std::string work_path_ = "../config";
|
||||||
a8::XObject masterserver_cluster_json_;
|
a8::XObject masterserver_cluster_json_;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user