19 #ifndef PS_INVENTORY_CACHE 20 #define PS_INVENTORY_CACHE 106 bool MoveItem(
int from_containerID,
int from_slot,
107 int to_containerID,
int to_slot,
int stackCount);
136 return itemhash.GetIterator();
144 return itemBySlot.GetIterator();
149 csHash<CachedItemDescription*> itemhash;
151 csArray<CachedItemDescription*> itemBySlot;
bool GetInventory(void)
Requests inventory from server.
void EmptyInventory(void)
Empty entire inventory.
csArray< CachedItemDescription * >::Iterator GetSortedIterator()
Return iterator to all cache item sorted by slot.
CachedItemDescription * GetInventoryItem(int slot)
Get item from container slot.
uint32 GetInventoryVersion() const
inline uint32 GetInventoryVersion() const Info: Returns the cache version (PS#2691) ...
void SetInventoryVersion(uint32 ver)
inline void SetInventoryVersion(uint32 ver) Info: Sets the cache version (PS#2691) ...
bool EmptyInventoryItem(int slot, int container)
Set empty slot.
bool SetInventoryItem(int slot, int containerID, csString name, csString meshName, csString materialName, float weight, float size, int stackCount, csString iconImage, int purifyStatus)
Store an item in the inventory.
bool MoveItem(int from_containerID, int from_slot, int to_containerID, int to_slot, int stackCount)
Move items from one slot to another.
csHash< CachedItemDescription * >::GlobalIterator GetHashIterator()
Return iterator to all cache items.
static int CompareSlot(CachedItemDescription *const &first, CachedItemDescription *const &second)