|
Planeshift
|
#include <psinventorycache.h>
Classes | |
| struct | CachedItemDescription |
Public Member Functions | |
| void | EmptyInventory (void) |
| Empty entire inventory. | |
| bool | EmptyInventoryItem (int slot, int container) |
| Set empty slot. | |
| csHash< CachedItemDescription * > ::GlobalIterator | GetHashIterator () |
| Return iterator to all cache items. | |
| bool | GetInventory (void) |
| Requests inventory from server. | |
| CachedItemDescription * | GetInventoryItem (int slot) |
| Get item from container slot. | |
| uint32 | GetInventoryVersion () const |
| inline uint32 GetInventoryVersion() const Info: Returns the cache version (PS#2691) | |
| csArray< CachedItemDescription * > ::Iterator | GetSortedIterator () |
| Return iterator to all cache item sorted by slot. | |
| bool | MoveItem (int from_containerID, int from_slot, int to_containerID, int to_slot, int stackCount) |
| Move items from one slot to another. | |
| psInventoryCache () | |
| 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. | |
| void | SetInventoryVersion (uint32 ver) |
| inline void SetInventoryVersion(uint32 ver) Info: Sets the cache version (PS#2691) | |
| ~psInventoryCache () | |
Copyright (C) 2006 Atomic Blue ([email protected], http://www.atomicblue.org)
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (version 2 of the License) This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Inventory cache for the client. The psInventoryCache class implements the inventory cache on the client.
Definition at line 27 of file psinventorycache.h.
| psInventoryCache::psInventoryCache | ( | ) |
| psInventoryCache::~psInventoryCache | ( | ) |
| void psInventoryCache::EmptyInventory | ( | void | ) |
Empty entire inventory.
Set empty slot.
| slot | Slot number |
| container,: | Container id |
| csHash<CachedItemDescription*>::GlobalIterator psInventoryCache::GetHashIterator | ( | ) | [inline] |
Return iterator to all cache items.
Definition at line 134 of file psinventorycache.h.
| bool psInventoryCache::GetInventory | ( | void | ) |
Requests inventory from server.
Decides whether to request full inventory list or just updates the local cache.
| CachedItemDescription* psInventoryCache::GetInventoryItem | ( | int | slot | ) |
Get item from container slot.
| slot,: | Slot number |
| uint32 psInventoryCache::GetInventoryVersion | ( | ) | const [inline] |
inline uint32 GetInventoryVersion() const Info: Returns the cache version (PS#2691)
Definition at line 118 of file psinventorycache.h.
| csArray<CachedItemDescription*>::Iterator psInventoryCache::GetSortedIterator | ( | ) | [inline] |
Return iterator to all cache item sorted by slot.
Definition at line 142 of file psinventorycache.h.
| bool psInventoryCache::MoveItem | ( | int | from_containerID, |
| int | from_slot, | ||
| int | to_containerID, | ||
| int | to_slot, | ||
| int | stackCount | ||
| ) |
Move items from one slot to another.
| fromcontainer | From container number |
| fromslot | From slot number |
| bool psInventoryCache::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.
| slot | Slot number |
| container | Container id |
| name | Item name |
| meshName | Items mesh |
| materialName | Items material. |
| weight | Weight of item |
| size | Size of item |
| stackCount | Number of items in stack |
| iconImage | The item icon. |
| purifyStatus | Purify status. |
| void psInventoryCache::SetInventoryVersion | ( | uint32 | ver | ) | [inline] |
inline void SetInventoryVersion(uint32 ver) Info: Sets the cache version (PS#2691)
Definition at line 125 of file psinventorycache.h.
1.7.3