web icon indicating copy to clipboard operation
web copied to clipboard

Timing Bug on Draft Tab

Open markcaldropoli opened this issue 7 years ago • 6 comments

On the draft tab of a Captain's Mode game, it is incorrectly showing the time for the first ban of the draft. I attached a few screenshots below.

Example 1:

Screen Shot 2019-04-20 at 11 47 07 PM

Example 2:

Screen Shot 2019-04-20 at 11 47 46 PM

Example 3:

Screen Shot 2019-04-20 at 11 48 06 PM

markcaldropoli avatar Apr 21 '19 03:04 markcaldropoli

Probably the replay format changed somewhere, we'll have to look at the replay contents.

howardchung avatar Apr 21 '19 07:04 howardchung

https://github.com/odota/core/blob/master/processors/processDraftTimings.js

howardchung avatar Apr 21 '19 07:04 howardchung

Probably the replay format changed somewhere, we'll have to look at the replay contents.

Hi! I tried to debug this issue and I found out that in processDraftTimings.js, the calculation of draft timings is (time of last draft minus to time of current draft) and if it is calculating the first draft, it should be (time of the beginning of draft stage minus time of current draft). But instead, it's just passing the time of current draft that's why we're getting this issue of having -700s or more value instead. drattimings

I think the solution for this is have the odota/parser record the start time of draft stage and pass it to the processDraftTimings.js to calculate the time of first draft correctly. I tried to run the Clarity Analyzer and I think I find a way to record the start time in case it is not yet implemented in odota/parser. I'm just wondering how can I run the odota/parser to my local machine and make the parser service call it instead of the production odota/parser so that I can make code changes and test it locally?

lancebendo avatar May 03 '19 05:05 lancebendo

I believe you can clone the odota/parser repo, make the edit in the Java code, then rebuild the docker container with docker build . -t odota/parser

Then try restarting your docker-compose stack and it should run your local version instead

If that doesn't work there might be a few other options

howardchung avatar May 03 '19 05:05 howardchung

You might have to delete the old odota-parser container

howardchung avatar May 03 '19 05:05 howardchung

Okay I'll give it a try. Thanks!

lancebendo avatar May 03 '19 05:05 lancebendo