diff options
| author | Caleb Mabry <36182383+caleb-mabry@users.noreply.github.com> | 2023-02-01 15:54:26 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-01 15:54:26 -0500 |
| commit | 39edb1077725a6b9db58b4c32323e847ece5f2f6 (patch) | |
| tree | 2ab4e9d3c0a007684cb3fb706f70fc677e0f7eca /webAO/dom/iniEdit.ts | |
| parent | 0eabb5da1759439fd01e54dc986900448f483330 (diff) | |
| parent | f8ea065b5e6bccbebb918293e13cab4adb536b70 (diff) | |
Merge branch 'master' into fix-pipeline
Diffstat (limited to 'webAO/dom/iniEdit.ts')
| -rw-r--r-- | webAO/dom/iniEdit.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/webAO/dom/iniEdit.ts b/webAO/dom/iniEdit.ts index 359a226..b26c179 100644 --- a/webAO/dom/iniEdit.ts +++ b/webAO/dom/iniEdit.ts @@ -1,14 +1,18 @@ import { client } from "../client"; +import { handleCharacterInfo } from "../client/handleCharacterInfo"; import { packetHandler } from "../packets/packetHandler"; /** * Triggered by the ini button. */ export async function iniedit() { - const ininame = (<HTMLInputElement>document.getElementById("client_ininame")) - .value; + const iniselect = (<HTMLSelectElement>document.getElementById("client_iniselect")) + const ininame = (<HTMLInputElement>document.getElementById("client_ininame")); const inicharID = client.charID; - await client.handleCharacterInfo(ininame.split("&"), inicharID); + + const newname = iniselect.selectedIndex === 0 ? ininame.value : iniselect.value; + + await handleCharacterInfo(newname.split("&"), inicharID); packetHandler.get("PV")!(`PV#0#CID#${inicharID}`.split("#")); } window.iniedit = iniedit; |
