blob: 245eedcf92a7feab01c73d06fe9b7f76609770de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
import { client } from "../client";
import { handleCharacterInfo } from "../client/handleCharacterInfo";
import { packetHandler } from "../packets/packetHandler";
/**
* Triggered by the ini button.
*/
export async function iniedit() {
const iniselect = <HTMLSelectElement>(
document.getElementById("client_iniselect")
);
const ininame = <HTMLInputElement>document.getElementById("client_ininame");
const inicharID = client.charID;
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;
|