diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-08-31 20:31:54 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-08-31 20:31:54 +0200 |
| commit | d124c7466ec13dc0353edeb5fab49f03f3035b5e (patch) | |
| tree | 8f278b39e51fa5d3b738bd2d47c6f3b1d123ca9c /webAO/packets/handlers/handleRT.ts | |
| parent | 1847fcf939c4a079b2f016df212e2b6c832aa2e5 (diff) | |
| parent | da992f9b3623955ef777c343a9f2c7b81d8ca942 (diff) | |
Merge branch 'master' of https://github.com/AttorneyOnline/webAO
Diffstat (limited to 'webAO/packets/handlers/handleRT.ts')
| -rw-r--r-- | webAO/packets/handlers/handleRT.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/webAO/packets/handlers/handleRT.ts b/webAO/packets/handlers/handleRT.ts new file mode 100644 index 0000000..5bbf2b2 --- /dev/null +++ b/webAO/packets/handlers/handleRT.ts @@ -0,0 +1,25 @@ +import { client } from "../../client"; + + +/** + * 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"); + } + client.viewport.initTestimonyUpdater(); +}
\ No newline at end of file |
