Esempio n. 1
0
 public override void Parse(SagaLib.Client client)
 {
     LoginClient client_ = (LoginClient)client;
     if (client_.pinging)
     {
         client_.mapServer.lastPong = DateTime.Now;
         client_.pinging = false;
         TimeSpan span = client_.mapServer.lastPong - client_.mapServer.lastPing;
         Logger.ShowInfo("Last Map ping value:" + span.TotalMilliseconds.ToString() + "ms");
     }
     else
     {
         Packets.Server.MapPong p = new SagaLogin.Packets.Server.MapPong();
         p.SetResult(1);
         LoginClient.CPGateway.netIO.SendPacket(p, LoginClient.CPGateway.SessionID);
     }
 }
Esempio n. 2
0
        public override void Parse(SagaLib.Client client)
        {
            LoginClient client_ = (LoginClient)client;

            if (client_.pinging)
            {
                client_.mapServer.lastPong = DateTime.Now;
                client_.pinging            = false;
                TimeSpan span = client_.mapServer.lastPong - client_.mapServer.lastPing;
                Logger.ShowInfo("Last Map ping value:" + span.TotalMilliseconds.ToString() + "ms");
            }
            else
            {
                Packets.Server.MapPong p = new SagaLogin.Packets.Server.MapPong();
                p.SetResult(1);
                LoginClient.CPGateway.netIO.SendPacket(p, LoginClient.CPGateway.SessionID);
            }
        }
Esempio n. 3
0
 public override void Parse(SagaLib.Client client)
 {
     try
     {
         foreach (CharServer i in LoginServer.charServerList.Values)
         {
             MapServer map = i.mapServers[0];
             Packets.Map.Send.MapPing p = new SagaLogin.Packets.Map.Send.MapPing();
             map.sClient.netIO.SendPacket(p, map.sClient.SessionID);
             LoginClient.CPGateway = (LoginClient)client;
             return;
         }
     }
     catch(Exception)
     {
         Packets.Server.MapPong p = new SagaLogin.Packets.Server.MapPong();
         p.SetResult(0);
         client.netIO.SendPacket(p, 0xFFFFFFFF);
     }
 }
Esempio n. 4
0
 public override void Parse(SagaLib.Client client)
 {
     try
     {
         foreach (CharServer i in LoginServer.charServerList.Values)
         {
             MapServer map = i.mapServers[0];
             Packets.Map.Send.MapPing p = new SagaLogin.Packets.Map.Send.MapPing();
             map.sClient.netIO.SendPacket(p, map.sClient.SessionID);
             LoginClient.CPGateway = (LoginClient)client;
             return;
         }
     }
     catch (Exception)
     {
         Packets.Server.MapPong p = new SagaLogin.Packets.Server.MapPong();
         p.SetResult(0);
         client.netIO.SendPacket(p, 0xFFFFFFFF);
     }
 }