Save Academy Nanos to DB

This commit is contained in:
dongresource 2020-12-21 01:54:14 +01:00 committed by Gent S
parent a99f95d15f
commit 027f513a23

View File

@ -960,7 +960,7 @@ void Database::getPlayer(Player* plr, int id) {
int id = sqlite3_column_int(stmt, 0);
// for extra safety
if (id > SIZEOF_NANO_BANK_SLOT)
if (id > NANO_COUNT)
continue;
sNano* nano = &plr->Nanos[id];
@ -1230,7 +1230,7 @@ void Database::updatePlayer(Player *player) {
)";
sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
for (int i = 0; i < SIZEOF_NANO_BANK_SLOT; i++) {
for (int i = 0; i < NANO_COUNT; i++) {
if (player->Nanos[i].iID == 0)
continue;