diff options
| author | stonedDiscord <Tukz@gmx.de> | 2023-09-20 13:10:36 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2023-09-20 13:10:36 +0200 |
| commit | dda92bd41f4bee11e2cc5de265ce4fbf5221f1ff (patch) | |
| tree | bcb0f8121955ff815758b30ec4e24a1e6bde4fba /webAO/packets/handlers/handleHP.ts | |
| parent | 59028dd4046ad0715d80be8d1ed0031f20f05b7a (diff) | |
autoformat with eslint
Diffstat (limited to 'webAO/packets/handlers/handleHP.ts')
| -rw-r--r-- | webAO/packets/handlers/handleHP.ts | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/webAO/packets/handlers/handleHP.ts b/webAO/packets/handlers/handleHP.ts index f365590..81dee64 100644 --- a/webAO/packets/handlers/handleHP.ts +++ b/webAO/packets/handlers/handleHP.ts @@ -1,23 +1,22 @@ import { client } from "../../client"; - - /** - * Handles a change in the health bars' states. - * @param {Array} args packet arguments - */ +/** + * Handles a change in the health bars' states. + * @param {Array} args packet arguments + */ export const handleHP = (args: string[]) => { const percent_hp = Number(args[2]) * 10; let healthbox; if (args[1] === "1") { - // Def hp - client.hp[0] = Number(args[2]); - healthbox = document.getElementById("client_defense_hp"); + // Def hp + client.hp[0] = Number(args[2]); + healthbox = document.getElementById("client_defense_hp"); } else { - // Pro hp - client.hp[1] = Number(args[2]); - healthbox = document.getElementById("client_prosecutor_hp"); + // Pro hp + client.hp[1] = Number(args[2]); + healthbox = document.getElementById("client_prosecutor_hp"); } (<HTMLElement>( - healthbox.getElementsByClassName("health-bar")[0] + healthbox.getElementsByClassName("health-bar")[0] )).style.width = `${percent_hp}%`; - }
\ No newline at end of file +} |
