seemsGood

master
Jordan Orelli 8 years ago
parent 4eee79ee21
commit d55cd19ccb

@ -53,7 +53,7 @@ func (g *dataGram) check(dump bool) error {
} }
e := entFactory.BuildMessage(int(t)) e := entFactory.BuildMessage(int(t))
if e == nil { if e == nil {
fmt.Printf("\tno known entity for type id %d\n", int(t)) fmt.Printf("\tno known entity for type id %d size: %d\n", int(t), len(b))
continue continue
} }
err := proto.Unmarshal(b, e) err := proto.Unmarshal(b, e)

@ -46,17 +46,7 @@ var (
"EDotaUserMessages_DOTA_UM_TournamentDrop": "CMsgGCToClientTournamentItemDrop", "EDotaUserMessages_DOTA_UM_TournamentDrop": "CMsgGCToClientTournamentItemDrop",
"EDotaUserMessages_DOTA_UM_MatchMetadata": "CDOTAClientMsg_MatchMetadata", "EDotaUserMessages_DOTA_UM_MatchMetadata": "CDOTAClientMsg_MatchMetadata",
"ETEProtobufIds_TE_EffectDispatchId": "CMsgTEEffectDispatch", "ETEProtobufIds_TE_EffectDispatchId": "CMsgTEEffectDispatch",
} "EDemoCommands_DEM_SignonPacket": "CDemoPacket",
skipped = map[string]bool{
"EDemoCommands_DEM_IsCompressed": true,
"EDemoCommands_DEM_Max": true,
"EDotaUserMessages_DOTA_UM_MatchDetails": true,
"EBaseUserMessages_UM_ParticleManager": true,
"EBaseUserMessages_UM_CustomGameEvent": true,
"EDotaUserMessages_DOTA_UM_AddUnitToSelection": true,
"EBaseUserMessages_UM_HudError": true,
"EDotaUserMessages_DOTA_UM_CombatLogData": true,
"EDotaUserMessages_DOTA_UM_CharacterSpeakConcept": true,
} }
// EBaseUserMessages_UM_HandHapticPulse // EBaseUserMessages_UM_HandHapticPulse
tpl = `package main tpl = `package main
@ -240,9 +230,6 @@ func processPackage(name string, pkg *ast.Package) {
// given an enum name, finds the appropriate message type // given an enum name, finds the appropriate message type
func typeName(enumName string) string { func typeName(enumName string) string {
if skipped[enumName] {
return ""
}
if name, ok := specials[enumName]; ok { if name, ok := specials[enumName]; ok {
return name return name
} }
@ -286,6 +273,7 @@ func main() {
for id, name := range cmdTypes { for id, name := range cmdTypes {
realName := typeName(name) realName := typeName(name)
if realName == "" { if realName == "" {
fmt.Printf("no typename known for command enum name %s (%d)\n", name, id)
continue continue
} }
ctx.Commands[id] = realName ctx.Commands[id] = realName
@ -293,6 +281,7 @@ func main() {
for id, name := range entityTypes { for id, name := range entityTypes {
realName := typeName(name) realName := typeName(name)
if realName == "" { if realName == "" {
fmt.Printf("no typename known for entity enum name %s (%d)\n", name, id)
continue continue
} }
ctx.Entities[id] = realName ctx.Entities[id] = realName

@ -48,6 +48,7 @@ var cmdFactory = protoFactory{
5: func() proto.Message { return new(dota.CDemoClassInfo) }, 5: func() proto.Message { return new(dota.CDemoClassInfo) },
6: func() proto.Message { return new(dota.CDemoStringTables) }, 6: func() proto.Message { return new(dota.CDemoStringTables) },
7: func() proto.Message { return new(dota.CDemoPacket) }, 7: func() proto.Message { return new(dota.CDemoPacket) },
8: func() proto.Message { return new(dota.CDemoPacket) },
9: func() proto.Message { return new(dota.CDemoConsoleCmd) }, 9: func() proto.Message { return new(dota.CDemoConsoleCmd) },
10: func() proto.Message { return new(dota.CDemoCustomData) }, 10: func() proto.Message { return new(dota.CDemoCustomData) },
11: func() proto.Message { return new(dota.CDemoCustomDataCallbacks) }, 11: func() proto.Message { return new(dota.CDemoCustomDataCallbacks) },

Loading…
Cancel
Save