diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 2f03623e4..6ba088a80 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 ) { @@ -5728,8 +5728,10 @@ static bool npc_unloadfile(const char *filepath, bool unload_mobs) dbi_destroy(iter); - if (found) /// Refresh event cache. + if (found) { /// Refresh event cache. + npc->motd = npc->name2id("HerculesMOTD"); npc->read_event_script(); + } return found; } |