Пример #1
0
        public object SendAttachments(string funct, object param)
        {
            object[]       parameters = (object[])param;
            IScenePresence sp         = (IScenePresence)parameters[1];

            Interfaces.GridRegion dest = (Interfaces.GridRegion)parameters[0];
            // this is never used..
            IAttachmentsModule att = sp.Scene.RequestModuleInterface <IAttachmentsModule> ();

            if (m_userAttachments.ContainsKey(sp.UUID))
            {
                Util.FireAndForget(delegate
                {
                    foreach (ISceneEntity attachment in m_userAttachments[sp.UUID])
                    {
                        Connectors.Simulation.SimulationServiceConnector ssc = new Connectors.Simulation.SimulationServiceConnector();
                        attachment.IsDeleted = false;//Fix this, we 'did' get removed from the sim already
                        //Now send it to them
                        ssc.CreateObject(dest, (ISceneObject)attachment);
                        attachment.IsDeleted = true;
                    }
                });
            }
            return(null);
        }
Пример #2
0
        void OnSetAgentLeaving(IScenePresence presence, Interfaces.GridRegion destination)
        {
            IAttachmentsModule attModule = presence.Scene.RequestModuleInterface <IAttachmentsModule>();

            if (attModule != null)
            {
                m_userAttachments[presence.UUID] = attModule.GetAttachmentsForAvatar(presence.UUID);
            }
        }