summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-09-18 01:32:22 +0200
committerHaru <haru@dotalux.com>2016-09-18 01:44:43 +0200
commitc940d5f31aea1220c684189dc06206a400f59e99 (patch)
tree19dd4da788e6cc7b5520d1652c60a5d6e65a94e0 /src/map
parent53dcedee75954229dcd56c2f04e42e725a1a7359 (diff)
downloadhercules-c940d5f31aea1220c684189dc06206a400f59e99.tar.gz
hercules-c940d5f31aea1220c684189dc06206a400f59e99.tar.bz2
hercules-c940d5f31aea1220c684189dc06206a400f59e99.tar.xz
hercules-c940d5f31aea1220c684189dc06206a400f59e99.zip
Removed special handling of "all" by npc->delsrcfile()
- Use npc->clearsrcfile() instead. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/npc.c21
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;