aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.js
diff options
context:
space:
mode:
authorstonedDiscord <stoned@derpymail.org>2020-02-13 13:51:26 +0100
committerGitHub <noreply@github.com>2020-02-13 13:51:26 +0100
commitb7e2fb43787129761706d1cf6376e335039e7ab7 (patch)
tree7393fa4fadb7064a2e7241b8da982753c57bc1d2 /webAO/client.js
parent02df4d38a588b1f3447a6264f04746489dc718e5 (diff)
parent60431a062e262bfc92d61c933d54e5492d6b7c25 (diff)
Merge pull request #45 from AttorneyOnline/iniedit
the cursed update
Diffstat (limited to 'webAO/client.js')
-rw-r--r--webAO/client.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 03a72cf..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);
@@ -1870,6 +1870,17 @@ export function reloadTheme() {
window.reloadTheme = reloadTheme;
/**
+ * Triggered by the ini button.
+ */
+export async function iniedit() {
+ const ininame = document.getElementById("client_ininame").value;
+ const inicharID = client.charID;
+ await client.handleCharacterInfo(ininame.split("&"),inicharID);
+ client.handlePV(("PV#0#CID#" + inicharID).split("#"));
+}
+window.iniedit = iniedit;
+
+/**
* Triggered when a character icon is clicked in the character selection menu.
* @param {MouseEvent} event
*/