summaryrefslogtreecommitdiff
path: root/src/routers/vault/types/LegacyChar.js
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2020-03-04 21:22:46 -0500
committergumi <git@gumi.ca>2020-03-04 21:22:46 -0500
commitecb8bd66d17592346c8855bb021dae802552dabf (patch)
tree47463d662934a09da88daf4dbd55008627f2a1c1 /src/routers/vault/types/LegacyChar.js
parent349053954d45e4625ab35e6b2383608e5132eba3 (diff)
downloadapi-ecb8bd66d17592346c8855bb021dae802552dabf.tar.gz
api-ecb8bd66d17592346c8855bb021dae802552dabf.tar.bz2
api-ecb8bd66d17592346c8855bb021dae802552dabf.tar.xz
api-ecb8bd66d17592346c8855bb021dae802552dabf.zip
pre-cache the game accounts on login
Diffstat (limited to 'src/routers/vault/types/LegacyChar.js')
-rw-r--r--src/routers/vault/types/LegacyChar.js21
1 files changed, 21 insertions, 0 deletions
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());
+ }
+}