当前位置: 首页>>代码示例>>C#>>正文


C# ISimulationDataService.StorePrimInventory方法代码示例

本文整理汇总了C#中ISimulationDataService.StorePrimInventory方法的典型用法代码示例。如果您正苦于以下问题:C# ISimulationDataService.StorePrimInventory方法的具体用法?C# ISimulationDataService.StorePrimInventory怎么用?C# ISimulationDataService.StorePrimInventory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ISimulationDataService的用法示例。


在下文中一共展示了ISimulationDataService.StorePrimInventory方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ProcessInventoryBackup

        /// <summary>
        /// Process inventory backup
        /// </summary>
        /// <param name="datastore"></param>
        public void ProcessInventoryBackup(ISimulationDataService datastore)
        {
            if (HasInventoryChanged)
            {
				HasInventoryChanged = false;
                List<TaskInventoryItem> items = GetInventoryItems();
                datastore.StorePrimInventory(m_part.UUID, items);
                    IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces<IScriptModule>();
                    if (engines != null)
                    {

                        foreach (TaskInventoryItem item in items)
                        {
                            if (item.Type == (int)InventoryType.LSL)
                            {
                                foreach (IScriptModule engine in engines)
                                {
                                    if (engine != null)
                                    {
                                        engine.SaveStateSave(item.ItemID, m_part.UUID);
                                    }
                                }
                            }
                        }
                    }

            }
        }
开发者ID:shangcheng,项目名称:Aurora,代码行数:32,代码来源:SceneObjectPartInventory.cs

示例2: ProcessInventoryBackup

        /// <summary>
        /// Process inventory backup
        /// </summary>
        /// <param name="datastore"></param>
        public void ProcessInventoryBackup(ISimulationDataService datastore)
        {
            if (HasInventoryChanged)
            {
                HasInventoryChanged = false;
                List<TaskInventoryItem> items = GetInventoryItems();
                datastore.StorePrimInventory(m_part.UUID, items);

            }
        }
开发者ID:openmetaversefoundation,项目名称:fortis-opensim,代码行数:14,代码来源:SceneObjectPartInventory.cs

示例3: ProcessInventoryBackup

        /// <summary>
        /// Process inventory backup
        /// </summary>
        /// <param name="datastore"></param>
        public void ProcessInventoryBackup(ISimulationDataService datastore)
        {
            // Removed this because linking will cause an immediate delete of the new
            // child prim from the database and the subsequent storing of the prim sees
            // the inventory of it as unchanged and doesn't store it at all. The overhead
            // of storing prim inventory needlessly is much less than the aggravation
            // of prim inventory loss.
            //            if (HasInventoryChanged)
            //            {
                Items.LockItemsForRead(true);
                try
                {
                    datastore.StorePrimInventory(m_part.UUID, Items.Values);
                }
                catch {}

                HasInventoryChanged = false;

                Items.LockItemsForRead(false);

            //            }
        }
开发者ID:CassieEllen,项目名称:opensim,代码行数:26,代码来源:SceneObjectPartInventory.cs


注:本文中的ISimulationDataService.StorePrimInventory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。