示例#1
0
 public ObjetoLanzadoInstance(int key, ItemConcursoInstance Item, Posicion Pos, SalaInstance Sala)
 {
     this.key  = key;
     this.Item = Item;
     this.Pos  = Pos;
     this.Sala = Sala;
     this.LanzarObjeto();
 }
示例#2
0
 private static void Packet(SessionInstance Session, TimeSpan Time, SalaInstance Sala, Posicion Posicion = null, bool UsingLook = false)
 {
     Thread.Sleep(Time);
     if (Session.User == null)
     {
         return;
     }
     if (Session.User.Sala == null)
     {
         return;
     }
     if (Session.User.Sala.id == Sala.id && Session.User.Sala.Escenario.categoria == Sala.Escenario.categoria)
     {
         if (Posicion != null)
         {
             Session.User.Posicion = Posicion;
         }
         else
         {
             Session.User.Posicion = new Posicion(0, 0, 4);
         }
         if (UsingLook)
         {
             ServerMessage server = new ServerMessage();
             server.AddHead(135);
             server.AppendParameter(Session.User.IDEspacial);
             server.AppendParameter(Session.User.Posicion.x);
             server.AppendParameter(Session.User.Posicion.y);
             server.AppendParameter(Session.User.Posicion.z);
             Session.User.Sala.SendData(server, Session);
         }
         else
         {
             ServerMessage server = new ServerMessage();
             server.AddHead(182);
             server.AppendParameter(1);
             server.AppendParameter(Session.User.IDEspacial);
             server.AppendParameter(Session.User.Posicion.x);
             server.AppendParameter(Session.User.Posicion.y);
             server.AppendParameter(Session.User.Posicion.z);
             server.AppendParameter(750);
             server.AppendParameter(1);
             Sala.SendData(server);
         }
     }
 }