diff options
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 36078837f..efc27c258 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2464,24 +2464,21 @@ void npc_addsrcfile(const char* name) file_prev->next = file; } -/// Removes a npc source file (or all) -void npc_delsrcfile(const char* name) +/** + * Removes a npc source file. + * + * @param name The file name to remove. + */ +void npc_delsrcfile(const char *name) { struct npc_src_list* file = npc->src_files; struct npc_src_list* file_prev = NULL; nullpo_retv(name); - if( strcmpi(name, "all") == 0 ) - { - npc->clearsrcfile(); - return; - } - while( file != NULL ) - { - if( strcmp(file->name, name) == 0 ) - { - if( npc->src_files == file ) + while (file != NULL) { + if (strcmp(file->name, name) == 0) { + if (npc->src_files == file) npc->src_files = file->next; else file_prev->next = file->next; |