Example #1
0
        // Token: 0x06001791 RID: 6033 RVA: 0x00029F20 File Offset: 0x00028F20
        public InstancedEvent CreateEvent(long eventSessionId, uint collectionKey, ConnectionSupport connectionSupport)
        {
            Collection collection = new Collection(collectionKey);

            if (!collection.IsValid())
            {
                collection.LoadVaultSync();
            }
            return(new InstancedEvent(this.internalManager.GetInternalInstancedEvent(), this.internalManager.GetInternalEvent(), eventSessionId, this, collection, connectionSupport));
        }
Example #2
0
 // Token: 0x06000267 RID: 615 RVA: 0x000047BA File Offset: 0x000037BA
 public virtual void OrderEventGrid(ConnectionSupport connectionSupport, EventGridPacket eventGrid)
 {
     InternalLobby._EASharpBinding_241(this.mSelf, (int)connectionSupport, object.ReferenceEquals(eventGrid, null) ? null : eventGrid._GetRaw());
 }
        internal InstancedEvent(InternalInstancedEvent internalInstancedEvent, InternalEvent internalEvent, long eventSessionId, Manager manager, Collection eventDef, ConnectionSupport connectionSupport) : base(internalEvent, manager, eventDef)
        {
            this.internalInstancedEvent = internalInstancedEvent;
            this.internalInstancedEvent.Ready(this);
            this.eventSessionId    = eventSessionId;
            this.trackLayoutDef    = new Collection(eventDef.TrackLayout());
            this.carClassDef       = new Collection(eventDef.CarClass());
            this.connectionSupport = connectionSupport;
            this.trackLayout       = new TrackLayout();
            string arbitratedPacketName = base.ScoringMethod.ArbitratedPacketName;

            if (!string.IsNullOrEmpty(arbitratedPacketName))
            {
                this.internalInstancedEvent.RegisterArbitrationListener(arbitratedPacketName);
            }
            if (this.eventDef.SpectateMethod() != null)
            {
                this.spectateMethod = Activator.CreateInstance <ISpectateMethod>(this.eventDef.SpectateMethod().GetKey());
            }
            this.routingMethod = Activator.CreateInstance <IRoutingMethod>(this.eventDef.RoutingMethod().GetKey());
        }