Fix guide not getting updated in new DB

This commit is contained in:
Gent S 2020-12-13 09:59:56 -05:00
parent 05f4746af4
commit a1274756ce
2 changed files with 4 additions and 3 deletions

View File

@ -1128,7 +1128,7 @@ void Database::updatePlayer(Player *player) {
"Angle" = ?, "HP" = ?, "FusionMatter" = ?, "Taros" = ?, "Quests" = ?, "Angle" = ?, "HP" = ?, "FusionMatter" = ?, "Taros" = ?, "Quests" = ?,
"BatteryW" = ?, "BatteryN" = ?, "WarplocationFlag" = ?, "BatteryW" = ?, "BatteryN" = ?, "WarplocationFlag" = ?,
"SkywayLocationFlag" = ?, "CurrentMissionID" = ?, "SkywayLocationFlag" = ?, "CurrentMissionID" = ?,
"PayZoneFlag" = ?, "FirstUseFlag" = ? "PayZoneFlag" = ?, "FirstUseFlag" = ?, "Mentor" = ?
WHERE "PlayerID" = ? WHERE "PlayerID" = ?
)"; )";
sqlite3_stmt* stmt; sqlite3_stmt* stmt;
@ -1162,7 +1162,8 @@ void Database::updatePlayer(Player *player) {
sqlite3_bind_int(stmt, 17, player->CurrentMissionID); sqlite3_bind_int(stmt, 17, player->CurrentMissionID);
sqlite3_bind_int(stmt, 18, player->PCStyle2.iPayzoneFlag); sqlite3_bind_int(stmt, 18, player->PCStyle2.iPayzoneFlag);
sqlite3_bind_blob(stmt, 19, player->iFirstUseFlag, sizeof(player->iFirstUseFlag), NULL); 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) { if (sqlite3_step(stmt) != SQLITE_DONE) {
sqlite3_finalize(stmt); sqlite3_finalize(stmt);

View File

@ -78,7 +78,7 @@ void settings::init() {
ACCLEVEL = reader.GetInteger("shard", "accountlevel", ACCLEVEL); ACCLEVEL = reader.GetInteger("shard", "accountlevel", ACCLEVEL);
EVENTMODE = reader.GetInteger("shard", "eventmode", EVENTMODE); EVENTMODE = reader.GetInteger("shard", "eventmode", EVENTMODE);
EVENTCRATECHANCE = reader.GetInteger("shard", "eventcratechance", EVENTCRATECHANCE); EVENTCRATECHANCE = reader.GetInteger("shard", "eventcratechance", EVENTCRATECHANCE);
DISABLEFIRSTUSEFLAG = reader.GetInteger("shard", "disablefirstuseflag", DISABLEFIRSTUSEFLAG); DISABLEFIRSTUSEFLAG = reader.GetBoolean("shard", "disablefirstuseflag", DISABLEFIRSTUSEFLAG);
MONITORENABLED = reader.GetBoolean("monitor", "enabled", MONITORENABLED); MONITORENABLED = reader.GetBoolean("monitor", "enabled", MONITORENABLED);
MONITORPORT = reader.GetInteger("monitor", "port", MONITORPORT); MONITORPORT = reader.GetInteger("monitor", "port", MONITORPORT);
MONITORINTERVAL = reader.GetInteger("monitor", "interval", MONITORINTERVAL); MONITORINTERVAL = reader.GetInteger("monitor", "interval", MONITORINTERVAL);