--- deliantra/server/include/map.h 2006/08/13 17:16:02 1.6 +++ deliantra/server/include/map.h 2006/08/27 16:15:12 1.10 @@ -34,6 +34,8 @@ #ifndef MAP_H #define MAP_H +#include "cfperl.h" + /* We set this size - this is to make magic map work properly on * tiled maps. There is no requirement that this matches the * tiled maps size - it just seemed like a reasonable value. @@ -157,6 +159,11 @@ #define AB_NO_PASS 0x04 /*#define P_PASS_THRU 0x08 *//* */ +#define P_SAFE 0x08 /* If this is set the map is a safe map, + * that means, nothing harmful there will be done, + * like: bombs, potion usage, alchemy, spells + * this was introduced to make shops more safe + * and propably other maps */ #define P_IS_ALIVE 0x10 /* something alive is on this space */ #define P_NO_CLERIC 0x20 /* no clerical spells cast here */ #define P_NEED_UPDATE 0x40 /* this space is out of date */ @@ -272,7 +279,9 @@ * (or even through the macros), but doing so will completely * break map tiling. */ -struct mapstruct { +struct mapstruct : extendable { + static data_type get_dt () { return DT_MAP; } + struct mapstruct *next; /* Next map, linked list */ char *tmpname; /* Name of temporary file */ char *name; /* Name of map as given by its creator */ @@ -287,6 +296,7 @@ * players entering/exiting map */ uint32 unique:1; /* if set, this is a per player unique map */ + uint32 safe_map:1; /* if set, this map doesn't allow using magic or harmful stuff in any way */ uint32 templatemap:1; /* if set, this is a template map */ uint32 nosmooth:1; /* if set the content of this map has smoothlevel=0 forced*/ sint32 timeout; /* swapout is set to this */ @@ -341,8 +351,4 @@ object *part; }; -extern void (*load_original_map_callback)(mapstruct *map); -extern void (*load_temporary_map_callback)(mapstruct *map); -extern void (*clean_temporary_map_callback)(mapstruct *map); - #endif