mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2025-11-30 04:20:06 +00:00
Database saving update (#104)
* implemented saving BatteryN and BatteryW * implemented saving mentor * moved int64->blob parsing to a separate function * moved parsing blob->int64 to a separate function * added functions for parsing int32->blob and vice versa * added functions for parsing int16->blob and vice versa * WIP saving quest items and active tasks * Quest items are stored in inventory table instead of blob * added sanity check for missionId * saving active missions works * removed unneccesary include * implemented saving warplocationflag, skywaylocationflag and currentmissionid in database * INFO DB message now shows how many accounts and player characters are in the database * fixed dbsaveinterval being in [login] instead of [shard] * fixed mission quit: - fixed wrong json name, causing qitems not deleting properly - quitting mission now resets npc kill count * adjusted saving active missions * removed blob parsing functions that ended up being unused * removed accidentaly added include * removed sending PCStyle2 on Player Enter * added a sanity check in itemMoveHandler * removed MapNum from PCLoad, as client doesn't even read it * set BuddyWarpCooldown to 60s on PCLoad * fixed a bug causing EXIT DUPLICATE not working * added creation and last login timestamps to accounts and players * added a sanity check for P_CL2LS_REQ_PC_EXIT_DUPLICATE * implemented web api support, toggled by new setting (off by default) * add usewebapi to config Co-authored-by: Gent <gentsemaj@live.com>
This commit is contained in:
@@ -7,6 +7,7 @@ int settings::VERBOSITY = 1;
|
||||
|
||||
int settings::LOGINPORT = 8001;
|
||||
bool settings::APPROVEALLNAMES = true;
|
||||
bool settings::USEWEBAPI = false;
|
||||
int settings::DBSAVEINTERVAL = 240;
|
||||
|
||||
int settings::SHARDPORT = 8002;
|
||||
@@ -41,9 +42,10 @@ void settings::init() {
|
||||
APPROVEALLNAMES = reader.GetBoolean("", "acceptallcustomnames", APPROVEALLNAMES);
|
||||
VERBOSITY = reader.GetInteger("", "verbosity", VERBOSITY);
|
||||
LOGINPORT = reader.GetInteger("login", "port", LOGINPORT);
|
||||
USEWEBAPI = reader.GetBoolean("login", "usewebapi", USEWEBAPI);
|
||||
SHARDPORT = reader.GetInteger("shard", "port", SHARDPORT);
|
||||
SHARDSERVERIP = reader.Get("shard", "ip", "127.0.0.1");
|
||||
DBSAVEINTERVAL = reader.GetInteger("login", "dbsaveinterval", DBSAVEINTERVAL);
|
||||
DBSAVEINTERVAL = reader.GetInteger("shard", "dbsaveinterval", DBSAVEINTERVAL);
|
||||
TIMEOUT = reader.GetInteger("shard", "timeout", TIMEOUT);
|
||||
PLAYERDISTANCE = reader.GetInteger("shard", "playerdistance", PLAYERDISTANCE);
|
||||
NPCDISTANCE = reader.GetInteger("shard", "npcdistance", NPCDISTANCE);
|
||||
|
||||
Reference in New Issue
Block a user