summaryrefslogtreecommitdiff
path: root/src/routers/vault/types/LegacyAccount.js
blob: 0e1bc627936edfe03ae6016d17eaff9ba8537920 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
const GameAccount = require("./GameAccount.js");
const LegacyChar = require("./LegacyChar.js");

/**
 * represents a Legacy game account
 */
module.exports = class LegacyAccount extends GameAccount {
    /** account id of the target evol account (ported) */
    revoltId = null;
    /** reference to the EvolAccount of the target evol account */
    revoltAccount = null;
    /** Legacy game characters
     * @type {LegacyChar[]}
     */
    chars = [];

    /**
     * serialize for sending over the network
     * @param {*} key
     */
    toJSON (key) {
        return Object.assign({
            revoltId: this.revoltId,
        }, super.toJSON());
    }
}