mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-26 06:50:06 +00:00
Save Academy Nanos to DB
This commit is contained in:
parent
a99f95d15f
commit
027f513a23
@ -960,7 +960,7 @@ void Database::getPlayer(Player* plr, int id) {
|
|||||||
int id = sqlite3_column_int(stmt, 0);
|
int id = sqlite3_column_int(stmt, 0);
|
||||||
|
|
||||||
// for extra safety
|
// for extra safety
|
||||||
if (id > SIZEOF_NANO_BANK_SLOT)
|
if (id > NANO_COUNT)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
sNano* nano = &plr->Nanos[id];
|
sNano* nano = &plr->Nanos[id];
|
||||||
@ -1230,7 +1230,7 @@ void Database::updatePlayer(Player *player) {
|
|||||||
)";
|
)";
|
||||||
sqlite3_prepare_v2(db, sql, -1, &stmt, NULL);
|
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)
|
if (player->Nanos[i].iID == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user