From 94c85d99e47addc69a8dd35d685d19ffb8afebf3 Mon Sep 17 00:00:00 2001 From: gumi Date: Thu, 5 Mar 2020 23:03:30 -0500 Subject: oh how I wish this was typescript --- src/routers/vault/middlewares/legacy/account.js | 2 +- src/routers/vault/types/EvolChar.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/routers/vault') diff --git a/src/routers/vault/middlewares/legacy/account.js b/src/routers/vault/middlewares/legacy/account.js index 93fd831..b78317f 100644 --- a/src/routers/vault/middlewares/legacy/account.js +++ b/src/routers/vault/middlewares/legacy/account.js @@ -350,7 +350,7 @@ const migrate = async (req, res, next) => { accountId: evol_acc.accountId, hairColor: Math.floor(Math.random() * 21), // range: [0,21[ hair: (Math.floor(Math.random() * 28) + 1), // range: [1,28] - sex: char.sex === "F" ? "F" : (char.sex === "M" ? "M" : "U"), // non-binary is undefined in evol + sex: char.gender === "F" ? "F" : (char.gender === "M" ? "M" : "U"), // non-binary is undefined in evol }); } catch (err) { // char.name has a UNIQUE constraint but an actual collision would never happen diff --git a/src/routers/vault/types/EvolChar.js b/src/routers/vault/types/EvolChar.js index 1107d62..b6cf5a5 100644 --- a/src/routers/vault/types/EvolChar.js +++ b/src/routers/vault/types/EvolChar.js @@ -8,6 +8,8 @@ module.exports = class EvolChar extends Char { legacyId = null; /** reference to the LegacyChar */ legacyChar = null; + /** evol gender (different than tmwa) */ + gender = "U"; /** * serialize for sending over the network -- cgit v1.2.3-70-g09d2