code: func (p *Parser) onCMsgSource1LegacyGameEvent(m *dota.CMsgSource1LegacyGameEvent) error {
  	// Look up the handler name by event id.
  	name, ok := p.gameEventNames[m.GetEventid()]
  	if !ok {
  		return _errorf("unknown event id: %d", m.GetEventid())
  	}
  
  	// Get the handlers for the event name. Return early if none.
  	handlers := p.gameEventHandlers[name]
  	if handlers == nil {
  		return nil
  	}
  
  	// Get the type for the event.
  	t, ok := p.gameEventTypes[name]
  	if !ok {
  		return _errorf("unknown event type: %s", name)
  	}
  
  	// Create a GameEvent, offer to all handlers.
  	e := &GameEvent{t: t, m: m}
  	for _, h := range handlers {
  		if err := h(e); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Internal handler for callback OnCMsgSource1LegacyGameEvent.
  // Looks up the name and type of an event and offers it to registered handlers.