dotabuff / manta

Dotabuff's Dota 2 Source 2 Replay Parser in Go
MIT License
619 stars 103 forks source link

Not getting any data output from parser #116

Open huertasdanny opened 4 years ago

huertasdanny commented 4 years ago

I'm having issues with getting any data out of my replays. For example my entity function doesn't seem to ever be called. `p.OnEntity(func(pe *manta.Entity, pet manta.EntityOp) error { log.Printf("Received entity packer %v", pe)

}) ` and neither is my combat log:

`p.Callbacks.OnCMsgDOTACombatLogEntry(func(m *dota.CMsgDOTACombatLogEntry) error { log.Printf("Received combat log entry %v", m) t := m.GetType() switch dota.DOTA_COMBATLOG_TYPES(t) { case dota.DOTA_COMBATLOG_TYPES_DOTA_COMBATLOG_DAMAGE: iat := m.GetIsAttackerIllusion() iah := m.GetIsAttackerHero() iti := m.GetIsTargetIllusion() ith := m.GetIsTargetHero() ivr := m.GetIsVisibleRadiant() ivd := m.GetIsVisibleDire() itb:= m.GetIsTargetBuilding()

        target, _ := p.LookupStringByIndex("CombatLogNames", int32(m.GetTargetName()))
        targetSource, _ := p.LookupStringByIndex("CombatLogNames", int32(m.GetTargetSourceName()))
        attacker, _ := p.LookupStringByIndex("CombatLogNames", int32(m.GetAttackerName()))
        damageSource, _ := p.LookupStringByIndex("CombatLogNames", int32(m.GetDamageSourceName()))
        inflictor, _ := p.LookupStringByIndex("CombatLogNames", int32(m.GetInflictorName()))
        value := m.GetValue()

        log.Printf("{\"type\":24,\"time\":\"%s\",\"iat\":%t,\"iah\":%t,\"iti\":%t,\"ith\":%t,\"ivr\":%t,\"ivd\":%t,\"itb\":%t,\"attacker\":\"%s\",\"target\":\"%s\",\"target_source\":\"%s\",\"damage_source\":\"%s\",\"inflictor\":\"%s\",\"value\":%d},", formatDuration(gameTime), iat, iah,iti,ith,ivr,ivd,itb,attacker,target,targetSource,damageSource,inflictor,value)

....... ` gameEventParsing.txt

I've attached the full file as well. Any help is greatly appreciated

SeregaSE commented 4 years ago

Do you find a solution? I got the same problem