diff options
author | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-08 14:08:32 +0000 |
---|---|---|
committer | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-08 14:08:32 +0000 |
commit | b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4 (patch) | |
tree | b7f079f5317d736e49fdf8b12f6d3f18b2a98daf /src/map/npc.c | |
parent | ad2a3a12e2d603e8ef2011d1121271b7ed2f05eb (diff) | |
download | hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.tar.gz hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.tar.bz2 hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.tar.xz hercules-b5be01c5baca2d51da4ec9a138e3bb57eea7cbb4.zip |
* Changed EXIT_SUCCESS back to 0 in console.c to avoid an unnecessary include.
* Fixed gm_account_db not being deallocated in login-converter.c.
* Refactoring names and documentation in db.h/db.c:
- changed 'struct dbt' to 'struct DBMap' and 'DB' to 'DBMap*'
- changed 'struct db' to 'struct DBMap_impl' and 'DB_impl' to 'DBMap_impl*'
- changed COUNT to DB_COUNTSTAT and made it's existence not depend on DB_ENABLE_STATS
- removed some @see links and corrected small typos in the documentation
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11698 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 3649731ed..f6e7f0cf0 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -49,8 +49,8 @@ static int npc_delay_mob=0; static int npc_cache_mob=0; int npc_get_new_npc_id(void){ return npc_id++; } -static struct dbt *ev_db; -static struct dbt *npcname_db; +static DBMap* ev_db; // const char* event_name -> struct event_data* +static DBMap* npcname_db; // const char* npc_name -> struct npc_data* struct event_data { struct npc_data *nd; @@ -1794,7 +1794,7 @@ static const char* npc_parse_script(char* w1, char* w2, char* w3, char* w4, cons src_id = 0; if( script ) { - DB label_db = script_get_label_db(); + DBMap* label_db = script_get_label_db(); label_db->foreach(label_db, npc_convertlabel_db, &label_list, &label_list_num, filepath); label_db->clear(label_db, NULL); // not needed anymore, so clear the db } @@ -2022,7 +2022,7 @@ int npc_changename(const char* name, const char* newname, short look) /// function%TAB%script%TAB%<function name>%TAB%{<code>} static const char* npc_parse_function(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath) { - struct dbt *func_db; + DBMap* func_db; struct script_code *script; struct script_code *oldscript; const char* end; @@ -2867,8 +2867,8 @@ int do_init_npc(void) for( i = 1; i < MAX_NPC_CLASS; i++ ) npc_viewdb[i].class_ = i; - ev_db = db_alloc(__FILE__,__LINE__,DB_STRING,DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA,2*NAME_LENGTH+2+1); - npcname_db = db_alloc(__FILE__,__LINE__,DB_STRING,DB_OPT_BASE,NAME_LENGTH); + ev_db = strdb_alloc(DB_OPT_DUP_KEY|DB_OPT_RELEASE_DATA,2*NAME_LENGTH+2+1); + npcname_db = strdb_alloc(DB_OPT_BASE,NAME_LENGTH); memset(&ev_tm_b, -1, sizeof(ev_tm_b)); timer_event_ers = ers_new(sizeof(struct timer_event_data)); |