aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2019-12-20 02:20:50 +0100
committersD <stoned@derpymail.org>2019-12-20 02:20:50 +0100
commit7bf5887892dc340ec40b9cba36adc5981b4b6fdd (patch)
tree8149c33699fed3a739c40a5cc45552710f0a73cc /webAO
parent43a68abd88b4307d629f3eaee4b83709a2688aba (diff)
implement decryptor and MM for the sake of completeness
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.js20
1 files changed, 19 insertions, 1 deletions
diff --git a/webAO/client.js b/webAO/client.js
index ca995d1..d1c2ad2 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -133,6 +133,7 @@ class Client extends EventEmitter {
this.on("LE", this.handleLE.bind(this));
this.on("EM", this.handleEM.bind(this));
this.on("SM", this.handleSM.bind(this));
+ this.on("MM", this.handleMM.bind(this));
this.on("BD", this.handleBD.bind(this));
this.on("DONE", this.handleDONE.bind(this));
this.on("BN", this.handleBN.bind(this));
@@ -144,6 +145,7 @@ class Client extends EventEmitter {
this.on("SI", this.handleSI.bind(this));
this.on("ARUP", this.handleARUP.bind(this));
this.on("CharsCheck", this.handleCharsCheck.bind(this));
+ this.on("decryptor", this.handleDecyrptor.bind(this));
this.on("PV", this.handlePV.bind(this));
this.on("CHECK", () => { });
@@ -688,6 +690,14 @@ class Client extends EventEmitter {
}
/**
+ * Handles the "MusicMode" packet
+ * @param {Array} args packet arguments
+ */
+ handleMM(args) {
+ // It's unused nowadays, as preventing people from changing the music is now serverside
+ }
+
+ /**
* Handles the kicked packet
* @param {Array} args kick reason
*/
@@ -867,7 +877,7 @@ class Client extends EventEmitter {
/**
* Handles the list of all used and vacant characters.
- * @param {Array} args packet arguments
+ * @param {Array} args list of all characters represented as a 0 for free or a -1 for taken
*/
handleCharsCheck(args) {
for (let i = 0; i < this.char_list_length; i++) {
@@ -887,6 +897,14 @@ class Client extends EventEmitter {
}
/**
+ * Decryptor for the command headers
+ * @param {Array} args packet arguments
+ */
+ handleDecryptor(_args) {
+ // unused since AO2
+ }
+
+ /**
* Handles the server's assignment of a character for the player to use.
* @param {Array} args packet arguments
*/