aboutsummaryrefslogtreecommitdiff
path: root/webAO/packets/handlers/handleRT.ts
blob: 62ebb1eb387caccdf84494b813a6e4d1e089ded2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { client } from "../../client";
import { initTestimonyUpdater } from '../../viewport/utils/initTestimonyUpdater'

/**
  * Handles a testimony states.
  * @param {Array} args packet arguments
  */
export const handleRT = (args: string[]) => {
    const judgeid = Number(args[2]);
    switch (args[1]) {
        case "testimony1":
            client.testimonyID = 1;
            break;
        case "testimony2":
            // Cross Examination
            client.testimonyID = 2;
            break;
        case "judgeruling":
            client.testimonyID = 3 + judgeid;
            break;
        default:
            console.warn("Invalid testimony");
    }
    initTestimonyUpdater();
}