C# Class Universe.Region.SceneObjectPartInventory

Inheritance: IEntityInventory
Afficher le fichier Open project: Virtual-Universe/Virtual-Universe Class Usage Examples

Protected Properties

Свойство Type Description
m_inventorySerial uint
m_items TaskInventoryDictionary
m_itemsLock object

Méthodes publiques

Méthode Description
AddInventoryItem ( TaskInventoryItem item, bool allowedDrop ) : void

Add an item to this prim's inventory. If an item with the same name already exists, then an alternative name is chosen.

AddInventoryItemExclusive ( TaskInventoryItem item, bool allowedDrop ) : void

Add an item to this prim's inventory. If an item with the same name already exists, it is replaced.

ApplyGodPermissions ( uint perms ) : void
ApplyNextOwnerPermissions ( ) : void
ChangeInventoryGroup ( UUID groupID ) : void

Change every item in this inventory to a new group.

ChangeInventoryOwner ( UUID ownerId ) : void

Change every item in this inventory to a new owner.

ContainsScripts ( ) : bool
CreateScriptInstance ( TaskInventoryItem item, int startParam, bool postOnRez, StateSource stateSource ) : void

Start a script which is in this prim's inventory.

CreateScriptInstance ( UUID itemId, int startParam, bool postOnRez, StateSource stateSource ) : void

Start a script which is in this prim's inventory.

CreateScriptInstances ( int startParam, bool postOnRez, StateSource stateSource, UUID RezzedFrom, bool clearStateSaves ) : void

Start all the scripts contained in this prim's inventory

ForceInventoryPersistence ( ) : void

Force the task inventory of this prim to persist at the next update sweep

GetInventoryFileName ( ) : bool

Returns true if the file needs to be rebuild, false if it does not

GetInventoryItem ( UUID itemId ) : TaskInventoryItem

Returns an existing inventory item. Returns the original, so any changes will be live.

GetInventoryItems ( string name ) : IList

Get inventory items by name.

GetInventoryItems ( ) : List
GetInventoryList ( ) : List
GetInventoryScripts ( ) : List
GetRezReadySceneObject ( TaskInventoryItem item ) : ISceneEntity
GetScriptErrors ( UUID itemID ) : ArrayList
MaskEffectivePermissions ( ) : uint
RemoveInventoryItem ( UUID itemID ) : int

Remove an item from this prim's inventory

RemoveScriptInstance ( UUID itemId, bool sceneObjectBeingDeleted ) : void

Stop a script which is in this prim's inventory.

RemoveScriptInstances ( bool sceneObjectBeingDeleted ) : void

Stop all the scripts in this prim.

RequestInventoryFile ( IClientAPI client ) : void

Serialize all the metadata for the items in this prim's inventory ready for sending to the client

ResetInventoryIDs ( bool ChangeScripts ) : void

Reset UUIDs for all the items in the prim's inventory. This involves either generating new ones or setting existing UUIDs to the correct parent UUIDs. If this method is called and there are inventory items, then we regard the inventory as having changed.

ResetObjectID ( ) : void
RestoreInventoryItems ( ICollection items ) : void

Restore a whole collection of items to the prim's inventory at once. We assume that the items already have all their fields correctly filled out. The items are not flagged for persistence to the database, since they are being restored from persistence rather than being newly added.

ResumeScripts ( ) : void
SaveScriptStateSaves ( ) : void
SceneObjectPartInventory ( SceneObjectPart part ) : System.Collections

Constructor

UpdateInventoryItem ( TaskInventoryItem item ) : bool

Update an existing inventory item.

UpdateInventoryItem ( TaskInventoryItem item, bool fireScriptEvents ) : bool
UpdateScriptInstance ( UUID itemID, byte assetData, int startParam, bool postOnRez, StateSource stateSource ) : void

Updates a script which is in this prim's inventory.

Méthodes protégées

Méthode Description
AddInventoryItem ( string name, TaskInventoryItem item, bool allowedDrop ) : void

Add an item to this prim's inventory.

Private Methods

