summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorEmistry Haoyan <equinox1991@gmail.com>2020-03-08 05:18:26 +0800
committerEmistry Haoyan <equinox1991@gmail.com>2020-07-06 00:50:48 +0800
commitd3c24f7d9ae64354e446a85ba0dad21daca589c1 (patch)
tree194c6e85100d516fe73425f6aed1c72ea05d61fe /src/map/npc.c
parent1dfebbd4966310387357cbddae600418a56df658 (diff)
downloadhercules-d3c24f7d9ae64354e446a85ba0dad21daca589c1.tar.gz
hercules-d3c24f7d9ae64354e446a85ba0dad21daca589c1.tar.bz2
hercules-d3c24f7d9ae64354e446a85ba0dad21daca589c1.tar.xz
hercules-d3c24f7d9ae64354e446a85ba0dad21daca589c1.zip
Add NoPet mapflag
- allow to set nopet mapflag at any maps. - mapflag to disable pet, and force return to egg.
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 055c1843b..f293a67ac 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -5239,6 +5239,8 @@ static const char *npc_parse_mapflag(const char *w1, const char *w2, const char
map->list[m].flag.nostorage = (state) ? cap_value(atoi(w4), 1, 3) : 0;
} else if (!strcmpi(w3, "nogstorage")) {
map->list[m].flag.nogstorage = (state) ? cap_value(atoi(w4), 1, 3) : 0;
+ } else if (strcmpi(w3, "nopet") == 0) {
+ map->list[m].flag.nopet = (state != 0) ? 1 : 0;
} else {
npc->parse_unknown_mapflag(mapname, w3, w4, start, buffer, filepath, retval);
}