コード例 #1
0
        public void SendObjects(GameClient Session)
        {
            Room Room = Session.GetHabbo().CurrentRoom;

            Session.SendMessage(new HeightMapComposer(Room.GetGameMap().Model.Heightmap));
            Session.SendMessage(new FloorHeightMapComposer(Room.GetGameMap().Model.GetRelativeHeightmap(), Room.GetGameMap().StaticModel.WallHeight));

            foreach (RoomUser RoomUser in _roomUserManager.GetUserList().ToList())
            {
                if (RoomUser == null)
                {
                    continue;
                }

                Session.SendMessage(new UsersComposer(RoomUser));

                if (RoomUser.IsBot && RoomUser.BotData.DanceId > 0)
                {
                    Session.SendMessage(new DanceComposer(RoomUser, RoomUser.BotData.DanceId));
                }
                else if (!RoomUser.IsBot && !RoomUser.IsPet && RoomUser.IsDancing)
                {
                    Session.SendMessage(new DanceComposer(RoomUser, RoomUser.DanceId));
                }

                if (RoomUser.IsAsleep)
                {
                    Session.SendMessage(new SleepComposer(RoomUser, true));
                }

                if (RoomUser.CarryItemID > 0 && RoomUser.CarryTimer > 0)
                {
                    Session.SendMessage(new CarryObjectComposer(RoomUser.VirtualId, RoomUser.CarryItemID));
                }

                if (!RoomUser.IsBot && !RoomUser.IsPet && RoomUser.CurrentEffect > 0)
                {
                    Room.SendMessage(new AvatarEffectComposer(RoomUser.VirtualId, RoomUser.CurrentEffect));
                }
            }

            Session.SendMessage(new UserUpdateComposer(_roomUserManager.GetUserList().ToList()));
            Session.SendMessage(new ObjectsComposer(Room.GetRoomItemHandler().GetFloor.ToArray(), this));
            Session.SendMessage(new ItemsComposer(Room.GetRoomItemHandler().GetWall.ToArray(), this));
            Session.SendMessage(new SetCameraPicturePriceComposer(ExtraSettings.CAMERA_PRICECOINS, ExtraSettings.CAMERA_PRICEDUCKETS, ExtraSettings.CAMERA_PUBLISHPRICE));
        }
コード例 #2
0
        public void SendObjects(GameClient session)
        {
            session.SendPacket(new HeightMapComposer(GetGameMap().Model.Heightmap));
            session.SendPacket(new FloorHeightMapComposer(GetGameMap().Model.GetRelativeHeightmap(), GetGameMap().StaticModel.WallHeight));

            foreach (RoomUser user in _roomUserManager.GetUserList().ToList())
            {
                if (user == null)
                {
                    continue;
                }

                session.SendPacket(new UsersComposer(user));

                if (user.IsBot && user.BotData.DanceId > 0)
                {
                    session.SendPacket(new DanceComposer(user, user.BotData.DanceId));
                }
                else if (!user.IsBot && !user.IsPet && user.IsDancing)
                {
                    session.SendPacket(new DanceComposer(user, user.DanceId));
                }

                if (user.IsAsleep)
                {
                    session.SendPacket(new SleepComposer(user, true));
                }

                if (user.CarryItemId > 0 && user.CarryTimer > 0)
                {
                    session.SendPacket(new CarryObjectComposer(user.VirtualId, user.CarryItemId));
                }

                if (!user.IsBot && !user.IsPet && user.CurrentEffect > 0)
                {
                    session.SendPacket(new AvatarEffectComposer(user.VirtualId, user.CurrentEffect));
                }
            }

            session.SendPacket(new UserUpdateComposer(_roomUserManager.GetUserList().ToList()));
            session.SendPacket(new ObjectsComposer(GetRoomItemHandler().GetFloor.ToArray(), this));
            session.SendPacket(new ItemsComposer(GetRoomItemHandler().GetWall.ToArray(), this));
        }
コード例 #3
0
        public void SendObjects(GameClient Session)
        {
            Room Room = Session.GetHabbo().CurrentRoom;

            Session.SendMessage(new HeightMapComposer(Room.GetGameMap().Model.Heightmap));
            Session.SendMessage(new FloorHeightMapComposer(Room.GetGameMap().Model.GetRelativeHeightmap(), Room.GetGameMap().StaticModel.WallHeight));

            foreach (RoomUser RoomUser in _roomUserManager.GetUserList().ToList())
            {
                if (RoomUser == null)
                {
                    continue;
                }

                bool LoadBot  = true;
                bool ShowUser = true;

                if (RoomUser.IsBot)
                {
                    if (RoomUser.GetBotRoleplay() != null)
                    {
                        if (RoomUser.GetBotRoleplay().Invisible)
                        {
                            LoadBot = false;
                        }
                    }
                }


                if (LoadBot)
                {
                    if (RoomUser.IsBot)
                    {
                        Session.SendMessage(new UsersComposer(RoomUser));
                    }
                    else
                    {
                        if (RoomUser.GetClient() != null)
                        {
                            if (RoomUser.GetClient().GetRoleplay() != null)
                            {
                                if (RoomUser.GetClient().GetRoleplay().Invisible)
                                {
                                    ShowUser = false;
                                }
                            }
                        }
                    }

                    if (Session.GetRoomUser() == null)
                    {
                        return;
                    }

                    if (this.TutorialEnabled)
                    {
                        ShowUser = false;
                    }

                    if (ShowUser)
                    {
                        Session.SendMessage(new UsersComposer(RoomUser));
                    }
                    else
                    {
                        Session.SendMessage(new UsersComposer(Session.GetRoomUser()));
                    }
                }

                if (RoomUser.IsBot && RoomUser.BotData.DanceId > 0)
                {
                    Session.SendMessage(new DanceComposer(RoomUser, RoomUser.BotData.DanceId));
                }
                else if (!RoomUser.IsBot && !RoomUser.IsPet && RoomUser.IsDancing)
                {
                    Session.SendMessage(new DanceComposer(RoomUser, RoomUser.DanceId));
                }

                if (RoomUser.IsAsleep)
                {
                    Session.SendMessage(new SleepComposer(RoomUser, true));
                }

                if (RoomUser.CarryItemID > 0 && RoomUser.CarryTimer > 0)
                {
                    Session.SendMessage(new CarryObjectComposer(RoomUser.VirtualId, RoomUser.CarryItemID));
                }

                if (!RoomUser.IsBot && !RoomUser.IsPet && RoomUser.CurrentEffect > 0)
                {
                    Room.SendMessage(new AvatarEffectComposer(RoomUser.VirtualId, RoomUser.CurrentEffect));
                }
            }

            Session.SendMessage(new UserUpdateComposer(_roomUserManager.GetUserList().ToList()));
            Session.SendMessage(new ObjectsComposer(Session, Room.GetRoomItemHandler().GetFloor.ToArray(), this));
            Session.SendMessage(new ItemsComposer(Room.GetRoomItemHandler().GetWall.ToArray(), this));
        }