Exemple #1
0
 private static void handler_120147121(SessionInstance Session)
 {
     if (Time.GetDifference(Session.User.timespam_regalo_grande) >= 1)
     {
         TimeSpan tiempo = TimeSpan.FromSeconds(Time.GetDifference(Session.User.timespam_regalo_grande));
         Packet_183(Session, "¡Mega Regalo!\rPróximo regalo en: " + tiempo + "\rContenido: Objetos: Rare, Muy Rare, Casi Unicos, Unicos        vv Baja vv\rCreditos: 1k, 1.5k, 2.0k, 2.5k, 3.0k - 10k, 15k, 20k, 25k , 30k (Plata - Oro)\rPuntos: Shurikens: 10 - 25 - 35 - 50 || Coco: 10 - 25 - 35 - 50\rVIP: 1Mes || 3Meses || 6Meses");
     }
     if (Time.GetDifference(Session.User.timespam_regalo_grande) <= 0)
     {
         Session.User.timespam_regalo_grande = 0;
         Session.User.timespam_regalo_grande = Time.GetCurrentAndAdd(AddType.Horas, 8);
         UserManager.ActualizarEstadisticas(Session.User);
         Packet_120_147_121(Session);
         RegalosManager.Sistema_Regalos(Session);
     }
 }
Exemple #2
0
        public void Descalificar(SessionInstance Session)
        {
            if (Participantes.ContainsKey(Session.User.IDEspacial))
            {
                Session.User.Jugando = false;
                if (sala.Escenario.id == 2 && NSP == false)
                {
                    UserManager.Creditos(Session.User, true, false, Precio_Golden);
                    Session.User.sala_especial = false;
                }
                if (sala.Escenario.id == 3 && NSP == false)
                {
                    UserManager.Creditos(Session.User, false, false, Precio_Silver);
                    Session.User.sala_especial = false;
                }
                Participantes.Remove(Session.User.IDEspacial);
                if (MiniGamesManager.Inscripciones_Ring.ContainsKey(Session.User.id))
                {
                    MiniGamesManager.Inscripciones_Ring.Remove(Session.User.id);
                }
                if (Iniciado == true)
                {
                    if (Participantes.Count == 2)
                    {
                        ServerMessage server = new ServerMessage();
                        server.AddHead(160);
                        server.AddHead(123);
                        sala.SendData(server);
                    }
                }
                if (Participantes.Count == 1 && Iniciado == true)
                {
                    Ganador     = true;
                    Tiempo_Atas = 0;
                    SessionInstance SessionWin = null;
                    foreach (var win in Participantes.Values)
                    {
                        SessionWin = win;
                    }
                    CancelarInscripcion(Session);
                    CancelarInscripcion(SessionWin);
                    if (sala.Escenario.id == 2)///Golden Ring
                    {
                        SessionWin.User.sala_especial = false;
                        SessionWin.User.rings_ganados++;
                        SessionWin.User.toneos_ring++;
                        if (InterfazHandler.Cada_X_Goldens.Contains(SessionWin.User.rings_ganados))
                        {
                            RegalosManager.Sistema_Regalos(SessionWin);
                        }
                        SessionWin.User.Sala.ActualizarEstadisticas(SessionWin.User);
                        UserManager.Creditos(SessionWin.User, true, true, Recompensa_Golden);

                        ServerMessage server = new ServerMessage();
                        server.AddHead(160);
                        server.AddHead(129);
                        server.AppendParameter(0);
                        server.AppendParameter(0);
                        server.AppendParameter(SessionWin.User.nombre);
                        server.AppendParameter("Ha ganado: " + Recompensa_Golden + " créditos! Suma una victoria!");
                        sala.SendData(server);

                        RankingsManager.agregar_user_ranking(SessionWin.User.id, 1, 2, 1);
                    }
                    if (sala.Escenario.id == 3)//Silver Ring
                    {
                        SessionWin.User.sala_especial = false;
                        SessionWin.User.rings_ganados++;
                        SessionWin.User.Sala.ActualizarEstadisticas(SessionWin.User);
                        UserManager.Creditos(SessionWin.User, false, true, Recompensa_Silver);

                        if (InterfazHandler.Cada_X_Goldens.Contains(SessionWin.User.rings_ganados))
                        {
                            RegalosManager.Sistema_Regalos(SessionWin);
                        }

                        ServerMessage server = new ServerMessage();
                        server.AddHead(160);
                        server.AddHead(129);
                        server.AppendParameter(0);
                        server.AppendParameter(0);
                        server.AppendParameter(SessionWin.User.nombre);
                        server.AppendParameter("Ha ganado: " + Recompensa_Silver + " monedas de plata! Suma una victoria!");
                        sala.SendData(server);

                        RankingsManager.agregar_user_ranking(SessionWin.User.id, 1, 1, 1);
                    }
                    Participantes.Remove(SessionWin.User.IDEspacial);
                    SessionWin.User.Jugando = false;
                }
            }
        }
Exemple #3
0
 private static void handler_120137(SessionInstance Session)
 {
     Session.User.timespam_regalo_peque = 0;
     Session.User.timespam_regalo_peque = Time.GetCurrentAndAdd(AddType.Dias, 1);
     RegalosManager.mini_gift_manager(Session);
 }