From 5ddb64795cc959916eeedbec8dc3f65c06f49698 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Thu, 12 Nov 2009 20:53:35 +0000 Subject: initial commodities and entity inventory, bump network proto version to 18 --- src/core/entity.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/core/entity.h') diff --git a/src/core/entity.h b/src/core/entity.h index 92cb5ab..ed0b1f8 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -26,6 +26,7 @@ class EntityControlable; #include "core/extension.h" #include "core/descriptions.h" +#include "core/inventory.h" #include "core/player.h" #include "core/zone.h" @@ -169,6 +170,11 @@ public: return entity_visible; } + ///entity inventory + inline Inventory *inventory() { + return entity_inventory; + } + /// entity menus inline Menus &menus() { return entity_menus; @@ -303,6 +309,14 @@ public: return entity_color_second; } + /** + * @brief add an inventory to this entity + * Entity takes ownership over the inventory pointer + */ + void set_inventory(Inventory *inventory); + + void set_info(Info *info); + /* ---- deserializers -------------------------------------- */ /// receive a client-to-server update from a stream @@ -390,6 +404,9 @@ private: Zone* entity_oldzone; Menus entity_menus; + + Inventory* entity_inventory; + Info* entity_info; Extension* entity_extension[4]; -- cgit v1.2.3