internal void SerializeRoomInformation(Room Room, bool show) { if (Room == null) { return; } this.GetResponse().Init(Outgoing.RoomDataMessageComposer); this.GetResponse().AppendBoolean(show); this.GetResponse().AppendUInt(Room.RoomId); this.GetResponse().AppendString(Room.Name); this.GetResponse().AppendBoolean(Room.Type == "private"); this.GetResponse().AppendInt32(Room.OwnerId); this.GetResponse().AppendString(Room.Owner); this.GetResponse().AppendInt32(Room.State); this.GetResponse().AppendInt32(Room.UsersNow); this.GetResponse().AppendInt32(Room.UsersMax); this.GetResponse().AppendString(Room.Description); this.GetResponse().AppendInt32(Room.TradeState); this.GetResponse().AppendInt32(Room.Score); this.GetResponse().AppendInt32(0); this.GetResponse().AppendInt32(0); this.GetResponse().AppendInt32(Room.Category); if (Room.GroupId > 0 && Room.Group != null) { this.GetResponse().AppendUInt(Room.Group.Id); this.GetResponse().AppendString(Room.Group.Name); this.GetResponse().AppendString(Room.Group.Badge); this.Response.AppendString(""); } else { this.GetResponse().AppendInt32(0); this.GetResponse().AppendString(""); this.GetResponse().AppendString(""); this.GetResponse().AppendString(""); } this.GetResponse().AppendInt32(Room.TagCount); object[] array = Room.Tags.ToArray(); for (int i = 0; i < array.Length; i++) { string s = (string)array[i]; this.GetResponse().AppendString(s); } this.GetResponse().AppendInt32(0); this.GetResponse().AppendInt32(0); this.GetResponse().AppendInt32(0); this.GetResponse().AppendBoolean(Room.AllowPets == 1); this.GetResponse().AppendBoolean(Room.AllowPetsEating == 1); this.GetResponse().AppendString(""); this.GetResponse().AppendString(""); this.GetResponse().AppendInt32(0); this.GetResponse().AppendBoolean(Room.RoomId != this.Session.GetHabbo().CurrentRoomId); this.GetResponse().AppendBoolean(false); this.GetResponse().AppendBoolean(false); this.GetResponse().AppendBoolean(false); this.GetResponse().AppendInt32(Room.WhoCanMute); this.GetResponse().AppendInt32(Room.WhoCanKick); this.GetResponse().AppendInt32(Room.WhoCanBan); this.GetResponse().AppendBoolean(Room.CheckRights(this.Session, true, false)); this.GetResponse().AppendInt32(Room.ChatType); this.GetResponse().AppendInt32(Room.ChatBalloon); this.GetResponse().AppendInt32(Room.ChatSpeed); this.GetResponse().AppendInt32(Room.ChatMaxDistance); this.GetResponse().AppendInt32(Room.ChatFloodProtection); this.SendResponse(); if (Room.Group == null) { DataTable table; using (IQueryAdapter queryreactor = CyberEnvironment.GetDatabaseManager().getQueryReactor()) { queryreactor.setQuery("SELECT user_id FROM room_rights WHERE room_id=" + Room.RoomId); table = queryreactor.getTable(); } this.Response.Init(Outgoing.LoadRoomRightsListMessageComposer); this.GetResponse().AppendUInt(Room.RoomData.Id); this.GetResponse().AppendInt32(table.Rows.Count); foreach (DataRow dataRow in table.Rows) { Habbo habboForId = CyberEnvironment.getHabboForId((uint)dataRow[0]); if (habboForId != null) { this.GetResponse().AppendUInt(habboForId.Id); this.GetResponse().AppendString(habboForId.Username); } } this.SendResponse(); } }