Méthode Description
FindAvailableInventoryName ( string name ) : string

For a given item name, return that name if it is available. Otherwise, return the next available similar name (which is currently the original name with the next available numeric suffix).

InventoryContainsName ( string name ) : bool

Check if the inventory holds an item with a given name.

ResumeScript ( TaskInventoryItem item ) : void

Method Details

AddInventoryItem() public méthode

Add an item to this prim's inventory. If an item with the same name already exists, then an alternative name is chosen.
public AddInventoryItem ( TaskInventoryItem item, bool allowedDrop ) : void
item Universe.Framework.SceneInfo.TaskInventoryItem
allowedDrop bool
Résultat void

AddInventoryItem() protected méthode

Add an item to this prim's inventory.
protected AddInventoryItem ( string name, TaskInventoryItem item, bool allowedDrop ) : void
name string The name that the new item should have.
item Universe.Framework.SceneInfo.TaskInventoryItem /// The item itself. The name within this structure is ignored in favor of the name /// given in this method's arguments ///
allowedDrop bool /// Item was only added to inventory because AllowedDrop is set ///
Résultat void

AddInventoryItemExclusive() public méthode

Add an item to this prim's inventory. If an item with the same name already exists, it is replaced.
public AddInventoryItemExclusive ( TaskInventoryItem item, bool allowedDrop ) : void
item Universe.Framework.SceneInfo.TaskInventoryItem
allowedDrop bool
Résultat void

ApplyGodPermissions() public méthode

public ApplyGodPermissions ( uint perms ) : void
perms uint
Résultat void

ApplyNextOwnerPermissions() public méthode

public ApplyNextOwnerPermissions ( ) : void
Résultat void

ChangeInventoryGroup() public méthode

Change every item in this inventory to a new group.
public ChangeInventoryGroup ( UUID groupID ) : void
groupID UUID
Résultat void

ChangeInventoryOwner() public méthode

Change every item in this inventory to a new owner.
public ChangeInventoryOwner ( UUID ownerId ) : void
ownerId UUID
Résultat void

ContainsScripts() public méthode

public ContainsScripts ( ) : bool
Résultat bool

CreateScriptInstance() public méthode

Start a script which is in this prim's inventory.
public CreateScriptInstance ( TaskInventoryItem item, int startParam, bool postOnRez, StateSource stateSource ) : void
item Universe.Framework.SceneInfo.TaskInventoryItem
startParam int
postOnRez bool
stateSource StateSource
Résultat void

CreateScriptInstance() public méthode

Start a script which is in this prim's inventory.
public CreateScriptInstance ( UUID itemId, int startParam, bool postOnRez, StateSource stateSource ) : void
itemId UUID /// A ///
startParam int
postOnRez bool
stateSource StateSource
Résultat void

CreateScriptInstances() public méthode

Start all the scripts contained in this prim's inventory
public CreateScriptInstances ( int startParam, bool postOnRez, StateSource stateSource, UUID RezzedFrom, bool clearStateSaves ) : void
startParam int
postOnRez bool
stateSource StateSource
RezzedFrom UUID
clearStateSaves bool
Résultat void

ForceInventoryPersistence() public méthode

Force the task inventory of this prim to persist at the next update sweep
public ForceInventoryPersistence ( ) : void
Résultat void

GetInventoryFileName() public méthode

Returns true if the file needs to be rebuild, false if it does not
public GetInventoryFileName ( ) : bool
Résultat bool

GetInventoryItem() public méthode

Returns an existing inventory item. Returns the original, so any changes will be live.
public GetInventoryItem ( UUID itemId ) : TaskInventoryItem
itemId UUID
Résultat Universe.Framework.SceneInfo.TaskInventoryItem

GetInventoryItems() public méthode

Get inventory items by name.
public GetInventoryItems ( string name ) : IList
name string
Résultat IList

GetInventoryItems() public méthode

public GetInventoryItems ( ) : List
Résultat List

GetInventoryList() public méthode

public GetInventoryList ( ) : List
Résultat List

GetInventoryScripts() public méthode

