public ServerAPI(string baseUrl, uint protocolVersion, ViewTimerManager timerManager, MonoBehaviour engine, ServerAPI.DesynHandler desyncHandler, ServerAPI.MessageHandler messageHandler) { this.SetDispatcher(baseUrl, engine); this.serverTimeOffset = 0; this.protocolVersion = protocolVersion; this.desyncHandler = desyncHandler; this.messageHandler = messageHandler; RequestId.Reset(); this.queue = new List <ICommand>(); this.keepAliveCommand = null; this.Enabled = true; this.ServerTime = 0u; this.ServerTimePrecise = 0.0; this.desyncMessages = new Dictionary <DesyncType, string>(); this.desyncMessages.Add(DesyncType.BatchMaxRetry, LangUtils.DESYNC_BATCH_MAX_RETRY); this.desyncMessages.Add(DesyncType.CommandMaxRetry, "DESYNC_COMMAND_MAX_RETRY"); this.desyncMessages.Add(DesyncType.CriticalCommandFail, "DESYNC_CRITICAL_COMMAND_FAIL"); this.desyncMessages.Add(DesyncType.ReceiptVerificationFailed, "DESYNC_RECEIPT_FAILED"); this.SessionId = Guid.NewGuid().ToString(); Service.Set <ServerAPI>(this); }
public unsafe static long $Invoke0(long instance, long *args) { RequestId.Reset(); return(-1L); }