aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/sender/sendCharacter.ts
blob: 2db4dcd9b2eb640ab11ba307d6f37c94a666636e (plain)
1
2
3
4
5
6
7
8
9
10
11
import { client } from "../../client";

/**
 * Requests to play as a specified character.
 * @param {number} character the character ID
 */
export const sendCharacter = (character: number) => {
  if (character === -1 || client.chars[character].name) {
    client.sender.sendServer(`CC#${client.playerID}#${character}#web#%`);
  }
};