step 10.1: done
This commit is contained in:
@@ -129,12 +129,12 @@ function startExpedition(characterId, defId) {
|
||||
const endsAt = startedAt + (def.duration_sec * 1000);
|
||||
|
||||
// Execute inside a transaction.
|
||||
const doStart = db.transaction((nc, ne, eat, cid, defid, sat) => {
|
||||
const doStart = db.transaction((cid, ne, eat, defid, sat, endAt) => {
|
||||
s.updateEnergy.run(ne, eat, cid);
|
||||
s.insertExpedition.run(cid, defid, sat, eat);
|
||||
s.insertExpedition.run(cid, defid, sat, endAt);
|
||||
});
|
||||
|
||||
doStart(newEnergy, def.energy_cost, endsAt, characterId, defId, startedAt);
|
||||
doStart(characterId, newEnergy, updatedAtMs, defId, startedAt, endsAt);
|
||||
|
||||
// Read back the just-inserted expedition (latest active for this character).
|
||||
const inserted = s.activeExpedition.get(characterId);
|
||||
|
||||
Reference in New Issue
Block a user