aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2020-02-13 13:48:53 +0100
committersD <stoned@derpymail.org>2020-02-13 13:48:53 +0100
commit60431a062e262bfc92d61c933d54e5492d6b7c25 (patch)
tree7393fa4fadb7064a2e7241b8da982753c57bc1d2
parent420b31f4603b83dad48ba0082d94f73bfaee2f99 (diff)
fix ini js
-rw-r--r--webAO/client.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/webAO/client.js b/webAO/client.js
index ba9245d..3e30e03 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1100,19 +1100,19 @@ class Client extends EventEmitter {
/**
* Handles the server's assignment of a character for the player to use.
+ * PV # playerID (unused) # CID # character ID
* @param {Array} args packet arguments
*/
async handlePV(args) {
this.charID = Number(args[3]);
-
document.getElementById("client_charselect").style.display = "none";
const me = this.character;
this.selectedEmote = -1;
const emotes = this.emotes;
const emotesList = document.getElementById("client_emo");
- emotesList.innerHTML = ""; // Clear emote box
emotesList.style.display = "";
+ emotesList.innerHTML = ""; // Clear emote box
const ini = me.inifile;
me.side = ini.options.side;
updateActionCommands(me.side);
@@ -1872,10 +1872,11 @@ window.reloadTheme = reloadTheme;
/**
* Triggered by the ini button.
*/
-export function iniedit() {
+export async function iniedit() {
const ininame = document.getElementById("client_ininame").value;
- client.handleCharacterInfo(ininame.split("&"),client.charID);
- client.handlePV(("0#CID#" + client.charID).split("#"));
+ const inicharID = client.charID;
+ await client.handleCharacterInfo(ininame.split("&"),inicharID);
+ client.handlePV(("PV#0#CID#" + inicharID).split("#"));
}
window.iniedit = iniedit;