diff options
author | AnnieRuru <jeankofannie2@gmail.com> | 2019-03-23 06:08:29 +0800 |
---|---|---|
committer | AnnieRuru <jeankofannie2@gmail.com> | 2019-03-23 06:08:29 +0800 |
commit | e4ea52c0651b7b204aad696d600e623ef1890016 (patch) | |
tree | 00230c30c49d21eb491c6c0f6b3f1be5cdbc46a6 /src | |
parent | e1e951c805916853e55ff5b9ce0531e0cf483ebf (diff) | |
download | hercules-e4ea52c0651b7b204aad696d600e623ef1890016.tar.gz hercules-e4ea52c0651b7b204aad696d600e623ef1890016.tar.bz2 hercules-e4ea52c0651b7b204aad696d600e623ef1890016.tar.xz hercules-e4ea52c0651b7b204aad696d600e623ef1890016.zip |
Suppress ShowWarning for certain mapflags when @reloadscript
Diffstat (limited to 'src')
-rw-r--r-- | src/map/npc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 61341744d..8a6b80175 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -4365,8 +4365,7 @@ static const char *npc_parse_mapflag(const char *w1, const char *w2, const char if (!strcmpi(w3, "nosave")) { char savemap[32]; int savex, savey; - if (state == 0) - ; //Map flag disabled. + if (state == 0); //Map flag disabled. else if (w4 && !strcmpi(w4, "SavePoint")) { map->list[m].save.map = 0; map->list[m].save.x = -1; @@ -4659,7 +4658,8 @@ static const char *npc_parse_mapflag(const char *w1, const char *w2, const char } } - if( modifier[0] == '\0' ) { + if (state == 0); //Map flag disabled. + else if (modifier[0] == '\0') { ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_unit_duration' flag! removing flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer)); if (retval) *retval = EXIT_FAILURE; } else if( !( skill_id = skill->name2id(skill_name) ) || !skill->get_unit_id( skill->name2id(skill_name), 0) ) { @@ -4718,7 +4718,8 @@ static const char *npc_parse_mapflag(const char *w1, const char *w2, const char } } - if( modifier[0] == '\0' ) { + if (state == 0); //Map flag disabled. + else if (modifier[0] == '\0') { ShowWarning("npc_parse_mapflag: Missing 5th param for 'adjust_skill_damage' flag! removing flag from %s in file '%s', line '%d'.\n", map->list[m].name, filepath, strline(buffer,start-buffer)); if (retval) *retval = EXIT_FAILURE; } else if( !( skill_id = skill->name2id(skill_name) ) ) { |