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