Difference between revisions of "CInventory"

From King Arthur's Gold Wiki
Jump to: navigation, search
Line 15: Line 15:
 
| [[CInventory::getItemsCount|getItemsCount]]
 
| [[CInventory::getItemsCount|getItemsCount]]
 
| {{:CInventory::getItemsCount|getItemsCount}}
 
| {{:CInventory::getItemsCount|getItemsCount}}
 +
|-
 +
| [[CInventory::getItem|getItem]]
 +
| {{:CInventory::getItem|getItem}}
 +
|-
 +
| [[CInventory::canPutItem|canPutItem]]
 +
| {{:CInventory::canPutItem|canPutItem}}
 +
|-
 +
| [[CInventory::putInItem|putInItem]]
 +
| {{:CInventory::putInItem|putInItem}}
 +
|-
 +
| [[CInventory::putOutItem|putOutItem]]
 +
| {{:CInventory::putOutItem|putOutItem}}
 +
|-
 +
| [[CInventory::RemoveItems|RemoveItems]]
 +
| {{:CInventory::RemoveItems|RemoveItems}}
 +
|-
 +
| [[CInventory::isInInventory|isInInventory]]
 +
| {{:CInventory::isInInventory|isInInventory}}
 +
|-
 +
| [[CInventory::hasRequirements|hasRequirements]]
 +
| {{:CInventory::hasRequirements|hasRequirements}}
 +
|-
 +
| [[CInventory::TakeRequirements|TakeRequirements]]
 +
| {{:CInventory::TakeRequirements|TakeRequirements}}
 +
|-
 +
| [[CInventory::MoveInventoryTo|MoveInventoryTo]]
 +
| {{:CInventory::MoveInventoryTo|MoveInventoryTo}}
 +
|-
 +
| [[CInventory::getItem|getItem]]
 +
| {{:CInventory::getItem|getItem}}
 +
|-
 +
| [[CInventory::getItem|getItem]]
 +
| {{:CInventory::getItem|getItem}}
 +
|-
 +
| [[CInventory::getItem|getItem]]
 +
| {{:CInventory::getItem|getItem}}
 
|-
 
|-
 
|}
 
|}
 
 
Properties:
 
 
 
  
 
[[Category:Scripting]]
 
[[Category:Scripting]]
 
[[Category:Object Types]]
 
[[Category:Object Types]]

Revision as of 19:17, 19 August 2012

Represents an inventory - a container for


Methods:

Method Description
getBlob

Returns a reference to the CBlob that owns this object. It is a method common to several object types that are considered 'components'.

getItemsCount

Returns the number of CBlob stacks in this inventory as an int.

getItem

Returns a reference to the CBlob at the given index in this inventory's item list.

canPutItem

Returns a a bool indicating whether or not it is possible to put the given CBlob in this inventory.

putInItem

Puts the given CBlob in this inventory. Returns true if this was successful, otherwise it returns false.

putOutItem

Removes the given a CBlob from this inventory, either by CBlob reference or by name.

RemoveItems

Removes the a given quantity of CBlobs from this inventory by name. Returns true if there were as many matching items removed as requested, otherwise false.

isInInventory

Checks if the given CBlob exists in this inventory, either by CBlob reference or by name.

hasRequirements

Checks if this inventory contains the given requirements, and writes any missing requirements into a given CBitStream.

Returns true if the requirements are met, otherwise false.

TakeRequirements

Removes the requirements specified in the given CBitStream from this inventory.

MoveInventoryTo

Removes all of the CBlobs in this inventory and puts them in the given other inventory.

Returns true if all CBlobs were moved successfully, otherwise false.

getItem

Returns a reference to the CBlob at the given index in this inventory's item list.

getItem

Returns a reference to the CBlob at the given index in this inventory's item list.

getItem

Returns a reference to the CBlob at the given index in this inventory's item list.