public void SendInitialTime(bool async = true) { Packet packet = new TimeUpdatePacket { Time = _player.World.Time }; if (async) SendPacket(packet); else Send_Sync_Packet(packet); }
public void SendInitialTime(bool async = true) { Packet packet = new TimeUpdatePacket { AgeWorld = 0, //Todo get Server or World time inTick Time = _player.World.Time }; if (async) SendPacket(packet); else Send_Sync_Packet(packet); }
private void OnTimeUpdate(TimeUpdatePacket p) { if (TimeUpdate != null) TimeUpdate.Invoke(this, new PacketEventArgs<TimeUpdatePacket>(p)); }
public void BroadcastTimeUpdate(IWorldManager world) { Client[] authClients = GetAuthenticatedClients() as Client[]; if (authClients.Length == 0) return; TimeUpdatePacket packet = new TimeUpdatePacket {AgeOfWorld = 0, Time = world.Time}; packet.SetShared(Logger, authClients.Length); Parallel.ForEach(authClients, (client) => client.SendPacket(packet)); }
public static void ReadTimeUpdate(TestClient client, PacketReader reader) { TimeUpdatePacket tu = new TimeUpdatePacket(); tu.Read(reader); }