From 805fd93b3ca66476e36aa956615bcbc12f4b7c8e Mon Sep 17 00:00:00 2001 From: gsemaj Date: Thu, 29 Apr 2021 15:59:39 -0400 Subject: [PATCH] Remove academy-specific tdata settings, add patch path --- config.ini | 4 ++-- src/TableData.cpp | 2 +- src/settings.cpp | 11 ++--------- src/settings.hpp | 2 +- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/config.ini b/config.ini index 0050f2d..ae60078 100644 --- a/config.ini +++ b/config.ini @@ -41,8 +41,6 @@ motd=Welcome to OpenFusion! #npcdata=tdata/NPCs.json # mob json #mobdata=tdata/mobs.json -# academy mobs & npcs json -#academydata=tdata/1013/academy.json # path json #pathdata=tdata/paths.json # drop json @@ -51,6 +49,8 @@ motd=Welcome to OpenFusion! #gruntwork=tdata/gruntwork.json # location of the database #dbpath=database.db +# location of the patch folder +#patchpath=tdata/patch # should tutorial flags be disabled off the bat? disablefirstuseflag=true diff --git a/src/TableData.cpp b/src/TableData.cpp index 82e4d21..c0b744d 100644 --- a/src/TableData.cpp +++ b/src/TableData.cpp @@ -985,7 +985,7 @@ void TableData::init() { fMobs.close(); fGruntwork.close(); - // TODO patching system + // patching // fetch data from patched tables and load them appropriately // note: the order of these is important diff --git a/src/settings.cpp b/src/settings.cpp index 7ab50e9..48a0aef 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -38,17 +38,10 @@ std::string settings::EGGSJSON = "tdata/eggs.json"; std::string settings::GRUNTWORKJSON = "tdata/gruntwork.json"; std::string settings::MOTDSTRING = "Welcome to OpenFusion!"; std::string settings::DBPATH = "database.db"; -std::string settings::ACADEMYJSON = "tdata/1013/academy.json"; - -#if PROTOCOL_VERSION == 1013 -std::string settings::XDTJSON = "tdata/1013/xdt.json"; -std::string settings::DROPSJSON = "tdata/1013/drops.json"; -std::string settings::PATHJSON = "tdata/1013/paths.json"; -#else +std::string settings::PATCHPATH = "tdata/patch"; std::string settings::DROPSJSON = "tdata/drops.json"; std::string settings::XDTJSON = "tdata/xdt.json"; std::string settings::PATHJSON = "tdata/paths.json"; -#endif int settings::ACCLEVEL = 1; bool settings::DISABLEFIRSTUSEFLAG = true; @@ -89,13 +82,13 @@ void settings::init() { NPCJSON = reader.Get("shard", "npcdata", NPCJSON); XDTJSON = reader.Get("shard", "xdtdata", XDTJSON); MOBJSON = reader.Get("shard", "mobdata", MOBJSON); - ACADEMYJSON = reader.Get("shard", "academydata", ACADEMYJSON); DROPSJSON = reader.Get("shard", "dropdata", DROPSJSON); EGGSJSON = reader.Get("shard", "eggdata", EGGSJSON); PATHJSON = reader.Get("shard", "pathdata", PATHJSON); GRUNTWORKJSON = reader.Get("shard", "gruntwork", GRUNTWORKJSON); MOTDSTRING = reader.Get("shard", "motd", MOTDSTRING); DBPATH = reader.Get("shard", "dbpath", DBPATH); + PATCHPATH = reader.Get("shard", "patchpath", PATCHPATH); ACCLEVEL = reader.GetInteger("shard", "accountlevel", ACCLEVEL); EVENTMODE = reader.GetInteger("shard", "eventmode", EVENTMODE); DISABLEFIRSTUSEFLAG = reader.GetBoolean("shard", "disablefirstuseflag", DISABLEFIRSTUSEFLAG); diff --git a/src/settings.hpp b/src/settings.hpp index 9fbe89a..5826578 100644 --- a/src/settings.hpp +++ b/src/settings.hpp @@ -19,12 +19,12 @@ namespace settings { extern std::string NPCJSON; extern std::string XDTJSON; extern std::string MOBJSON; - extern std::string ACADEMYJSON; extern std::string PATHJSON; extern std::string DROPSJSON; extern std::string EGGSJSON; extern std::string GRUNTWORKJSON; extern std::string DBPATH; + extern std::string PATCHPATH; extern int EVENTMODE; extern bool MONITORENABLED; extern int MONITORPORT;