diff options
author | Haru <haru@dotalux.com> | 2020-06-01 02:46:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 02:46:12 +0200 |
commit | 183488e0088f59242b0ab609271d126dc2a6c758 (patch) | |
tree | 7cbcefd162a683bd083f556ea11d75369999bc85 /src/map/npc.c | |
parent | 0a2097d8e295a329ad3d0e732fb74e77707dc2bb (diff) | |
parent | 560b765a844c453ce2c7cff24a63735f11dc4f0f (diff) | |
download | hercules-183488e0088f59242b0ab609271d126dc2a6c758.tar.gz hercules-183488e0088f59242b0ab609271d126dc2a6c758.tar.bz2 hercules-183488e0088f59242b0ab609271d126dc2a6c758.tar.xz hercules-183488e0088f59242b0ab609271d126dc2a6c758.zip |
Merge pull request #2731 from Kenpachi2k13/skill_db_update
Extend and clean up skill DB code
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 2f03623e4..5b009ab21 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -5104,7 +5104,7 @@ static const char *npc_parse_mapflag(const char *w1, const char *w2, const char 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) ) { + } else if ((skill_id = skill->name2id(skill_name)) == 0 || skill->get_unit_id(skill->name2id(skill_name), 1, 0) == 0) { ShowWarning("npc_parse_mapflag: Unknown skill (%s) for 'adjust_unit_duration' flag! removing flag from %s in file '%s', line '%d'.\n",skill_name, map->list[m].name, filepath, strline(buffer,start-buffer)); if (retval) *retval = EXIT_FAILURE; } else if ( atoi(modifier) < 1 || atoi(modifier) > USHRT_MAX ) { |