1
This commit is contained in:
parent
815554bb04
commit
d37ea3972e
@ -5,14 +5,16 @@
|
||||
#include "jsondatamgr.h"
|
||||
#include "app.h"
|
||||
|
||||
static const char* WORK_PATH = "../config";
|
||||
|
||||
void JsonDataMgr::Init()
|
||||
{
|
||||
std::string masterserver_cluster_json_file = a8::Format
|
||||
("%s/node%d/game%d.masterserver.cluster.json",
|
||||
("%s/zone%d/node%d/masterserver.cluster.json",
|
||||
{
|
||||
work_path_,
|
||||
WORK_PATH,
|
||||
f8::App::Instance()->GetZoneId(),
|
||||
f8::App::Instance()->GetNodeId(),
|
||||
GAME_ID
|
||||
});
|
||||
masterserver_cluster_json_.ReadFromFile(masterserver_cluster_json_file);
|
||||
}
|
||||
|
@ -12,10 +12,6 @@ class JsonDataMgr : public a8::Singleton<JsonDataMgr>
|
||||
|
||||
std::shared_ptr<a8::XObject> GetConf();
|
||||
|
||||
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