diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-26 05:59:25 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-26 05:59:25 +0000 |
commit | 49d657d5ccffd9ccf2b77e7dfb5010c93bc37acc (patch) | |
tree | 891d654f751a312d70e2de25cb85539fec741ca8 /src/map/itemdb.c | |
parent | 19dadc72ab415ac14aead231c63e2b6fe28be2cf (diff) | |
download | hercules-49d657d5ccffd9ccf2b77e7dfb5010c93bc37acc.tar.gz hercules-49d657d5ccffd9ccf2b77e7dfb5010c93bc37acc.tar.bz2 hercules-49d657d5ccffd9ccf2b77e7dfb5010c93bc37acc.tar.xz hercules-49d657d5ccffd9ccf2b77e7dfb5010c93bc37acc.zip |
- itemdb_exists and itemdb_searchname should now ignore dummy_item matches.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5755 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r-- | src/map/itemdb.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 9d64e4184..f9e47d56f 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -42,6 +42,7 @@ int itemdb_searchname_sub(DBKey key,void *data,va_list ap) char *str;
str=va_arg(ap,char *);
dst=va_arg(ap,struct item_data **);
+ if(item == dummy_item) return 0;
if( strcmpi(item->name,str)==0 ) //by lupus
*dst=item;
return 0;
@@ -183,7 +184,9 @@ int itemdb_searchrandomgroup (int groupid) */
struct item_data* itemdb_exists(int nameid)
{
- return idb_get(item_db,nameid);
+ struct item_data* id = idb_get(item_db,nameid);
+ if (id == dummy_item) return NULL;
+ return id;
}
/*==========================================
|