public void parse(GameClient Session, ClientMessage Event)
		{
			try
			{
				Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
				if (@class != null && @class.CheckRights(Session, true) && @class.MoodlightData != null)
				{
					ServerMessage Message = new ServerMessage(365u);
					Message.AppendInt32(@class.MoodlightData.Presets.Count);
					Message.AppendInt32(@class.MoodlightData.CurrentPreset);
					int num = 0;
					foreach (MoodlightPreset current in @class.MoodlightData.Presets)
					{
						num++;
						Message.AppendInt32(num);
						Message.AppendInt32(int.Parse(PhoenixEnvironment.BoolToEnum(current.BackgroundOnly)) + 1);
						Message.AppendStringWithBreak(current.ColorCode);
						Message.AppendInt32(current.ColorIntensity);
					}
					Session.SendMessage(Message);
				}
			}
			catch
			{
			}
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			RoomUser roomUserByHabbo = room.GetRoomUserByHabbo(Session.GetHabbo().Id);
			roomUserByHabbo.Unidle();
			int i = Event.PopWiredInt32();
            
            if (i < 0 || i > 4 || (!Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club") && i > 1))
			{
				i = 0;
			}
			if (i > 0 && roomUserByHabbo.CarryItemID > 0)
			{
				roomUserByHabbo.CarryItem(0);
			}
			roomUserByHabbo.DanceId = i;
			ServerMessage Message = new ServerMessage(480);
			Message.AppendInt32(roomUserByHabbo.VirtualId);
			Message.AppendInt32(i);
			room.SendMessage(Message, null);
			
            if (Session.GetHabbo().CurrentQuestId == 6)
			{
				PhoenixEnvironment.GetGame().GetQuestManager().ProgressUserQuest(6, Session);
			}
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			DataTable dataTable_ = Session.GetHabbo().GroupMemberships;
			if (dataTable_ != null)
			{
				ServerMessage Message = new ServerMessage(915u);
				Message.AppendInt32(dataTable_.Rows.Count);
				foreach (DataRow dataRow in dataTable_.Rows)
				{
                    Group @class = GroupManager.GetGroup((int)dataRow["groupid"]);
					Message.AppendInt32(@class.Id);
					Message.AppendStringWithBreak(@class.Name);
					Message.AppendStringWithBreak(@class.Badge);
					if (Session.GetHabbo().GroupID == @class.Id) // is favorite group?
					{
						Message.AppendBoolean(true);
					}
					else
					{
						Message.AppendBoolean(false);
					}
				}
				Session.SendMessage(Message);
			}
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session != null && Session.GetHabbo() != null)
			{
				Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
				if (@class != null)
				{
					RoomUser class2 = @class.GetRoomUserByHabbo(Event.PopWiredUInt());
					if (class2 != null && !class2.IsBot && class2.GetClient() != null)
					{
						ServerMessage Message = new ServerMessage(228u);
						Message.AppendUInt(class2.GetClient().GetHabbo().Id);
						Message.AppendInt32(class2.GetClient().GetHabbo().GetBadgeComponent().EquippedCount);
						using (TimedLock.Lock(class2.GetClient().GetHabbo().GetBadgeComponent().BadgeList))
						{
							foreach (Badge current in class2.GetClient().GetHabbo().GetBadgeComponent().BadgeList)
							{
								if (current.Slot > 0)
								{
									Message.AppendInt32(current.Slot);
									Message.AppendStringWithBreak(current.Code);
								}
							}
						}
						Session.SendMessage(Message);
					}
				}
			}
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			int num = Event.PopWiredInt32();
			ServerMessage Message = new ServerMessage(300);
			Message.AppendInt32(num);
			if (num > 0)
			{
				for (int i = 0; i < num; i++)
				{
					int num2 = Event.PopWiredInt32();
                    if (num2 > 0)
                    {
                        /*Soundtrack @class = GoldTree.GetGame().GetItemManager().method_4(num2);
                        Message.AppendInt32(@class.Id);
                        Message.AppendStringWithBreak(@class.Name);
                        Message.AppendStringWithBreak(@class.Track);
                        Message.AppendInt32(@class.Length);
                        Message.AppendStringWithBreak(@class.Author);*/

                        Message.AppendInt32(SongManager.GetSong(num2).Id);
                        Message.AppendStringWithBreak(SongManager.GetSong(num2).Name);
                        Message.AppendStringWithBreak(SongManager.GetSong(num2).Track);
                        Message.AppendInt32(SongManager.GetSong(num2).Length);
                        Message.AppendStringWithBreak(SongManager.GetSong(num2).Author);
                    }
				}
			}
			Session.SendMessage(Message);
		}
		public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
		{
			if (UserHasRight)
			{
				ServerMessage Message = new ServerMessage(650);
				Message.AppendInt32(0);
				Message.AppendInt32(5);
				Message.AppendInt32(0);
				Message.AppendInt32(Item.GetBaseItem().SpriteId);
				Message.AppendUInt(Item.Id);
				Message.AppendStringWithBreak("");
				Message.AppendString("I");
				if (Item.Extra2.Length > 0)
				{
					Message.AppendString(Item.Extra2);
				}
				else
				{
					Message.AppendString("RB");
				}
				Message.AppendStringWithBreak("HRAH");
				Session.SendMessage(Message);
				Item.ReqUpdate(1);
			}
		}
        public void GiveBadge(GameClient Session, string Badge, Boolean InDatabase)
		{
			this.GiveBadge(Badge, 0, InDatabase);
			ServerMessage Message = new ServerMessage(832);
			Message.AppendInt32(1);
			Message.AppendInt32(4);
			Message.AppendInt32(1);
			Message.AppendUInt(PhoenixEnvironment.GetGame().GetAchievementManager().BadgeID(Badge));
			Session.SendMessage(Message);
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			Session.GetHabbo().GetBadgeComponent().ResetSlots();
			using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
			{
				adapter.ExecuteQuery("UPDATE user_badges SET badge_slot = '0' WHERE user_id = '" + Session.GetHabbo().Id + "'");
				goto IL_131;
			}
			IL_52:
			int num = Event.PopWiredInt32();
			string text = Event.PopFixedString();
			if (text.Length != 0)
			{
				if (!Session.GetHabbo().GetBadgeComponent().HasBadge(text) || num < 1 || num > 5)
				{
					return;
				}
				if (Session.GetHabbo().CurrentQuestId == 16u)
				{
					PhoenixEnvironment.GetGame().GetQuestManager().ProgressUserQuest(16u, Session);
				}
				Session.GetHabbo().GetBadgeComponent().GetBadge(text).Slot = num;
				using (DatabaseClient @class = PhoenixEnvironment.GetDatabase().GetClient())
				{
					@class.AddParamWithValue("slotid", num);
					@class.AddParamWithValue("badge", text);
					@class.AddParamWithValue("userid", Session.GetHabbo().Id);
					@class.ExecuteQuery("UPDATE user_badges SET badge_slot = @slotid WHERE badge_id = @badge AND user_id = @userid LIMIT 1");
				}
			}
			IL_131:
			if (Event.RemainingLength > 0)
			{
				goto IL_52;
			}
			ServerMessage Message = new ServerMessage(228u);
			Message.AppendUInt(Session.GetHabbo().Id);
			Message.AppendInt32(Session.GetHabbo().GetBadgeComponent().EquippedCount);
			foreach (Badge current in Session.GetHabbo().GetBadgeComponent().BadgeList)
			{
				if (current.Slot > 0)
				{
					Message.AppendInt32(current.Slot);
					Message.AppendStringWithBreak(current.Code);
				}
			}
			if (Session.GetHabbo().InRoom && PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId) != null)
			{
				PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId).SendMessage(Message, null);
			}
			else
			{
				Session.SendMessage(Message);
			}
		}
		public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
		{
			if (UserHasRight && Session != null)
			{
				Item.method_10();
				ServerMessage Message = new ServerMessage(651);
				Message.AppendInt32(0);
				Message.AppendInt32(5);
				if (Item.Extra1.Length > 0)
				{
					Message.AppendString(Item.Extra1);
				}
				else
				{
					Message.AppendInt32(0);
				}
				Message.AppendInt32(Item.GetBaseItem().SpriteId);
				Message.AppendUInt(Item.Id);
				Message.AppendStringWithBreak("");
				Message.AppendInt32(0);
				Message.AppendInt32(0);
				Message.AppendInt32(0);
				Message.AppendInt32(0);
				Message.AppendInt32(0);
				Message.AppendStringWithBreak("");
				Session.SendMessage(Message);
			}
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
			if (@class != null && @class.CheckRights(Session, true))
			{
				ServerMessage Message = new ServerMessage(465u);
				Message.AppendUInt(@class.RoomId);
				Message.AppendStringWithBreak(@class.Name);
				Message.AppendStringWithBreak(@class.Description);
				Message.AppendInt32(@class.State);
				Message.AppendInt32(@class.Category);
				Message.AppendInt32(@class.UsersMax);
				Message.AppendInt32(100);
				Message.AppendInt32(@class.Tags.Count);
				foreach (string current in @class.Tags)
				{
					Message.AppendStringWithBreak(current);
				}
				Message.AppendInt32(@class.UsersWithRights.Count);
				foreach (uint current2 in @class.UsersWithRights)
				{
					Message.AppendUInt(current2);
					Message.AppendStringWithBreak(PhoenixEnvironment.GetGame().GetClientManager().GetNameById(current2));
				}
				Message.AppendInt32(@class.UsersWithRights.Count);
				Message.AppendBoolean(@class.AllowPet);
				Message.AppendBoolean(@class.AllowPetsEating);
				Message.AppendBoolean(@class.AllowWalkthrough);
				Message.AppendBoolean(@class.Hidewall);
				Message.AppendInt32(@class.Wallthick);
				Message.AppendInt32(@class.Floorthick);
				Session.SendMessage(Message);
			}
		}
