diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-27 12:09:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-11-27 12:09:17 +0300 |
commit | 8befbfe358915a6ee19b9c4be64d3473c98a70f4 (patch) | |
tree | 9056e6384a954825e2264002bf41f8dfe0c1c7d7 /src/map/npc.c | |
parent | 248b23a44cb86ac825c0af2506fa93a4f617230e (diff) | |
download | evol-hercules-8befbfe358915a6ee19b9c4be64d3473c98a70f4.tar.gz evol-hercules-8befbfe358915a6ee19b9c4be64d3473c98a70f4.tar.bz2 evol-hercules-8befbfe358915a6ee19b9c4be64d3473c98a70f4.tar.xz evol-hercules-8befbfe358915a6ee19b9c4be64d3473c98a70f4.zip |
add map flag "invisible". For now unused.
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; + } +} |