This commit is contained in:
azw 2023-09-26 13:53:30 +00:00
parent 815554bb04
commit d37ea3972e
2 changed files with 5 additions and 7 deletions

View File

@ -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);
}

View 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_;
};