From ac944ad6bea8e75235691f7dc300c7326bfff0f0 Mon Sep 17 00:00:00 2001 From: Jordan Orelli Date: Wed, 3 Aug 2016 19:47:27 -0400 Subject: [PATCH] observe specials --- gen/main.go | 6 ++++++ generated.go | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gen/main.go b/gen/main.go index 13976a2..106fee8 100644 --- a/gen/main.go +++ b/gen/main.go @@ -240,6 +240,12 @@ func processPackage(name string, pkg *ast.Package) { // given an enum name, finds the appropriate message type func typeName(enumName string) string { + if skipped[enumName] { + return "" + } + if name, ok := specials[enumName]; ok { + return name + } for prefix, replacement := range prefixes { if strings.HasPrefix(enumName, prefix) { candidate := strings.Replace(enumName, prefix, replacement, 1) diff --git a/generated.go b/generated.go index 2e53251..1d0069b 100644 --- a/generated.go +++ b/generated.go @@ -48,6 +48,7 @@ var cmdFactory = protoFactory{ 5: func() proto.Message { return new(dota.CDemoClassInfo) }, 6: func() proto.Message { return new(dota.CDemoStringTables) }, 7: func() proto.Message { return new(dota.CDemoPacket) }, + 8: func() proto.Message { return new(dota.CDemoPacket) }, 9: func() proto.Message { return new(dota.CDemoConsoleCmd) }, 10: func() proto.Message { return new(dota.CDemoCustomData) }, 11: func() proto.Message { return new(dota.CDemoCustomDataCallbacks) }, @@ -136,7 +137,6 @@ var entFactory = protoFactory{ 142: func() proto.Message { return new(dota.CUserMessageCloseCaptionPlaceholder) }, 143: func() proto.Message { return new(dota.CUserMessageCameraTransition) }, 144: func() proto.Message { return new(dota.CUserMessageAudioParameter) }, - 200: func() proto.Message { return new(dota.CMsgVDebugGameSessionIDEvent) }, 201: func() proto.Message { return new(dota.CMsgPlaceDecalEvent) }, 202: func() proto.Message { return new(dota.CMsgClearWorldDecalsEvent) }, 203: func() proto.Message { return new(dota.CMsgClearEntityDecalsEvent) }, @@ -179,6 +179,7 @@ var entFactory = protoFactory{ 494: func() proto.Message { return new(dota.CDOTAUserMsg_ItemFound) }, 496: func() proto.Message { return new(dota.CDOTAUserMsg_SwapVerify) }, 497: func() proto.Message { return new(dota.CDOTAUserMsg_WorldLine) }, + 498: func() proto.Message { return new(dota.CMsgGCToClientTournamentItemDrop) }, 499: func() proto.Message { return new(dota.CDOTAUserMsg_ItemAlert) }, 500: func() proto.Message { return new(dota.CDOTAUserMsg_HalloweenDrops) }, 501: func() proto.Message { return new(dota.CDOTAUserMsg_ChatWheel) }, @@ -221,6 +222,7 @@ var entFactory = protoFactory{ 538: func() proto.Message { return new(dota.CDOTAUserMsg_SpeechBubble) }, 539: func() proto.Message { return new(dota.CDOTAUserMsg_CustomHeaderMessage) }, 540: func() proto.Message { return new(dota.CDOTAUserMsg_QuickBuyAlert) }, + 541: func() proto.Message { return new(dota.CDOTAUserMsg_StatsHeroMinuteDetails) }, 542: func() proto.Message { return new(dota.CDOTAUserMsg_PredictionResult) }, 543: func() proto.Message { return new(dota.CDOTAUserMsg_ModifierAlert) }, 544: func() proto.Message { return new(dota.CDOTAUserMsg_HPManaAlert) }, @@ -233,7 +235,9 @@ var entFactory = protoFactory{ 551: func() proto.Message { return new(dota.CDOTAUserMsg_CompendiumState) }, 552: func() proto.Message { return new(dota.CDOTAUserMsg_ProjectionAbility) }, 553: func() proto.Message { return new(dota.CDOTAUserMsg_ProjectionEvent) }, + 554: func() proto.Message { return new(dota.CMsgDOTACombatLogEntry) }, 555: func() proto.Message { return new(dota.CDOTAUserMsg_XPAlert) }, 556: func() proto.Message { return new(dota.CDOTAUserMsg_UpdateQuestProgress) }, + 557: func() proto.Message { return new(dota.CDOTAClientMsg_MatchMetadata) }, 559: func() proto.Message { return new(dota.CDOTAUserMsg_QuestStatus) }, }