Skip to content

Commit

Permalink
[MOD][CHRONO][FIX]
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienCoutault committed Nov 15, 2019
1 parent 2ac4ef7 commit 786d0dc
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/app/core/mods/fightchronometer/fightchronometer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { Logger } from "app/core/electron/logger.helper";
export class FightChronometer extends Mods {
private container : any;
private chronometerInitialized : boolean;
private alreadyCounting : boolean;
private chronometerInterval : any;
private chronometerContainer : any;

Expand Down Expand Up @@ -56,7 +55,6 @@ export class FightChronometer extends Mods {
this.container.insertBefore(this.chronometerContainer,
this.wGame.document.querySelector('.fightControlButtons'));
this.chronometerInitialized = true;
this.alreadyCounting = false;
} catch (ex) {
Logger.error(ex);
}
Expand All @@ -66,16 +64,12 @@ export class FightChronometer extends Mods {
if (!this.chronometerInitialized) {
this.create();
}
if (this.alreadyCounting) {
return;
}
let chronometerTime = 0;
try {
this.chronometerInterval = setInterval(() => {
if (this.wGame.gui.fightManager.fightState != 1) {
return;
}
this.alreadyCounting = true;
this.chronometerContainer.innerHTML = new Date(chronometerTime++ * 1000).toISOString().substr(11, 8);
}, 1000);
} catch (ex) {
Expand Down

0 comments on commit 786d0dc

Please sign in to comment.