fix: give an extra trade when leveling up MR
All checks were successful
Build / build (22) (push) Successful in 44s
Build / build (20) (push) Successful in 1m15s
Build / build (18) (push) Successful in 1m19s
Build / build (20) (pull_request) Successful in 44s
Build / build (18) (pull_request) Successful in 1m17s
Build / build (22) (pull_request) Successful in 1m20s
All checks were successful
Build / build (22) (push) Successful in 44s
Build / build (20) (push) Successful in 1m15s
Build / build (18) (push) Successful in 1m19s
Build / build (20) (pull_request) Successful in 44s
Build / build (18) (pull_request) Successful in 1m17s
Build / build (22) (pull_request) Successful in 1m20s
This commit is contained in:
parent
b93a4a6dae
commit
f05b1003cc
@ -23,7 +23,7 @@ const trainingResultController: RequestHandler = async (req, res): Promise<void>
|
|||||||
|
|
||||||
const trainingResults = getJSONfromString<ITrainingResultsRequest>(String(req.body));
|
const trainingResults = getJSONfromString<ITrainingResultsRequest>(String(req.body));
|
||||||
|
|
||||||
const inventory = await getInventory(accountId);
|
const inventory = await getInventory(accountId, "TrainingDate PlayerLevel TradesRemaining");
|
||||||
|
|
||||||
if (trainingResults.numLevelsGained == 1) {
|
if (trainingResults.numLevelsGained == 1) {
|
||||||
let time = Date.now();
|
let time = Date.now();
|
||||||
@ -33,6 +33,7 @@ const trainingResultController: RequestHandler = async (req, res): Promise<void>
|
|||||||
inventory.TrainingDate = new Date(time);
|
inventory.TrainingDate = new Date(time);
|
||||||
|
|
||||||
inventory.PlayerLevel += 1;
|
inventory.PlayerLevel += 1;
|
||||||
|
inventory.TradesRemaining += 1;
|
||||||
|
|
||||||
await createMessage(accountId, [
|
await createMessage(accountId, [
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user