Warhorse ScripBind documentation
ContentsIndexHome
PreviousUpNext
C_ScriptBindInventory Methods

The methods of the C_ScriptBindInventory class are listed here.

 
Name 
Description 
 
Syntax: Inventory.AddItem( framework::T_WUIDScriptType id )
Adds item defined by id.
 
 
 
 
Syntax: Inventory.CreateItem()
Creates item defined by guid and immediately insert it into inventory 
 
Syntax: Inventory.DeleteItem( id )
Removes an item from the inventory and deletes it.
 
 
Syntax: Inventory.DeleteItemOfClass( classIdText, count )
Removes an item from the inventory and deletes it.
 
 
This is DetachFrom, a member of class C_ScriptBindInventory. 
 
Dump 
Syntax: Inventory.Dump()
Dumps the inventory.
 
 
Syntax: Inventory.FindItem( classIdText )
Finds an item that matches to class id.
 
 
Syntax: Inventory.GetCount()
Gets the number of the inventory elements.
 
 
Syntax: Inventory.GetCountOfCategory( const char* category )
Gets the number of element of the specified category inside the inventory.
 
 
Syntax: Inventory.GetCountOfClass( char const* classIdText )
Gets the number of element of the specified DB id inside the inventory.
 
 
Syntax: Inventory.GetId()
Returns runtime inventory id.
 
 
Syntax: Inventory.GetInventoryTable()
Gets the inventory table.
 
 
This is GetMemoryUsage, a member of class C_ScriptBindInventory. 
 
Syntax: Inventory.GetMoney()
Returns amount of money in this inventory converted into float
 
 
Syntax: Inventory.HasItem( framework::T_WUIDScriptType itemId )
Returns true if item is in this inventory.
 
 
Syntax: Inventory.MoveItemOfClass( classIdText, count )
Moves an item from the inventory to target inventory.
 
 
This is Release, a member of class C_ScriptBindInventory. 
 
Syntax: Inventory.RemoveAllItems()
Removes all items from the inventory.
 
 
Syntax: Inventory.RemoveItem( id )
Removes an item from the inventory.
 
 
Syntax: Inventory.RemoveMoney(5.5)
Removes 5.5 of actual currency. Money are removed only if inventory have such amount.
 
 
Syntax: Inventory.Validate()
Validates the inventory.
 
Copyright (c) 2012. All rights reserved.