本文整理汇总了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);
}
}
}
}
}
}
}
示例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);
}
}
示例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);
// }
}