summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 8e5854dbf..cf509e11f 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -4306,7 +4306,8 @@ void npc_process_files( int npc_min ) {
ShowStatus("Loading NPCs...\r");
for( file = npc->src_files; file != NULL; file = file->next ) {
ShowStatus("Loading NPC file: %s"CL_CLL"\r", file->name);
- npc->parsesrcfile(file->name, false);
+ if (npc->parsesrcfile(file->name, false) != EXIT_SUCCESS)
+ map->retval = EXIT_FAILURE;
}
ShowInfo ("Done loading '"CL_WHITE"%d"CL_RESET"' NPCs:"CL_CLL"\n"
"\t-'"CL_WHITE"%d"CL_RESET"' Warps\n"
@@ -4325,6 +4326,9 @@ int npc_reload(void) {
struct s_mapiterator* iter;
struct block_list* bl;
+ if (map->retval == EXIT_FAILURE)
+ map->retval = EXIT_SUCCESS; // Clear return status in case something failed before.
+
/* clear guild flag cache */
guild->flags_clear();