Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
		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;
			}
		}
Esempio n. 4
0
		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;
		}