aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/changeRoleOOC.ts
blob: d838cb3ecc3957f835b12cd36df9e2cbfe2a86bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import { updateActionCommands } from './updateActionCommands'
import { client } from '../client'
/**
 * Change role via OOC.
 */
export function changeRoleOOC() {
    const roleselect = <HTMLInputElement>document.getElementById("role_select");

    client.sendOOC(`/pos ${roleselect.value}`);
    client.sendServer(`SP#${roleselect.value}#%`);
    updateActionCommands(roleselect.value);
}
window.changeRoleOOC = changeRoleOOC;