diff options
author | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-06-20 17:56:01 +0000 |
---|---|---|
committer | zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-06-20 17:56:01 +0000 |
commit | ef7452b497d24f6f475d214f1244ab589b304c7c (patch) | |
tree | c24bedb42ecf633efada0475417d7f0592d2e1ab /src/common/db.c | |
parent | 6f700c626efe9253ce77865667d1d5e598daab65 (diff) | |
download | hercules-ef7452b497d24f6f475d214f1244ab589b304c7c.tar.gz hercules-ef7452b497d24f6f475d214f1244ab589b304c7c.tar.bz2 hercules-ef7452b497d24f6f475d214f1244ab589b304c7c.tar.xz hercules-ef7452b497d24f6f475d214f1244ab589b304c7c.zip |
- 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
Diffstat (limited to 'src/common/db.c')
-rw-r--r-- | src/common/db.c | 15 |
1 files changed, 15 insertions, 0 deletions
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; |