Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect data parsed for match 5909829384 #130

Open
hptruong93 opened this issue Mar 28, 2021 · 1 comment
Open

Incorrect data parsed for match 5909829384 #130

hptruong93 opened this issue Mar 28, 2021 · 1 comment

Comments

@hptruong93
Copy link

I tried to parse replay 5909829384. My code is simple

f, err := os.Open(root + "\\" + replayFile)
if err != nil {
    log.Fatalf("unable to open file: %s", err)
}
defer f.Close()

p, err := manta.NewStreamParser(f)
if err != nil {
    log.Fatalf("unable to create parser: %s", err)
}

p.Callbacks.OnCMsgDOTACombatLogEntry(func(m *dota.CMsgDOTACombatLogEntry) error {
        t := m.GetType()
        if (t != dota.DOTA_COMBATLOG_TYPES_DOTA_COMBATLOG_DEATH) {
            return nil
        }
        if (!m.GetIsTargetHero()) {
            return nil
        }
        if (m.GetIsTargetIllusion()) {
            return nil
        }

        raw := m.GetTimestampRaw()
        target, attacker := int(m.GetTargetName()), int(m.GetAttackerName())
        log.Printf("%v kills %v at %v", attacker, target, m.GetTimestampRaw())
        return nil
})

p.Start()
log.Printf("Parse Complete!\n")

The first 3 entries printed were
7 kills 11 at 566.8334
17 kills 13 at 590.8334
15 kills 11 at 648.7

Which suggests that the second kill is 24s after first blood, and the third kill is 82s after first blood. This is completely off with the kill timing in the replay.

@hptruong93
Copy link
Author

Note that this problem only occurred with this particular match. I've used the same code on other matches and it's been working fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant