Esempio n. 1
0
        public override void OnPlace(GameClient Session, RoomItem Item)
        {
            RoomMusicController roomMusicController = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();

            roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(Item);
            roomMusicController.Stop();
            Session.GetHabbo().CurrentRoom.LoadMusic();
        }
Esempio n. 2
0
        public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRights)
        {
            RoomMusicController roomMusicController = HabboIM.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).GetRoomMusicController();

            roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(Item);

            if ((UserHasRights && (Session != null)) && (Item != null))
            {
                if (roomMusicController.IsPlaying)
                {
                    roomMusicController.Stop();
                }
                else
                {
                    roomMusicController.Start(Request);
                }
            }
        }
Esempio n. 3
0
        public RoomItem(uint uint_5, uint uint_6, uint BaseItem, string string_8, int int_5, int int_6, double double_1, int int_7, string string_9, Room class14_1)
        {
            this.Id               = uint_5;
            this.RoomId           = uint_6;
            this.BaseItem         = BaseItem;
            this.ExtraData        = string_8;
            this.mX               = int_5;
            this.mY               = int_6;
            this.mZ               = double_1;
            this.Rot              = int_7;
            this.string_7         = string_9;
            this.UpdateNeeded     = false;
            this.UpdateCounter    = 0;
            this.InteractingUser  = 0u;
            this.InteractingUser2 = 0u;
            this.TimerRunning     = false;
            this.string_1         = "none";
            //this.enum5_0 = RoomItem.Enum5.const_0;
            this.Extra1       = "";
            this.Extra2       = "";
            this.Extra3       = "";
            this.Extra4       = "";
            this.Extra5       = "";
            this.int_0        = 0;
            this.dictionary_1 = new Dictionary <RoomUser, int>();
            this.mBaseItem    = PhoenixEnvironment.GetGame().GetItemManager().GetItem(BaseItem);
            this.mRoom        = class14_1;
            if (this.GetBaseItem() == null)
            {
                Logging.LogException("Unknown baseID: " + BaseItem);
            }
            string text = this.GetBaseItem().InteractionType.ToLower();

            if (text != null)
            {
                if (!(text == "teleport"))
                {
                    if (!(text == "roller"))
                    {
                        if (!(text == "blue_score"))
                        {
                            if (!(text == "green_score"))
                            {
                                if (!(text == "red_score"))
                                {
                                    if (text == "yellow_score")
                                    {
                                        this.string_1 = "yellow";
                                    }
                                }
                                else
                                {
                                    this.string_1 = "red";
                                }
                            }
                            else
                            {
                                this.string_1 = "green";
                            }
                        }
                        else
                        {
                            this.string_1 = "blue";
                        }
                    }
                    else
                    {
                        this.mIsRoller      = true;
                        class14_1.Boolean_1 = true;
                    }
                }
                else
                {
                    this.ReqUpdate(0);
                }
            }
            if (text != null)
            {
                switch (text)
                {
                case "jukebox":
                    RoomMusicController roomMusicController = this.GetRoom().GetRoomMusicController();
                    roomMusicController.LinkRoomOutputItemIfNotAlreadyExits(this);
                    break;
                }
            }
            this.mIsWallItem     = (this.GetBaseItem().Type == 'i');
            this.mIsFloorItem    = (this.GetBaseItem().Type == 's');
            this.mAffectedPoints = this.GetRoom().GetAffectedTiles(this.GetBaseItem().Length, this.GetBaseItem().Width, this.mX, this.mY, int_7);
        }