diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-26 13:59:21 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-09-26 13:59:21 +0000 |
commit | db4bf8d09b97e6320374a6162815c03952624eea (patch) | |
tree | f73c611523908e6a58653ad3e83b0bc2e3d4dc8b /src/char_sql/itemdb.c | |
parent | 4fa74f63b163da3defdf22c7135b91cb6acfdcf0 (diff) | |
download | hercules-db4bf8d09b97e6320374a6162815c03952624eea.tar.gz hercules-db4bf8d09b97e6320374a6162815c03952624eea.tar.bz2 hercules-db4bf8d09b97e6320374a6162815c03952624eea.tar.xz hercules-db4bf8d09b97e6320374a6162815c03952624eea.zip |
- Updated battle_check_target so that non-offensive skills cannot be used on a homun except for the homun and it's master.
- Steal zeny won't work on treasure chests now.
- Small optimization in the dual-wielding check.
- Some cleaning in char_sql/itemdb.c
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8875 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/itemdb.c')
-rw-r--r-- | src/char_sql/itemdb.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/char_sql/itemdb.c b/src/char_sql/itemdb.c index a8148f866..e3d37ca85 100644 --- a/src/char_sql/itemdb.c +++ b/src/char_sql/itemdb.c @@ -26,29 +26,9 @@ static struct dbt* item_db; static void* create_item(DBKey key, va_list args) {
struct item_data *id;
int nameid = key.i;
-
CREATE(id, struct item_data, 1);
- id->nameid = nameid;
- if(nameid>500 && nameid<600)
- id->type=0; //heal item
- else if(nameid>600 && nameid<700)
- id->type=2; //use item
- else if((nameid>700 && nameid<1100) ||
- (nameid>7000 && nameid<8000))
- id->type=3; //correction
- else if(nameid>=1750 && nameid<1771)
- id->type=10; //arrow
- else if(nameid>1100 && nameid<2000)
- id->type=4; //weapon
- else if((nameid>2100 && nameid<3000) ||
- (nameid>5000 && nameid<6000))
- id->type=5; //armor
- else if(nameid>4000 && nameid<5000)
- id->type=6; //card
- else if(nameid>9000 && nameid<10000)
- id->type=7; //egg
- else if(nameid>10000)
- id->type=8; //petequip
+ id->nameid = nameid;
+ id->type = IT_ETC;
return id;
}
/*==========================================
@@ -67,7 +47,7 @@ struct item_data* itemdb_search(int nameid) int itemdb_isequip(int nameid)
{
int type=itemdb_type(nameid);
- if(type==0 || type==2 || type==3 || type==6 || type==10)
+ if(type==IT_HEALING || type==IT_USABLE || type==IT_ETC || type==IT_CARD || type==IT_AMMO)
return 0;
return 1;
}
@@ -79,7 +59,7 @@ int itemdb_isequip2(struct item_data *data) {
if(data) {
int type=data->type;
- if(type==0 || type==2 || type==3 || type==6 || type==10)
+ if(type==IT_HEALING || type==IT_USABLE || type==IT_ETC || type==IT_CARD || type==IT_AMMO)
return 0;
else
return 1;
|