Beispiel #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);
        }
Beispiel #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);
            }
        }
 private void OnEntity(CreateEntityPacket p)
 {
     if (Entity != null) Entity.Invoke(this, new PacketEventArgs<CreateEntityPacket>(p));
 }
Beispiel #4
0
 public static void ReadEntity(TestClient client, PacketReader reader)
 {
     CreateEntityPacket ce = new CreateEntityPacket();
     ce.Read(reader);
 }