aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/sender/sendCharacter.ts
blob: eed6a99ab23f2dd517878f254f98ec16745db74f (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] && client.chars[character].name)) {
    client.sender.sendServer(`CC#${client.playerID}#${character}#web#%`);
  }
};