From a1274756ce8b4303f3fc957284a1adae6372acca Mon Sep 17 00:00:00 2001 From: Gent S Date: Sun, 13 Dec 2020 09:59:56 -0500 Subject: [PATCH] Fix guide not getting updated in new DB --- src/Database.cpp | 5 +++-- src/settings.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Database.cpp b/src/Database.cpp index 45b1b02..904eccd 100644 --- a/src/Database.cpp +++ b/src/Database.cpp @@ -1128,7 +1128,7 @@ void Database::updatePlayer(Player *player) { "Angle" = ?, "HP" = ?, "FusionMatter" = ?, "Taros" = ?, "Quests" = ?, "BatteryW" = ?, "BatteryN" = ?, "WarplocationFlag" = ?, "SkywayLocationFlag" = ?, "CurrentMissionID" = ?, - "PayZoneFlag" = ?, "FirstUseFlag" = ? + "PayZoneFlag" = ?, "FirstUseFlag" = ?, "Mentor" = ? WHERE "PlayerID" = ? )"; sqlite3_stmt* stmt; @@ -1162,7 +1162,8 @@ void Database::updatePlayer(Player *player) { sqlite3_bind_int(stmt, 17, player->CurrentMissionID); sqlite3_bind_int(stmt, 18, player->PCStyle2.iPayzoneFlag); sqlite3_bind_blob(stmt, 19, player->iFirstUseFlag, sizeof(player->iFirstUseFlag), NULL); - sqlite3_bind_int(stmt, 20, player->iID); + sqlite3_bind_int(stmt, 20, player->mentor); + sqlite3_bind_int(stmt, 21, player->iID); if (sqlite3_step(stmt) != SQLITE_DONE) { sqlite3_finalize(stmt); diff --git a/src/settings.cpp b/src/settings.cpp index 4d94a32..56db5c3 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -78,7 +78,7 @@ void settings::init() { ACCLEVEL = reader.GetInteger("shard", "accountlevel", ACCLEVEL); EVENTMODE = reader.GetInteger("shard", "eventmode", EVENTMODE); EVENTCRATECHANCE = reader.GetInteger("shard", "eventcratechance", EVENTCRATECHANCE); - DISABLEFIRSTUSEFLAG = reader.GetInteger("shard", "disablefirstuseflag", DISABLEFIRSTUSEFLAG); + DISABLEFIRSTUSEFLAG = reader.GetBoolean("shard", "disablefirstuseflag", DISABLEFIRSTUSEFLAG); MONITORENABLED = reader.GetBoolean("monitor", "enabled", MONITORENABLED); MONITORPORT = reader.GetInteger("monitor", "port", MONITORPORT); MONITORINTERVAL = reader.GetInteger("monitor", "interval", MONITORINTERVAL);