/** psinventorycachesvr.h * * Copyright (C) 2006 Atomic Blue (info@planeshift.it, 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. * * Server-side of the inventory cache handling. */ #ifndef PS_INVENTORY_CACHE_SERVER #define PS_INVENTORY_CACHE_SERVER #include "util/psconst.h" #include "util/pscache.h" /** * @class psInventoryCacheServer * * The psInventoryCacheServer class implements the inventory cache on the server. */ class psInventoryCacheServer : public psCache { public: psInventoryCacheServer(); ~psInventoryCacheServer(); /** Flags that a bulk slot's contents has changed. * * @param slot: slot number * @return bool Slot has been flagged successfully. */ bool BulkSlotModified (int); /// bulk slot has modified /** Flags that an equipment slot's contents has changed. * * @param slot: slot number * @return bool Slot has been flagged successfully. */ bool EquipmentSlotModified (int); /// equipment slot modified /** Checks if a bulk slot's contents has changed. * * @param slot: slot number * @return bool bulk slot status. */ bool HasBulkSlotModified (int); /// has bulk slot has modified /** Checks if an equipment slot's contents has changed. * * @param slot: slot number * @return bool equipment slot status. */ bool HasEquipSlotModified (int); /** Clears flag that bulk slot has modified. * * @param slot: slot number * @return bool Slot has been flagged successfully. */ bool ClearBulkSlot(int); /** Clears flag that equipment slot has modified. * * @param slot: slot number * @return bool Slot has been flagged successfully. */ bool ClearEquipSlot(int); /** Clears all slot modified flags. * * @return bool Success flag. */ bool ClearAllSlots(void); private: bool bulkSlotModified[INVENTORY_BULK_COUNT]; /// flag if a bulk-slot has modified since last update bool equipSlotModified[INVENTORY_EQUIP_COUNT]; /// flag if a equip-slot has modified since last update }; #endif