summaryrefslogtreecommitdiff
path: root/src/map/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.h')
-rw-r--r--src/map/map.h19
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 */