Exemple #1
0
 static void GoRoom(SessionInstance Session, string[,] Parameters)
 {
     Thread.Sleep(new TimeSpan(0, 0, 0, 0, 500));
     if (Session.User != null)
     {
         if (Session.User.Sala != null)
         {
             return;
         }
         int id_sala = int.Parse(Parameters[1, 0]);
         if (int.Parse(Parameters[1, 0]) == 30 && int.Parse(Parameters[0, 0]) == 1)//Cementerio Entradas
         {
             Random rd    = new Random();
             int[]  areas = { 50, 46, 26, 30 };
             id_sala = areas[rd.Next(0, 4)];                                             //0+1+2+3
         }
         else if (int.Parse(Parameters[1, 0]) == 78 && int.Parse(Parameters[0, 0]) == 1) //Madriguera Entradas
         {
             Random rd    = new Random();
             int[]  areas = { 83, 82, 90, 84 };
             id_sala = areas[rd.Next(0, 4)];                                             //0+1+2+3
         }
         else if (int.Parse(Parameters[1, 0]) == 57 && int.Parse(Parameters[0, 0]) == 1) //Bosque Nevado Entradas
         {
             Random rd    = new Random();
             int[]  areas = { 60, 64, 72, 63 };
             id_sala = areas[rd.Next(0, 4)]; //0+1+2+3
         }
         if (!SalasManager.IrAlli(Session, int.Parse(Parameters[0, 0]), id_sala))
         {
             Packet_128_120(Session);
             Session.User.PreLock__Spamm_Areas = true;
         }
     }
 }
Exemple #2
0
 static void Validar_Clave_Acceso(SessionInstance Session, string[,] Parameters)
 {
     if (Session.User != null)
     {
         if (Session.User.PreLock__Proteccion_SQL == true)
         {
             return;
         }
         if (Session.User.Sala != null)
         {
             return;
         }
         mysql   client = new mysql();
         DataRow row    = client.ExecuteQueryRow("SELECT * FROM escenarios_privados WHERE id = '" + int.Parse(Parameters[0, 0]) + "'");
         if (row != null)
         {
             EscenarioInstance Escenario = new EscenarioInstance(row);
             if (Escenario.categoria != 2)
             {
                 return;
             }
             if (!string.IsNullOrEmpty(Escenario.Clave))
             {
                 if (Escenario.Clave != Parameters[1, 0])
                 {
                     Packet_189_123(Session);
                     return;
                 }
             }
             SalasManager.IrAlli(Session, Escenario.es_categoria, Escenario.id, null, true);
         }
         Session.User.PreLock__Proteccion_SQL = true;
     }
 }
Exemple #3
0
 static void GoRoom_Subareas(SessionInstance Session, string[,] Parameters)
 {
     Thread.Sleep(new TimeSpan(0, 0, 0, 0, 500));
     if (Session.User != null)
     {
         int Categoria = int.Parse(Parameters[0, 0]);
         if (Categoria == -1)
         {
             Categoria = 1;
         }
         if (Session.User.PreLock__Spamm_Areas == true)
         {
             return;
         }
         if (!SalasManager.IrAlli(Session, int.Parse(Parameters[0, 0]), int.Parse(Parameters[1, 0]), null, false))
         {
             Packet_128_120(Session);
             Session.User.PreLock__Spamm_Areas = true;
         }
     }
 }