Exemple #11
0
		public void Serialize(ServerMessage Message)
		{
			Message.AppendInt32(BackgroundImage);
			Message.AppendInt32(ForegroundImage);
			Message.AppendInt32(Items.Count);
			foreach (KeyValuePair<int, int> Item in Items)
			{
				Message.AppendInt32(Item.Key);
				Message.AppendInt32(Item.Value);
			}
		}
 public void parse(GameClient Session, ClientMessage Request)
 {
     string motto = PhoenixEnvironment.FilterInjectionChars(Request.PopFixedString());
     if (motto.Length <= 50 && !(motto != ChatCommandHandler.ApplyWordFilter(motto)) && !(motto == Session.GetHabbo().Motto))
     {
         Session.GetHabbo().Motto = motto;
         using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
         {
             adapter.AddParamWithValue("motto", motto);
             adapter.ExecuteQuery("UPDATE users SET motto = @motto WHERE Id = '" + Session.GetHabbo().Id + "' LIMIT 1");
         }
         if (Session.GetHabbo().CurrentQuestId == 17)
         {
             PhoenixEnvironment.GetGame().GetQuestManager().ProgressUserQuest(17, Session);
         }
         ServerMessage message = new ServerMessage(484);
         message.AppendInt32(-1);
         message.AppendStringWithBreak(Session.GetHabbo().Motto);
         Session.SendMessage(message);
         if (Session.GetHabbo().InRoom)
         {
             Room currentRoom = Session.GetHabbo().CurrentRoom;
             if (currentRoom == null)
             {
                 return;
             }
             RoomUser roomUserByHabbo = currentRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
             if (roomUserByHabbo == null)
             {
                 return;
             }
             ServerMessage message2 = new ServerMessage(266);
             message2.AppendInt32(roomUserByHabbo.VirtualId);
             message2.AppendStringWithBreak(Session.GetHabbo().Look);
             message2.AppendStringWithBreak(Session.GetHabbo().Gender.ToLower());
             message2.AppendStringWithBreak(Session.GetHabbo().Motto);
             message2.AppendInt32(Session.GetHabbo().AchievementScore);
             message2.AppendStringWithBreak("");
             currentRoom.SendMessage(message2, null);
         }
         PhoenixEnvironment.GetGame().GetAchievementManager().UnlockAchievement(Session, 5, 1);
         if (Session.GetHabbo().FriendStreamEnabled)
         {
             using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
             {
                 adapter.AddParamWithValue("motto", motto);
                 string look = PhoenixEnvironment.FilterInjectionChars(Session.GetHabbo().Look);
                 adapter.AddParamWithValue("look", look);
                 adapter.ExecuteQuery("INSERT INTO `friend_stream` (`id`, `type`, `userid`, `gender`, `look`, `time`, `data`) VALUES (NULL, '3', '" + Session.GetHabbo().Id + "', '" + Session.GetHabbo().Gender + "', @look, UNIX_TIMESTAMP(), @motto);");
             }
         }
     }
 }
		public void parse(GameClient Session, ClientMessage Event)
		{
			ServerMessage Message = new ServerMessage(323);
			Message.AppendUInt(Session.GetHabbo().CurrentRoomId);
			Message.AppendInt32(1);
			Message.AppendInt32(1);
			Message.AppendInt32(1);
			Message.AppendStringWithBreak("Watercolour");
			Message.AppendStringWithBreak("Pendulum");
			Message.AppendInt32(1);
			Session.SendMessage(Message);
		}
 public static ServerMessage Compose(int PlaylistCapacity, List<SongInstance> Playlist)
 {
     ServerMessage message = new ServerMessage(334);
     message.AppendInt32(PlaylistCapacity);
     message.AppendInt32(Playlist.Count);
     foreach (SongInstance instance in Playlist)
     {
         message.AppendInt32(instance.DiskItem.itemID);
         message.AppendInt32(instance.SongData.Id);
     }
     return message;
 }
		public void AddEffect(int EffectId, int Duration)
		{
			using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
			{
				adapter.ExecuteQuery("INSERT INTO user_effects (user_id,effect_id,total_duration,is_activated,activated_stamp) VALUES ('" + UserId + "','" + EffectId + "','" + Duration + "','0','0')");
			}
			this.Effects.Add(new AvatarEffect(EffectId, Duration, false, 0.0));
			ServerMessage Message = new ServerMessage(461);
			Message.AppendInt32(EffectId);
			Message.AppendInt32(Duration);
			this.GetClient().SendMessage(Message);
		}
 public static ServerMessage SerializeSongInventory(Hashtable songs)
 {
     ServerMessage message = new ServerMessage(258);
     message.AppendInt32(songs.Count);
     foreach (UserItem item in songs.Values)
     {
         int i = Convert.ToInt32(item.ExtraData);
         message.AppendInt32((int)item.Id);
         message.AppendInt32(i);
     }
     return message;
 }
 public void parse(GameClient Session, ClientMessage Request)
 {
     ServerMessage message = new ServerMessage(267);
     message.AppendBoolean(Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"));
     if (Session.GetHabbo().GetSubscriptionManager().HasSubscription("habbo_club"))
     {
         using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
         {
             adapter.AddParamWithValue("userid", Session.GetHabbo().Id);
             DataTable Row = adapter.ReadDataTable("SELECT slot_id, look, gender FROM user_wardrobe WHERE user_id = @userid;");
             if (Row == null)
             {
                 message.AppendInt32(0);
             }
             else
             {
                 message.AppendInt32(Row.Rows.Count);
                 foreach (DataRow row in Row.Rows)
                 {
                     message.AppendUInt((uint)row["slot_id"]);
                     message.AppendStringWithBreak((string)row["look"]);
                     message.AppendStringWithBreak((string)row["gender"]);
                 }
             }
         }
         Session.SendMessage(message);
     }
     else
     {
         using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
         {
             adapter.AddParamWithValue("userid", Session.GetHabbo().Id);
             DataTable Row = adapter.ReadDataTable("SELECT slot_id, look, gender FROM user_wardrobe WHERE user_id = @userid;");
             if (Row == null)
             {
                 message.AppendInt32(0);
             }
             else
             {
                 message.AppendInt32(Row.Rows.Count);
                 foreach (DataRow row in Row.Rows)
                 {
                     message.AppendUInt((uint)row["slot_id"]);
                     message.AppendStringWithBreak((string)row["look"]);
                     message.AppendStringWithBreak((string)row["gender"]);
                 }
             }
         }
         Session.SendMessage(message);
     }
 }
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session != null && Session.GetHabbo() != null && Session.GetHabbo().LoadingRoom > 0u)
			{
				Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().LoadingRoom);
				if (@class != null && Session.GetHabbo().GroupID > 0)
				{
                    Group class2 = GroupManager.GetGroup(Session.GetHabbo().GroupID);
					if (class2 != null && [email protected]_17.Contains(class2))
					{
						@class.list_17.Add(class2);
						ServerMessage Message = new ServerMessage(309u);
						Message.AppendInt32(@class.list_17.Count);
                        foreach (Group current in @class.list_17)
						{
							Message.AppendInt32(current.Id);
							Message.AppendStringWithBreak(current.Badge);
						}
						@class.SendMessage(Message, null);
					}
					else
					{
                        foreach (Group current2 in @class.list_17)
						{
							if (current2 == class2 && current2.Badge != class2.Badge)
							{
								ServerMessage Message = new ServerMessage(309u);
								Message.AppendInt32(@class.list_17.Count);
                                foreach (Group current in @class.list_17)
								{
									Message.AppendInt32(current.Id);
									Message.AppendStringWithBreak(current.Badge);
								}
								@class.SendMessage(Message, null);
							}
						}
					}
				}
				if (@class != null && @class.list_17.Count > 0)
				{
					ServerMessage Message = new ServerMessage(309u);
					Message.AppendInt32(@class.list_17.Count);
                    foreach (Group current in @class.list_17)
					{
						Message.AppendInt32(current.Id);
						Message.AppendStringWithBreak(current.Badge);
					}
					Session.SendMessage(Message);
				}
			}
		}
		public override void OnTrigger(GameClient Session, RoomItem Item, int Request, bool UserHasRight)
		{
			if (UserHasRight)
			{
				ServerMessage Message = new ServerMessage(651);
				Message.AppendInt32(0);
				Message.AppendInt32(5);
				Message.AppendInt32(1);
				Message.AppendUInt(Item.Id);
				Message.AppendInt32(Item.GetBaseItem().SpriteId);
				Message.AppendUInt(Item.Id);
				Session.SendMessage(Message);
			}
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			ServerMessage Message = new ServerMessage(5);
			Message.AppendStringWithBreak(Session.GetHabbo().Id.ToString());
			Message.AppendStringWithBreak(Session.GetHabbo().Username);
			Message.AppendStringWithBreak(Session.GetHabbo().Look);
			Message.AppendStringWithBreak(Session.GetHabbo().Gender.ToUpper());
			Message.AppendStringWithBreak(Session.GetHabbo().Motto);
			Message.AppendStringWithBreak(Session.GetHabbo().RealName);
			Message.AppendBoolean(false);
			Message.AppendInt32(Session.GetHabbo().Respect);
			Message.AppendInt32(Session.GetHabbo().DailyRespectPoints);
			Message.AppendInt32(Session.GetHabbo().DailyPetRespectPoints);
			Message.AppendBoolean(false);
			Session.SendMessage(Message);
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room class14_ = Session.GetHabbo().CurrentRoom;
			if (class14_ != null)
			{
				Event.PopWiredUInt();
				string string_ = Event.PopFixedString();
				RoomUser @class = class14_.GetRoomUserByHabbo(string_);
				if (@class != null)
				{
					uint uint_ = @class.GetClient().GetHabbo().Id;
					if (Session.GetHabbo().MutedUsers.Contains(uint_))
					{
						Session.GetHabbo().MutedUsers.Remove(uint_);
						using (DatabaseClient class2 = PhoenixEnvironment.GetDatabase().GetClient())
						{
							class2.ExecuteQuery(string.Concat(new object[]
							{
								"DELETE FROM user_ignores WHERE user_id = ",
								Session.GetHabbo().Id,
								" AND ignore_id = ",
								uint_,
								" LIMIT 1;"
							}));
						}
						ServerMessage Message = new ServerMessage(419u);
						Message.AppendInt32(3);
						Session.SendMessage(Message);
					}
				}
			}
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			ServerMessage Message = new ServerMessage(308);
			Message.AppendInt32(Session.GetHabbo().Volume);
			Message.AppendBoolean(false);
			Session.SendMessage(Message);
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			Room class14_ = Session.GetHabbo().CurrentRoom;
			if (class14_ != null)
			{
				Event.PopWiredUInt();
				string string_ = Event.PopFixedString();
				RoomUser @class = class14_.GetRoomUserByHabbo(string_);
				if (@class != null && @class.GetClient().GetHabbo().Rank <= 2u)
				{
					uint uint_ = @class.GetClient().GetHabbo().Id;
					if (!Session.GetHabbo().MutedUsers.Contains(uint_))
					{
						Session.GetHabbo().MutedUsers.Add(uint_);
						using (DatabaseClient class2 = PhoenixEnvironment.GetDatabase().GetClient())
						{
							class2.ExecuteQuery(string.Concat(new object[]
							{
								"INSERT INTO user_ignores(user_id, ignore_id) VALUES (",
								Session.GetHabbo().Id,
								", ",
								uint_,
								");"
							}));
						}
						ServerMessage Message = new ServerMessage(419u);
						Message.AppendInt32(1);
						Session.SendMessage(Message);
					}
				}
			}
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			ServerMessage Message = new ServerMessage(443);
			Message.AppendInt32(Session.GetHabbo().AchievementScore);
			Message.AppendStringWithBreak("");
			Session.SendMessage(Message);
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			ServerMessage Message = new ServerMessage(611);
			Message.AppendBoolean(true);
			Message.AppendInt32(2);
			Session.SendMessage(Message);
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo() == null)
			{
				Session.Login(Event.PopFixedString());
				if (Session.GetHabbo() != null && Session.GetHabbo().MutedUsers != null && Session.GetHabbo().MutedUsers.Count > 0)
				{
					using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient())
					{
						try
						{
							ServerMessage Message = new ServerMessage(420);
							Message.AppendInt32(Session.GetHabbo().MutedUsers.Count);
							foreach (uint Id in Session.GetHabbo().MutedUsers)
							{
								string string_ = adapter.ReadString("SELECT username FROM users WHERE Id = " + Id + " LIMIT 1;");
								Message.AppendStringWithBreak(string_);
							}
							Session.SendMessage(Message);
						}
						catch
						{
							Console.ForegroundColor = ConsoleColor.Red;
							Logging.WriteLine("Login error: User is ignoring a user that no longer exists");
							Console.ForegroundColor = ConsoleColor.Gray;
						}

					}
				}
			}
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			uint num = Event.PopWiredUInt();
			string text = PhoenixEnvironment.FilterInjectionChars(Event.PopFixedString());
			if (Session.GetHabbo().GetMessenger() != null)
			{
				if (num == 0 && Session.GetHabbo().HasRole("cmd_sa"))
				{
					ServerMessage Message = new ServerMessage(134);
					Message.AppendUInt(0);
					Message.AppendString(Session.GetHabbo().Username + ": " + text);
					PhoenixEnvironment.GetGame().GetClientManager().SendStaffChat(Session, Message);
				}
				else
				{
					if (num == 0)
					{
						ServerMessage Message2 = new ServerMessage(261);
						Message2.AppendInt32(4);
						Message2.AppendUInt(0);
						Session.SendMessage(Message2);
					}
					else
					{
						Session.GetHabbo().GetMessenger().method_18(num, text);
					}
				}
			}
		}
        public void parse(GameClient Session, ClientMessage Event)
        {
            List<UserItem> songs = new List<UserItem>();
            foreach (UserItem current in Session.GetHabbo().GetInventoryComponent().InventoryItems)
            {
                if (current != null && !(current.GetBaseItem().Name != "song_disk") && !Session.GetHabbo().GetInventoryComponent().mRemovedItems.Contains(current.Id))
                {
                    songs.Add(current);
                }
            }
            /*ServerMessage Message = new ServerMessage(333u);
            Message.AppendInt32(list.Count);
            foreach (UserItem current2 in list) //PHOENIX SEN OMA
            {
                int int_ = 0;
                if (current2.string_0.Length > 0)
                {
                    int_ = int.Parse(current2.string_0);
                }
                Soundtrack @class = GoldTree.GetGame().GetItemManager().method_4(int_);
                if (@class == null)
                {
                    return;
                }
                Message.AppendUInt(current2.uint_0);
                Message.AppendInt32(@class.Id);
            }*/

            ServerMessage Message = new ServerMessage(333);
            Message.AppendInt32(songs.Count);
            foreach (UserItem userItem in songs) //MUN OMA
            {
                int int_ = 0;
                if (userItem.ExtraData.Length > 0)
                {
                    int_ = int.Parse(userItem.ExtraData);
                }
                SongData SongData = SongManager.GetSong(int_);
                if (SongData == null)
                {
                    return;
                }
                Message.AppendUInt(userItem.Id);
                Message.AppendInt32(SongData.Id);
            }
            Session.SendMessage(Message);
        }
		public void parse(GameClient Session, ClientMessage Event)
		{
			if (Session.GetHabbo().LoadingRoom > 0u)
			{
				ServerMessage Message = new ServerMessage(297u);
				Message.AppendInt32(0);
				Session.SendMessage(Message);
			}
		}
		public void parse(GameClient Session, ClientMessage Event)
		{
			try
			{
				Room @class = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
				if (@class != null)
				{
					if (@class.method_72("stickiepole") > 0 || @class.CheckRights(Session))
					{
						uint uint_ = Event.PopWiredUInt();
						string text = Event.PopFixedString();
						string[] array = text.Split(new char[]
						{
							' '
						});
						if (array[0].Contains("-"))
						{
							array[0] = array[0].Replace("-", "");
						}
						UserItem class2 = Session.GetHabbo().GetInventoryComponent().GetItem(uint_);
						if (class2 != null)
						{
							if (array[0].StartsWith(":"))
							{
								string text2 = @class.method_98(text);
								if (text2 == null)
								{
									ServerMessage Message = new ServerMessage(516u);
									Message.AppendInt32(11);
									Session.SendMessage(Message);
									return;
								}
								RoomItem RoomItem_ = new RoomItem(class2.Id, @class.RoomId, class2.BaseItem, class2.ExtraData, 0, 0, 0.0, 0, text2, @class);
								if (@class.method_82(Session, RoomItem_, true, null))
								{
									Session.GetHabbo().GetInventoryComponent().RemoveItem(uint_, 1u, false);
								}
							}
							using (DatabaseClient class3 = PhoenixEnvironment.GetDatabase().GetClient())
							{
								class3.ExecuteQuery(string.Concat(new object[]
								{
									"UPDATE items SET room_id = '",
									@class.RoomId,
									"' WHERE Id = '",
									class2.Id,
									"' LIMIT 1"
								}));
							}
						}
					}
				}
			}
			catch
			{
			}
		}