diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-13 21:46:58 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-13 21:46:58 -0600 |
commit | 838988612ff7171369aa93094b8d6166bb599f9f (patch) | |
tree | 6e243bcafe7451bfb4be7aba4afcc95889a6e0b6 /src/map | |
parent | 942dfed655b9e59a20e93e28bb41fe779516bc86 (diff) | |
download | tmwa-838988612ff7171369aa93094b8d6166bb599f9f.tar.gz tmwa-838988612ff7171369aa93094b8d6166bb599f9f.tar.bz2 tmwa-838988612ff7171369aa93094b8d6166bb599f9f.tar.xz tmwa-838988612ff7171369aa93094b8d6166bb599f9f.zip |
Remov eitem classes
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/itemdb.c | 15 | ||||
-rw-r--r-- | src/map/itemdb.h | 10 | ||||
-rw-r--r-- | src/map/pc.c | 20 |
3 files changed, 9 insertions, 36 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 499b776..41ada0a 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -149,7 +149,6 @@ struct item_data* itemdb_search(int nameid) id->weight=10; id->sex=2; id->elv=0; - id->class=0xffffffff; id->flag.available=0; id->flag.value_notdc=0; //一応・・・ id->flag.value_notoc=0; @@ -313,7 +312,6 @@ static int itemdb_readdb(void) memcpy(id->name,str[1],24); memcpy(id->jname,str[2],24); id->type=atoi(str[3]); - // buy≠sell*2 は item_value_db.txt で指定してください。 id->value_buy=atoi(str[4]); id->value_sell=atoi(str[5]); if (id->value_buy == 0 && id->value_sell == 0) { @@ -328,14 +326,11 @@ static int itemdb_readdb(void) id->range=atoi(str[9]); id->magic_bonus = atoi(str[10]); id->slot=atoi(str[11]); - id->class=atoi(str[12]); - id->sex=atoi(str[13]); - if(id->equip != atoi(str[14])){ - id->equip=atoi(str[14]); - } - id->wlv=atoi(str[15]); - id->elv=atoi(str[16]); - id->look=atoi(str[17]); + id->sex=atoi(str[12]); + id->equip=atoi(str[13]); + id->wlv=atoi(str[14]); + id->elv=atoi(str[15]); + id->look=atoi(str[16]); id->flag.available=1; id->flag.value_notdc=0; id->flag.value_notoc=0; diff --git a/src/map/itemdb.h b/src/map/itemdb.h index a10a857..9c971a3 100644 --- a/src/map/itemdb.h +++ b/src/map/itemdb.h @@ -12,7 +12,6 @@ struct item_data { int value_buy; int value_sell; int type; - int class; int sex; int equip; int weight; @@ -25,8 +24,8 @@ struct item_data { int elv; int wlv; int refine; - char *use_script; // 回復とかも全部この中でやろうかなと - char *equip_script; // 攻撃,防御の属性設定もこの中で可能かな? + char *use_script; + char *equip_script; struct { unsigned available : 1; unsigned value_notdc : 1; @@ -72,11 +71,6 @@ int itemdb_isequip2(struct item_data *); int itemdb_isequip3(int); int itemdb_isdropable(int nameid); -// itemdb_equipマクロとitemdb_equippointとの違いは -// 前者が鯖側dbで定義された値そのものを返すのに対し -// 後者はsessiondataを考慮した鞍側での装備可能場所 -// すべての組み合わせを返す - void itemdb_reload(void); void do_final_itemdb(void); diff --git a/src/map/pc.c b/src/map/pc.c index 8b3d9ef..cae2d68 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -542,19 +542,9 @@ int pc_isequip(struct map_session_data *sd,int n) return 0; if(item->elv > 0 && sd->status.base_level < item->elv) return 0; -// -- moonsoul (below statement substituted for commented out version further below -// as it allows all advanced classes to equip items their normal versions -// could equip) -// - if(((sd->status.class==13 || sd->status.class==4014) && ((1<<7)&item->class) == 0) || // have mounted classes use unmounted equipment [Valaris] - ((sd->status.class==21 || sd->status.class==4022) && ((1<<14)&item->class) == 0)) - return 0; + if(sd->status.class!=13 && sd->status.class!=4014 && sd->status.class!=21 && sd->status.class!=4022) - if((sd->status.class<=4000 && ((1<<sd->status.class)&item->class) == 0) || (sd->status.class>4000 && sd->status.class<4023 && ((1<<(sd->status.class-4001))&item->class) == 0) || - (sd->status.class>=4023 && ((1<<(sd->status.class-4023))&item->class) == 0)) - return 0; -// if(((1<<sd->status.class)&item->class) == 0) -// return 0; + if(map[sd->bl.m].flag.pvp && (item->flag.no_equip==1 || item->flag.no_equip==3)) return 0; if(map[sd->bl.m].flag.gvg && (item->flag.no_equip==2 || item->flag.no_equip==3)) @@ -3101,13 +3091,7 @@ int pc_isUseitem(struct map_session_data *sd,int n) return 0; if(item->elv > 0 && sd->status.base_level < item->elv) return 0; - if(((sd->status.class==13 || sd->status.class==4014) && ((1<<7)&item->class) == 0) || // have mounted classes use unmounted items [Valaris] - ((sd->status.class==21 || sd->status.class==4022) && ((1<<14)&item->class) == 0)) - return 0; if(sd->status.class!=13 && sd->status.class!=4014 && sd->status.class!=21 && sd->status.class!=4022) - if((sd->status.class<=4000 && ((1<<sd->status.class)&item->class) == 0) || (sd->status.class>4000 && sd->status.class<4023 && ((1<<(sd->status.class-4001))&item->class) == 0) || - (sd->status.class>=4023 && ((1<<(sd->status.class-4023))&item->class) == 0)) - return 0; return 1; } |