Exemplo n.º 1
0
        private static void Pulse(TimeSpan elapsedTime, IGameClient client)
        {
            if (client?.Aisling != null)
            {
                ObjectComponent.UpdateClientObjects(client.Aisling);
            }

            client?.Update(elapsedTime);
        }
        public void UpdateClients(TimeSpan elapsedTime)
        {
            lock (Clients)
            {
                foreach (var client in Clients.Where(client => client?.Aisling != null))
                {
                    ObjectComponent.UpdateClientObjects(client.Aisling);

                    if (!client.IsWarping)
                    {
                        Pulse(elapsedTime, client);
                    }
                    else if (client.IsWarping && !client.InMapTransition)
                    {
                        if (client.CanSendLocation && !client.IsRefreshing &&
                            client.Aisling.CurrentMapId == ServerContextBase.Config.PVPMap)
                        {
                            client.SendLocation();
                        }
                    }
                }
            }
        }
Exemplo n.º 3
0
        private async Task Pulse(TimeSpan elapsedTime, GameClient client)
        {
            await client.Update(elapsedTime);

            ObjectComponent.UpdateClientObjects(client.Aisling);
        }