class info

master
Jordan Orelli 8 years ago
parent ba6a97fba8
commit fd10b27b90

@ -0,0 +1,21 @@
package main
import (
"fmt"
"github.com/golang/protobuf/proto"
"github.com/jordanorelli/hyperstone/dota"
)
type classInfo struct {
}
func (c *classInfo) handle(m proto.Message) {
v, ok := m.(*dota.CDemoClassInfo)
if !ok {
return
}
for _, class := range v.GetClasses() {
fmt.Printf("class-id: %d network-name: %s table-name: %s\n", class.GetClassId(), class.GetNetworkName(), class.GetTableName())
}
}

@ -194,6 +194,9 @@ func main() {
case "string-tables": case "string-tables":
st := newStringTables() st := newStringTables()
handle = st.handle handle = st.handle
case "class-info":
ci := new(classInfo)
handle = ci.handle
default: default:
bail(1, "no such action: %s", flag.Arg(0)) bail(1, "no such action: %s", flag.Arg(0))
} }

Loading…
Cancel
Save