ggejs
Version:
A powerful Node.js module for interacting with the server of Goodgame Empire & Goodgame Empire: Four Kingdoms
27 lines (24 loc) • 760 B
JavaScript
const InteractiveMapobject = require("./InteractiveMapobject");
class CastleMapobject extends InteractiveMapobject {
/**
* @param {BaseClient} client
* @param {Array} data
*/
constructor(client, data) {
if (data.length <= 4) {
super(client, data.slice(0, 3));
if (data.length <= 3) return;
/** @type {number} */
this.occupierId = data[3];
} else {
super(client, data);
this.externalServerInformation = data[18];
}
}
parseAreaInfoBattleLog(data) {
super.parseAreaInfoBattleLog(data);
this.externalServerInformation = data.GSI;
return this;
}
}
module.exports = CastleMapobject;