diff options
Diffstat (limited to 'src/map/unit.h')
-rw-r--r-- | src/map/unit.h | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/map/unit.h b/src/map/unit.h index 881fa16f4..0d970ca16 100644 --- a/src/map/unit.h +++ b/src/map/unit.h @@ -5,14 +5,27 @@ #ifndef MAP_UNIT_H #define MAP_UNIT_H -#include "clif.h" // clr_type -#include "path.h" // struct walkpath_data -#include "skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset -#include "../common/cbasetypes.h" +#include "map/clif.h" // clr_type +#include "map/path.h" // struct walkpath_data +#include "map/skill.h" // 'MAX_SKILLTIMERSKILL, struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset +#include "common/hercules.h" struct map_session_data; struct block_list; +/** + * Bitmask values usable as a flag in unit_stopwalking + */ +enum unit_stopwalking_flag { + STOPWALKING_FLAG_NONE = 0x00, + STOPWALKING_FLAG_FIXPOS = 0x01, ///< Issue a fixpos packet afterwards + STOPWALKING_FLAG_ONESTEP = 0x02, ///< Force the unit to move one cell if it hasn't yet + STOPWALKING_FLAG_NEXTCELL = 0x04, ///< Enable moving to the next cell when unit was already half-way there + /// (may cause on-touch/place side-effects, such as a scripted map change) + STOPWALKING_FLAG_MASK = 0xff, ///< Mask all of the above + // Note: Upper bytes are reserved for duration. +}; + struct unit_data { struct block_list *bl; struct walkpath_data walkpath; @@ -71,9 +84,6 @@ struct view_data { unsigned dead_sit : 2; }; -extern const short dirx[8]; -extern const short diry[8]; - struct unit_interface { int (*init) (bool minimal); int (*final) (void); @@ -126,8 +136,13 @@ struct unit_interface { int (*free) (struct block_list *bl, clr_type clrtype); }; -struct unit_interface *unit; +#ifdef HERCULES_CORE +extern const short dirx[8]; +extern const short diry[8]; void unit_defaults(void); +#endif // HERCULES_CORE + +HPShared struct unit_interface *unit; #endif /* MAP_UNIT_H */ |