diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 054505d..6252881 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -10,9 +10,12 @@ #include "../../../common/mmo.h" #include "../../../common/socket.h" #include "../../../common/strlib.h" +#include "../../../map/map.h" #include "../../../map/npc.h" #include "../../../map/pc.h" +#include "map/mapd.h" +#include "map/mapdext.h" #include "map/npc.h" struct npc_data* enpc_checknear(struct map_session_data* sd, struct block_list* bl) @@ -45,3 +48,22 @@ struct npc_data* enpc_checknear(struct map_session_data* sd, struct block_list* return nd; } + +void enpc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const char* start, + const char* buffer, const char* filepath, int *retval) +{ + hookStop(); + if (!strcmpi(w3, "invisible")) + { + int16 m = map->mapname2mapid(name); + struct MapdExt *data = mapd_get(m); + if (data) + data->invisible = true; + } + else + { + ShowError("npc_parse_mapflag: unrecognized mapflag '%s' in file '%s', line '%d'.\n", w3, filepath, strline(buffer,start-buffer)); + if (retval) + *retval = EXIT_FAILURE; + } +} |