summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorKevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-27 07:18:21 +0000
committerKevin <Kevin@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-04-27 07:18:21 +0000
commit677598256feaad3bcef53805ad8c70e744a9b7d3 (patch)
tree3a4b061dc62ac53fbd80c1434990a47dca0d54d9 /src/map/npc.c
parentab60cf06afb586b106991b4b9848dd9c107ddec2 (diff)
downloadhercules-677598256feaad3bcef53805ad8c70e744a9b7d3.tar.gz
hercules-677598256feaad3bcef53805ad8c70e744a9b7d3.tar.bz2
hercules-677598256feaad3bcef53805ad8c70e744a9b7d3.tar.xz
hercules-677598256feaad3bcef53805ad8c70e744a9b7d3.zip
Some major changes to @reloaditemdb to allow unloading of any item while map server is running.
- Delete any item from inventory/cart/open storages that went missing during the reload. - Delete item from any shop that has this item. - Refresh item screen for anyone who has a shop open. - Delete mob db drop table references. - Delete item from storage during load if it isn't in the item db. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12661 54d463be-8e91-2dee-dedb-b68131a5f0ec
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);
+}
+
/*==========================================
* イベントキューのイベント処理
*------------------------------------------*/