Ejemplo n.º 1
0
        /// <summary>
        ///   Gets all offline messages for the user in GridInstantMessage format.
        /// </summary>
        /// <param name = "agentID"></param>
        /// <returns></returns>
        public List <Email> GetEmails(UUID objectID)
        {
            //Get all the messages
            List <Email> emails = GenericUtils.GetGenerics <Email>(objectID, "Emails", GD);

            GenericUtils.RemoveGeneric(objectID, "Emails", GD);
            return(emails);
        }
        /// <summary>
        /// Gets all offline messages for the user in GridInstantMessage format.
        /// </summary>
        /// <param name="agentID"></param>
        /// <returns></returns>
        public GridInstantMessage[] GetOfflineMessages(UUID agentID)
        {
            //Get all the messages
            List <GridInstantMessage> Messages = GenericUtils.GetGenerics <GridInstantMessage>(agentID, "OfflineMessages", GD, new GridInstantMessage());

            //Clear them out now that we have them
            GenericUtils.RemoveGeneric(agentID, "OfflineMessages", GD);
            return(Messages.ToArray());
        }
        public List <MuteList> GetMuteList(UUID AgentID)
        {
            object remoteValue = DoRemote(AgentID);

            if (remoteValue != null || m_doRemoteOnly)
            {
                return((List <MuteList>)remoteValue);
            }

            return(GenericUtils.GetGenerics <MuteList>(AgentID, "MuteList", GD));
        }
        public Dictionary <float, RegionLightShareData> LoadRegionWindlightSettings(UUID regionUUID)
        {
            Dictionary <float, RegionLightShareData> RetVal = new Dictionary <float, RegionLightShareData>();
            List <RegionLightShareData> RWLDs = GenericUtils.GetGenerics <RegionLightShareData>(regionUUID, "RegionWindLightData", GD);

            foreach (RegionLightShareData lsd in RWLDs)
            {
                if (!RetVal.ContainsKey(lsd.minEffectiveAltitude))
                {
                    RetVal.Add(lsd.minEffectiveAltitude, lsd);
                }
            }
            return(RetVal);
        }
        public List <Email> GetEmails(UUID objectID)
        {
            object remoteValue = DoRemote(objectID);

            if (remoteValue != null || m_doRemoteOnly)
            {
                return((List <Email>)remoteValue);
            }

            //Get all the messages
            List <Email> emails = GenericUtils.GetGenerics <Email>(objectID, "Emails", GD);

            GenericUtils.RemoveGenericByType(objectID, "Emails", GD);
            return(emails);
        }
        public List <GridInstantMessage> GetOfflineMessages(UUID agentID)
        {
            object remoteValue = DoRemote(agentID);

            if (remoteValue != null || m_doRemoteOnly)
            {
                return((List <GridInstantMessage>)remoteValue);
            }

            //Get all the messages
            List <GridInstantMessage> Messages = GenericUtils.GetGenerics <GridInstantMessage>(agentID, "OfflineMessages", GD);

            Messages.AddRange(GenericUtils.GetGenerics <GridInstantMessage>(agentID, "GroupOfflineMessages", GD));
            //Clear them out now that we have them
            GenericUtils.RemoveGenericByType(agentID, "OfflineMessages", GD);
            GenericUtils.RemoveGenericByType(agentID, "GroupOfflineMessages", GD);
            return(Messages);
        }
        /// <summary>
        ///   Load all parcels in the region
        /// </summary>
        /// <param name = "regionID"></param>
        /// <returns></returns>
        public List <LandData> LoadLandObjects(UUID regionID)
        {
            //Load all from the database
            List <LandData> AllLandObjects = new List <LandData>();

            try
            {
                AllLandObjects = GenericUtils.GetGenerics <LandData>(regionID, "LandData", GD);
            }
            catch (Exception ex)
            {
                AllLandObjects = new List <LandData>();
                MainConsole.Instance.Info("[ParcelService]: Failed to load parcels, " + ex);
            }
            foreach (LandData t in AllLandObjects)
            {
                BuildParcelAccessList(t);
            }
            return(AllLandObjects);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Load all parcels in the region
        /// </summary>
        /// <param name="regionID"></param>
        /// <returns></returns>
        public List <LandData> LoadLandObjects(UUID regionID)
        {
            //Load all from the database
            List <LandData> AllLandObjects = new List <LandData>();

            try
            {
                AllLandObjects = GenericUtils.GetGenerics <LandData>(regionID, "LandData", GD, new LandData());
            }
            catch (Exception ex)
            {
                AllLandObjects = new List <LandData>();
                m_log.Info("[ParcelService]: Failed to load parcels, " + ex.ToString());
            }
            for (int i = 0; i < AllLandObjects.Count; i++)
            {
                BuildParcelAccessList(AllLandObjects[i]);
            }
            return(AllLandObjects);
        }
 /// <summary>
 ///   Gets the full mute list for the given agent.
 /// </summary>
 /// <param name = "AgentID"></param>
 /// <returns></returns>
 public MuteList[] GetMuteList(UUID AgentID)
 {
     return(GenericUtils.GetGenerics <MuteList>(AgentID, "MuteList", GD).ToArray());
 }
 /// <summary>
 ///     Gets a list of generic T's from the database
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="OwnerID"></param>
 /// <param name="Type"></param>
 /// <returns></returns>
 public List <T> GetGenerics <T>(UUID OwnerID, string Type) where T : IDataTransferable
 {
     return(GenericUtils.GetGenerics <T>(OwnerID, Type, GD));
 }