Difference between revisions of "CInventory::RemoveItems"

From King Arthur's Gold Wiki
Jump to: navigation, search
(Created page with "<onlyinclude> 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. </o...")
 
Line 1: Line 1:
 
<onlyinclude>
 
<onlyinclude>
Removes the a given quantity of [[CBlob]]s from this inventory by name. Returns true if there were as many matching items removed as requested, otherwise false.
+
Removes all items from this inventory.
 
</onlyinclude>
 
</onlyinclude>
  
The first argument is the name to match [[CBlob]]s by, the second argument is the quantity of them to remove.
 
If the quantity is 0 it will entirely remove the first stack of matching [[CBlob]]s it finds.
 
 
The method will only return full if there were at least as many matching [[CBlob]]s as the quantity argument (or at least one stack if quantity was 0).
 
 
<syntaxhighlight lang="cpp">
 
<syntaxhighlight lang="cpp">
bool RemoveItems(const string &blobName, int quantity)
+
void RemoveAll()
 
</syntaxhighlight>
 
</syntaxhighlight>
  

Revision as of 17:40, 22 September 2012

Removes all items from this inventory.


void RemoveAll()

Object method of: CInventory