From ecb8bd66d17592346c8855bb021dae802552dabf Mon Sep 17 00:00:00 2001 From: gumi Date: Wed, 4 Mar 2020 21:22:46 -0500 Subject: pre-cache the game accounts on login --- src/routers/vault/types/LegacyChar.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/routers/vault/types/LegacyChar.js (limited to 'src/routers/vault/types/LegacyChar.js') diff --git a/src/routers/vault/types/LegacyChar.js b/src/routers/vault/types/LegacyChar.js new file mode 100644 index 0000000..b893c3f --- /dev/null +++ b/src/routers/vault/types/LegacyChar.js @@ -0,0 +1,21 @@ +const Char = require("./Char.js"); + +/** + * represents a Legacy game char + */ +module.exports = class LegacyChar extends Char { + /** char id of the target evol char (ported) */ + revoltId = null; + /** reference to the EvolChar */ + revoltChar = null; + + /** + * serialize for sending over the network + * @param {*} key + */ + toJSON (key) { + return Object.assign({ + revoltId: this.revoltId, + }, super.toJSON()); + } +} -- cgit v1.2.3-60-g2f50