11#include <unordered_map>
34 const std::string &player =
"");
39 std::function<
void(
const std::string &,
Inventory *)> apply_cb);
Definition inventorymanager.h:96
Definition inventory.h:314
Definition serverenvironment.h:219
Definition serverinventorymgr.h:17
ServerInventoryManager()
Definition serverinventorymgr.cpp:13
Inventory * createDetachedInventory(const std::string &name, IItemDefManager *idef, const std::string &player="")
Definition serverinventorymgr.cpp:87
bool checkDetachedInventoryAccess(const InventoryLocation &loc, const std::string &player) const
Definition serverinventorymgr.cpp:155
std::unordered_map< std::string, DetachedInventory > m_detached_inventories
Definition serverinventorymgr.h:50
bool removeDetachedInventory(const std::string &name)
Definition serverinventorymgr.cpp:127
virtual void setInventoryModified(const InventoryLocation &loc)
Definition serverinventorymgr.cpp:56
void sendDetachedInventories(const std::string &peer_name, bool incremental, std::function< void(const std::string &, Inventory *)> apply_cb)
Definition serverinventorymgr.cpp:167
virtual ~ServerInventoryManager()=default
void setEnv(ServerEnvironment *env)
Definition serverinventorymgr.h:22
ServerEnvironment * m_env
Definition serverinventorymgr.h:48
virtual Inventory * getInventory(const InventoryLocation &loc)
Definition serverinventorymgr.cpp:17
Definition inventorymanager.h:18
Definition serverinventorymgr.h:43
std::unique_ptr< Inventory > inventory
Definition serverinventorymgr.h:44
std::string owner
Definition serverinventorymgr.h:45