public GetInventoryScripts ( ) : List
Résultat List

GetRezReadySceneObject() public méthode

public GetRezReadySceneObject ( TaskInventoryItem item ) : ISceneEntity
item Universe.Framework.SceneInfo.TaskInventoryItem
Résultat ISceneEntity

GetScriptErrors() public méthode

public GetScriptErrors ( UUID itemID ) : ArrayList
itemID UUID
Résultat System.Collections.ArrayList

MaskEffectivePermissions() public méthode

public MaskEffectivePermissions ( ) : uint
Résultat uint

RemoveInventoryItem() public méthode

Remove an item from this prim's inventory
public RemoveInventoryItem ( UUID itemID ) : int
itemID UUID
Résultat int

RemoveScriptInstance() public méthode

Stop a script which is in this prim's inventory.
public RemoveScriptInstance ( UUID itemId, bool sceneObjectBeingDeleted ) : void
itemId UUID
sceneObjectBeingDeleted bool /// Should be true if this script is being removed because the scene /// object is being deleted. This will prevent spurious updates to the client. ///
Résultat void

RemoveScriptInstances() public méthode

Stop all the scripts in this prim.
public RemoveScriptInstances ( bool sceneObjectBeingDeleted ) : void
sceneObjectBeingDeleted bool /// Should be true if these scripts are being removed because the scene /// object is being deleted. This will prevent spurious updates to the client. ///
Résultat void

RequestInventoryFile() public méthode

Serialize all the metadata for the items in this prim's inventory ready for sending to the client
public RequestInventoryFile ( IClientAPI client ) : void
client IClientAPI
Résultat void

ResetInventoryIDs() public méthode

Reset UUIDs for all the items in the prim's inventory. This involves either generating new ones or setting existing UUIDs to the correct parent UUIDs. If this method is called and there are inventory items, then we regard the inventory as having changed.
public ResetInventoryIDs ( bool ChangeScripts ) : void
ChangeScripts bool
Résultat void

ResetObjectID() public méthode

public ResetObjectID ( ) : void
Résultat void

RestoreInventoryItems() public méthode

Restore a whole collection of items to the prim's inventory at once. We assume that the items already have all their fields correctly filled out. The items are not flagged for persistence to the database, since they are being restored from persistence rather than being newly added.
public RestoreInventoryItems ( ICollection items ) : void
items ICollection
Résultat void

ResumeScripts() public méthode

public ResumeScripts ( ) : void
Résultat void

SaveScriptStateSaves() public méthode

public SaveScriptStateSaves ( ) : void
Résultat void

SceneObjectPartInventory() public méthode

Constructor
public SceneObjectPartInventory ( SceneObjectPart part ) : System.Collections
part SceneObjectPart /// A ///
Résultat System.Collections

UpdateInventoryItem() public méthode

Update an existing inventory item.
public UpdateInventoryItem ( TaskInventoryItem item ) : bool
item Universe.Framework.SceneInfo.TaskInventoryItem /// The updated item. An item with the same id must already exist /// in this prim's inventory. ///
Résultat bool

UpdateInventoryItem() public méthode

public UpdateInventoryItem ( TaskInventoryItem item, bool fireScriptEvents ) : bool
item Universe.Framework.SceneInfo.TaskInventoryItem
fireScriptEvents bool
Résultat bool

UpdateScriptInstance() public méthode

Updates a script which is in this prim's inventory.
public UpdateScriptInstance ( UUID itemID, byte assetData, int startParam, bool postOnRez, StateSource stateSource ) : void
itemID UUID
assetData byte
startParam int
postOnRez bool
stateSource StateSource
Résultat void

Property Details

m_inventorySerial protected_oe property

Serial count for inventory file , used to tell if inventory has changed no need for this to be part of Database backup
protected uint m_inventorySerial
Résultat uint

m_items protected_oe property

Holds in memory prim inventory
protected TaskInventoryDictionary m_items
Résultat TaskInventoryDictionary

m_itemsLock protected_oe property

protected object m_itemsLock
Résultat object