code: func (p *Parser) onCMsgSource1LegacyGameEventList(m *dota.CMsgSource1LegacyGameEventList) error {
  	for _, d := range m.GetDescriptors() {
  		t := &gameEventType{
  			eventId: d.GetEventid(),
  			name:    d.GetName(),
  			fields:  make(map[string]*gameEventField),
  		}
  		for i, k := range d.GetKeys() {
  			t.fields[k.GetName()] = &gameEventField{
  				i: int(i),
  				n: k.GetName(),
  				t: k.GetType(),
  			}
  		}
  		p.gameEventNames[d.GetEventid()] = d.GetName()
  		p.gameEventTypes[d.GetName()] = t
  	}
  
  	return nil
  }
docs: // Internal handler for callback OnCMsgSource1LegacyGameEventList.
  // Registers game event names and types with the parser for O(1) lookup later.