Ejemplo n.º 1
0
        protected BaseFallingPhysics(WorldManager world, AbsWorldCoords pos)
        {
            World = world;
            Position = pos;
            EntityId = world.Server.AllocateEntity();

            CreateEntityPacket entity = new CreateEntityPacket { EntityId = EntityId };
            World.Server.SendPacketToNearbyPlayers(World,
                                                   UniversalCoords.FromAbsWorld(Position.X, Position.Y, Position.Z),
                                                   entity);
        }
Ejemplo n.º 2
0
        protected BlockBasePhysics(WorldManager world, Location pos)
        {
            World = world;
            Position = pos;
            EntityId = world.Server.AllocateEntity();

            CreateEntityPacket entity = new CreateEntityPacket { EntityId = EntityId };
            foreach (var nearbyPlayer in World.Server.GetNearbyPlayers(World, new AbsWorldCoords(Position.X, Position.Y, Position.Z)))
            {
                nearbyPlayer.SendPacket(entity);
            }
        }
Ejemplo n.º 3
0
 private void OnEntity(CreateEntityPacket p)
 {
     if (Entity != null) Entity.Invoke(this, new PacketEventArgs<CreateEntityPacket>(p));
 }
Ejemplo n.º 4
0
 public static void ReadEntity(TestClient client, PacketReader reader)
 {
     CreateEntityPacket ce = new CreateEntityPacket();
     ce.Read(reader);
 }