예제 #1
0
        /// <summary>
        /// Return the given objects to the agent given
        /// </summary>
        /// <param name="returnobjects">The objects to return</param>
        /// <param name="AgentId">The agent UUID that will get the inventory items for these objects</param>
        /// <returns></returns>
        public bool ReturnObjects(ISceneEntity[] returnobjects,
                UUID AgentId)
        {
            if (returnobjects.Length == 0)
                return true;
            //AddReturns(returnobjects[0].OwnerID, returnobjects[0].Name, returnobjects.Length, returnobjects[0].AbsolutePosition, "parcel owner return");
#if (!ISWIN)
            List<uint> IDs = new List<uint>();
            foreach (ISceneEntity grp in returnobjects)
                IDs.Add(grp.LocalId);
#else
            List<uint> IDs = returnobjects.Select(grp => grp.LocalId).ToList();
#endif
            IClientAPI client;
            m_scene.ClientManager.TryGetValue(AgentId, out client);
            //Its ok if the client is null, its taken care of
            DeRezObjects(client, IDs, returnobjects[0].RootChild.GroupID, DeRezAction.Return, UUID.Zero);
            return true;
        }
 /// <summary>
 ///     Return the given objects to the agent given
 /// </summary>
 /// <param name="returnobjects">The objects to return</param>
 /// <param name="AgentId">The agent UUID that will get the inventory items for these objects</param>
 /// <returns></returns>
 public bool ReturnObjects(ISceneEntity[] returnobjects,
                           UUID AgentId)
 {
     if (returnobjects.Length == 0)
         return true;
     List<uint> IDs = returnobjects.Select(grp => grp.LocalId).ToList();
     IClientAPI client;
     m_scene.ClientManager.TryGetValue(AgentId, out client);
     //Its ok if the client is null, its taken care of
     DeRezObjects(client, IDs, returnobjects[0].RootChild.GroupID, DeRezAction.Return, UUID.Zero);
     return true;
 }