diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-15 02:28:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-15 02:28:24 +0300 |
commit | 94df0300da69e3dde9bc05f32137dd90c43040e8 (patch) | |
tree | 53b540f7483533a281ffb66e0c39765a8f65508a /src/map/map.h | |
parent | 6795414243a08d47bc111e23c9c0f09218260ccf (diff) | |
parent | d95f3b14d78305ea48834212684c73086555f74f (diff) | |
download | hercules-94df0300da69e3dde9bc05f32137dd90c43040e8.tar.gz hercules-94df0300da69e3dde9bc05f32137dd90c43040e8.tar.bz2 hercules-94df0300da69e3dde9bc05f32137dd90c43040e8.tar.xz hercules-94df0300da69e3dde9bc05f32137dd90c43040e8.zip |
Merge pull request #643 from HerculesWS/hpmfixes_v2
HPM Compatibility Improvements
Diffstat (limited to 'src/map/map.h')
-rw-r--r-- | src/map/map.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/map/map.h b/src/map/map.h index 826548f49..d4ab954be 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -5,10 +5,8 @@ #ifndef MAP_MAP_H #define MAP_MAP_H -#include "config/core.h" - #include "map/atcommand.h" -#include "common/cbasetypes.h" +#include "common/hercules.h" #include "common/core.h" // CORE_ST_LAST #include "common/db.h" #include "common/mapindex.h" @@ -215,7 +213,13 @@ enum { #define EVENT_NAME_LENGTH ( NAME_LENGTH * 2 + 3 ) #define DEFAULT_AUTOSAVE_INTERVAL (5*60*1000) // Specifies maps where players may hit each other -#define map_flag_vs(m) (map->list[m].flag.pvp || map->list[m].flag.gvg_dungeon || map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) || map->list[m].flag.battleground) +#define map_flag_vs(m) ( \ + map->list[m].flag.pvp \ + || map->list[m].flag.gvg_dungeon \ + || map->list[m].flag.gvg \ + || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle) \ + || map->list[m].flag.battleground \ + ) // Specifies maps that have special GvG/WoE restrictions #define map_flag_gvg(m) (map->list[m].flag.gvg || ((map->agit_flag || map->agit2_flag) && map->list[m].flag.gvg_castle)) // Specifies if the map is tagged as GvG/WoE (regardless of map->agit_flag status) @@ -762,8 +766,6 @@ struct mapit_interface { bool (*exists) (struct s_mapiterator* iter); }; -struct mapit_interface *mapit; - #define mapit_getallusers() (mapit->alloc(MAPIT_NORMAL,BL_PC)) #define mapit_geteachpc() (mapit->alloc(MAPIT_NORMAL,BL_PC)) #define mapit_geteachmob() (mapit->alloc(MAPIT_NORMAL,BL_MOB)) @@ -1085,10 +1087,11 @@ END_ZEROED_BLOCK; void (*zone_clear_single) (struct map_zone_data *zone); }; -struct map_interface *map; - #ifdef HERCULES_CORE void map_defaults(void); #endif // HERCULES_CORE +HPShared struct mapit_interface *mapit; +HPShared struct map_interface *map; + #endif /* MAP_MAP_H */ |