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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 98dd2d609..f1ff119da 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -150,6 +150,19 @@ struct npc_data* npc_name2id(const char* name)
return (struct npc_data *) strdb_get(npcname_db, name);
}
+
+/*==========================================
+ * Run function for each npc
+ *------------------------------------------*/
+
+void npc_foreach(int (*func)(DBKey, void*, va_list), ...)
+{
+ va_list ap;
+ va_start(ap, func);
+ npcname_db->vforeach(npcname_db, func, ap);
+ va_end(ap);
+}
+
/*==========================================
* イベントキューのイベント処理
*------------------------------------------*/