From ef7452b497d24f6f475d214f1244ab589b304c7c Mon Sep 17 00:00:00 2001 From: zephyrus Date: Sat, 20 Jun 2009 17:56:01 +0000 Subject: - Instancing System (Thanks to Sirius White who did most of the code, with some of my work to implement client side information, some optimizations and bugfixes). Also thanks to contributions from UEAUP team and Orcao. - Fixed a bug on areamobuseskill and changed it to make it as Aegis. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13901 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/common/db.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/common/db.c') diff --git a/src/common/db.c b/src/common/db.c index 6506fb889..537f26e6a 100644 --- a/src/common/db.c +++ b/src/common/db.c @@ -2562,6 +2562,21 @@ void linkdb_insert( struct linkdb_node** head, void *key, void* data) node->data = data; } +void linkdb_foreach( struct linkdb_node** head, LinkDBFunc func, ... ) +{ + va_list args; + struct linkdb_node *node; + + if( head == NULL ) return; + + va_start(args, func); + node = *head; + while ( node ) { + func( node->key, node->data, args ); + node = node->next; + } +} + void* linkdb_search( struct linkdb_node** head, void *key) { int n = 0; -- cgit v1.2.3-60-g2f50