diff options
Diffstat (limited to 'src/map/storage.h')
-rw-r--r-- | src/map/storage.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/src/map/storage.h b/src/map/storage.h index 6393e124a..37f894f76 100644 --- a/src/map/storage.h +++ b/src/map/storage.h @@ -5,13 +5,22 @@ #ifndef MAP_STORAGE_H #define MAP_STORAGE_H -#include "../common/cbasetypes.h" -#include "../common/db.h" +#include "common/hercules.h" +#include "common/db.h" struct guild_storage; struct item; struct map_session_data; +/** + * Acceptable values for map_session_data.state.storage_flag + */ +enum storage_flag { + STORAGE_FLAG_CLOSED = 0, // Closed + STORAGE_FLAG_NORMAL = 1, // Normal Storage open + STORAGE_FLAG_GUILD = 2, // Guild Storage open +}; + struct storage_interface { /* */ void (*reconnect) (void); @@ -29,7 +38,6 @@ struct storage_interface { void (*sortitem) (struct item* items, unsigned int size); int (*reconnect_sub) (DBKey key, DBData *data, va_list ap); }; -struct storage_interface *storage; struct guild_storage_interface { struct DBMap* db; // int guild_id -> struct guild_storage* @@ -54,11 +62,12 @@ struct guild_storage_interface { DBData (*create) (DBKey key, va_list args); }; -struct guild_storage_interface *gstorage; - #ifdef HERCULES_CORE void storage_defaults(void); void gstorage_defaults(void); #endif // HERCULES_CORE +HPShared struct storage_interface *storage; +HPShared struct guild_storage_interface *gstorage; + #endif /* MAP_STORAGE_H */ |