public void Update(Room Instance)
 {
     if (this.mIsPlaying && ((this.mSong == null) || (this.TimePlaying >= this.mSongLength)))
     {
         if (this.mPlaylist.Count == 0)
         {
             this.Stop();
             this.mRoomOutputItem.ExtraData = "0";
             this.mRoomOutputItem.UpdateState(true, true);
         }
         else
         {
             this.SetNextSong();
         }
         mBroadcastNeeded = true;
     }
     if (mBroadcastNeeded)
     {
         this.BroadcastCurrentSongData(Instance);
         mBroadcastNeeded = false;
     }
 }
		private static int smethod_0(Room class14_0)
		{
			return class14_0.UserCount;
		}
Beispiel #3
0
		internal Room GetRoom()
		{
			if (mRoom == null)
			{
				mRoom = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(RoomId);
			}
			return mRoom;
		}
Beispiel #4
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);
		}
Beispiel #5
0
		internal void UnloadRoom(Room Room)
		{
			if (Room != null)
			{
				this.Rooms.Remove(Room.RoomId);
				this.method_18(Room.RoomId);
				Room.method_62();
				if (PhoenixEnvironment.GetConfig().data["emu.messages.roommgr"] == "1")
				{
					Logging.WriteLine("[RoomMgr] Unloaded room [ID: " + Room.RoomId + "]");
				}
			}
		}
Beispiel #6
0
		internal Room LoadRoom(uint uint_0)
		{
			Room @class = null;
			Room result;
			try
			{
				lock (this.MAX_PETS_PER_ROOM)
				{
					if (this.IsRoomLoaded(uint_0))
					{
						result = this.GetRoom(uint_0);
						return result;
					}
					RoomData class2 = this.GenerateRoomData(uint_0);
					if (class2 == null)
					{
						result = null;
						return result;
					}
					@class = new Room(class2.Id, class2.Name, class2.Description, class2.Type, class2.Owner, class2.Category, class2.State, class2.UsersMax, class2.ModelName, class2.CCTs, class2.Score, class2.Tags, class2.AllowPet, class2.AllowPetsEating, class2.AllowWalkthrough, class2.Hidewall, class2.Icon, class2.Password, class2.Wallpaper, class2.Floor, class2.Landscape, class2, class2.bool_3, class2.Wallthick, class2.Floorthick, class2.Achievement);
					this.Rooms.Add(@class.RoomId, @class);
				}
			}
			catch
			{
				Logging.WriteLine("Error while loading room " + uint_0 + ", we crashed out..");
				result = null;
				return result;
			}
			@class.method_0();
			@class.method_1();
			result = @class;
			return result;
		}
 internal void BroadcastCurrentSongData(Room Instance)
 {
     if (this.mSong != null)
     {
         Instance.SendMessage(JukeboxDiscksComposer.ComposePlayingComposer(this.mSong.SongData.Id, this.mSongQueuePosition, 0), null);
     }
     else
     {
         Instance.SendMessage(JukeboxDiscksComposer.ComposePlayingComposer(0, 0, 0), null);
     }
 }
Beispiel #8
0
		public void Fill(Room Room)
		{
			this.Id = Room.RoomId;
			this.Name = Room.Name;
			this.Description = Room.Description;
			this.Type = Room.Type;
			this.Owner = Room.Owner;
			this.Category = Room.Category;
			this.State = Room.State;
			this.UsersNow = Room.UsersNow;
			this.UsersMax = Room.UsersMax;
			this.ModelName = Room.ModelName;
			this.CCTs = Room.CCTs;
			this.Score = Room.Score;
			this.Tags = Room.Tags;
			this.AllowPet = Room.AllowPet;
			this.AllowPetsEating = Room.AllowPetsEating;
			this.AllowWalkthrough = Room.AllowWalkthrough;
			this.Hidewall = Room.Hidewall;
			this.Wallthick = Room.Wallthick;
			this.Floorthick = Room.Floorthick;
			this.myIcon = Room.myIcon;
			this.Password = Room.Password;
			this.Event = Room.Event;
			this.Wallpaper = Room.Wallpaper;
			this.Floor = Room.Floor;
			this.Landscape = Room.Landscape;
			this.Achievement = Room.Achievement;
			this.class28_0 = PhoenixEnvironment.GetGame().GetRoomManager().GetModel(ModelName, Id);
		}
Beispiel #9
0
			public bool method_1(Room class14_0)
			{
				return class14_0.Category == this.int_0;
			}