public RoomData FetchRoomData(uint RoomId, DataRow dRow) { if (this.loadedRoomData.ContainsKey(RoomId)) { return (loadedRoomData[RoomId] as RoomData); } else { RoomData data = new RoomData(); if (this.IsRoomLoaded(RoomId)) { data = GetRoom(RoomId).RoomData; } else { data.method_1(dRow); } this.loadedRoomData.Add(RoomId, data); return data; } }
public RoomData GenerateNullableRoomData(uint uint_0) { RoomData result; if (this.GenerateRoomData(uint_0) != null) { result = this.GenerateRoomData(uint_0); } else { RoomData @class = new RoomData(); @class.FillNull(uint_0); result = @class; } return result; }
public RoomData GenerateRoomData(uint uint_0) { RoomData @class = new RoomData(); RoomData result; lock (this.loadedRoomData) { if (this.loadedRoomData.ContainsKey(uint_0)) { result = (this.loadedRoomData[uint_0] as RoomData); return result; } if (this.IsRoomLoaded(uint_0)) { result = this.GetRoom(uint_0).RoomData; return result; } DataRow dataRow = null; using (DatabaseClient class2 = PhoenixEnvironment.GetDatabase().GetClient()) { dataRow = class2.ReadDataRow("SELECT * FROM rooms WHERE Id = '" + uint_0 + "' LIMIT 1"); } if (dataRow == null) { result = null; return result; } @class.method_1(dataRow); } if (!this.loadedRoomData.ContainsKey(uint_0)) { this.loadedRoomData.Add(uint_0, @class); } result = @class; return result; }
public Room(uint uint_2, string string_10, string string_11, string string_12, string string_13, int int_17, int int_18, int int_19, string string_14, string string_15, int int_20, List<string> list_18, bool bool_13, bool bool_14, bool bool_15, bool bool_16, RoomIcon class29_1, string string_16, string string_17, string string_18, string string_19, RoomData class27_1, bool bool_17, int int_21, int int_22, uint uint_3) { this.bool_12 = false; this.Id = uint_2; this.Name = string_10; this.Description = string_11; this.Owner = string_13; this.Category = int_17; this.Type = string_12; this.State = int_18; this.UsersNow = 0; this.UsersMax = int_19; this.ModelName = string_14; this.CCTs = string_15; this.Score = int_20; this.Tags = list_18; this.AllowPet = bool_13; this.AllowPetsEating = bool_14; this.AllowWalkthrough = bool_15; this.Hidewall = bool_16; this.Wallthick = int_21; this.Floorthick = int_22; this.int_7 = 0; this.UserList = new RoomUser[500]; this.class29_0 = class29_1; this.Password = string_16; this.dictionary_0 = new Dictionary<uint, double>(); this.Event = null; this.Wallpaper = string_17; this.Floor = string_18; this.Landscape = string_19; this.mWallItems = new Hashtable(); this.mFloorItems = new Hashtable(); this.ActiveTrades = new List<Trade>(); this.class28_0 = PhoenixEnvironment.GetGame().GetRoomManager().GetModel(this.ModelName, this.Id); this.bool_6 = false; this.bool_7 = false; this.bool_5 = true; this.mRoomData = class27_1; this.bool_8 = bool_17; this.list_17 = new List<Phoenix.HabboHotel.Groups.Group>(); this.list_4 = new List<uint>(); this.bbTiles = new List<RoomItem>(); this.bbbTiles = new List<RoomItem>(); this.bbgTiles = new List<RoomItem>(); this.bbrTiles = new List<RoomItem>(); this.bbyTiles = new List<RoomItem>(); this.RedScoreboards = new List<RoomItem>(); this.YellowScoreboards = new List<RoomItem>(); this.BlueScoreboards = new List<RoomItem>(); this.GreenScoreboards = new List<RoomItem>(); this.int_10 = 0; this.int_11 = 0; this.int_9 = 0; this.int_12 = 0; this.int_13 = 0; this.StickiePoles = new List<RoomItem>(); this.WF_Triggers = new List<RoomItem>(); this.WF_Effects = new List<RoomItem>(); this.WF_Conditions = new List<RoomItem>(); this.byte_0 = new byte[this.Model.MapSizeX, this.Model.MapSizeY]; this.double_1 = new double[this.Model.MapSizeX, this.Model.MapSizeY]; this.double_2 = new double[this.Model.MapSizeX, this.Model.MapSizeY]; this.timer_0 = new Timer(new TimerCallback(this.method_32), null, 480, 480); this.int_8 = 0; this.RoomMuted = false; this.bool_9 = true; this.mGotRollers = false; this.int_16 = 0; this.int_15 = 4; this.Achievement = uint_3; this.bool_10 = false; this.mRemovedItems = new Hashtable(); this.mMovedItems = new Hashtable(); this.mAddedItems = new Hashtable(); this.method_23(); this.LoadFurniture(); this.GenerateMaps(); }
private static int smethod_1(RoomData class27_0) { return class27_0.UsersNow; }
public bool method_0(RoomData class27_0) { return class27_0.Category == this.int_0; }
public ServerMessage SerializeTicketChatlog(SupportTicket Ticket, RoomData RoomData, double Timestamp) { using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient()) { DataTable dataTable = adapter.ReadDataTable("SELECT user_id,user_name,hour,minute,message FROM chatlogs WHERE room_id = '" + RoomData.Id + "' AND timestamp >= '" + (Timestamp - 300.0) + "' AND timestamp < UNIX_TIMESTAMP() ORDER BY timestamp DESC LIMIT 100"); ServerMessage Message = new ServerMessage(534); Message.AppendUInt(Ticket.TicketId); Message.AppendUInt(Ticket.SenderId); Message.AppendUInt(Ticket.ReportedId); Message.AppendBoolean(RoomData.IsPublicRoom); Message.AppendUInt(RoomData.Id); Message.AppendStringWithBreak(RoomData.Name); if (dataTable != null) { Message.AppendInt32(dataTable.Rows.Count); IEnumerator enumerator = dataTable.Rows.GetEnumerator(); try { while (enumerator.MoveNext()) { DataRow dataRow = (DataRow)enumerator.Current; Message.AppendInt32((int)dataRow["hour"]); Message.AppendInt32((int)dataRow["minute"]); Message.AppendUInt((uint)dataRow["user_id"]); Message.AppendStringWithBreak((string)dataRow["user_name"]); Message.AppendStringWithBreak((string)dataRow["message"]); } } finally { IDisposable disposable = enumerator as IDisposable; if (disposable != null) { disposable.Dispose(); } } } Message.AppendInt32(0); return Message; } }
public ServerMessage SerializeRoomTool(RoomData Data) { Room Room = PhoenixEnvironment.GetGame().GetRoomManager().GetRoom(Data.Id); uint OwnerId = 0; using (DatabaseClient adapter = PhoenixEnvironment.GetDatabase().GetClient()) { try { adapter.AddParamWithValue("owner", Data.Owner); OwnerId = (uint)adapter.ReadDataRow("SELECT Id FROM users WHERE username = @owner LIMIT 1")[0]; } catch (Exception) { } } ServerMessage Message = new ServerMessage(538); Message.AppendUInt(Data.Id); Message.AppendInt32(Data.UsersNow); if (Room != null) { Message.AppendBoolean(Room.GetRoomUserByHabbo(Data.Owner) != null); } else { Message.AppendBoolean(false); } Message.AppendUInt(OwnerId); Message.AppendStringWithBreak(Data.Owner); Message.AppendUInt(Data.Id); Message.AppendStringWithBreak(Data.Name); Message.AppendStringWithBreak(Data.Description); Message.AppendInt32(Data.TagCount); foreach (string current in Data.Tags) { Message.AppendStringWithBreak(current); } if (Room != null) { Message.AppendBoolean(Room.HasOngoingEvent); if (Room.Event == null) { return Message; } Message.AppendStringWithBreak(Room.Event.Name); Message.AppendStringWithBreak(Room.Event.Description); Message.AppendInt32(Room.Event.Tags.Count); using (TimedLock.Lock(Room.Event.Tags)) { foreach (string current in Room.Event.Tags) { Message.AppendStringWithBreak(current); } return Message; } } Message.AppendBoolean(false); return Message; }