diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-11 11:26:55 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-07-11 11:26:55 +0000 |
commit | ff4d9ac980318119e4293de7057a811dcf798d7d (patch) | |
tree | decfc813b8026cdff04337973dc62e082709df8b /src/map/pc.c | |
parent | 1de0eb7a5d7752fd03675be0598146632256bb80 (diff) | |
download | hercules-ff4d9ac980318119e4293de7057a811dcf798d7d.tar.gz hercules-ff4d9ac980318119e4293de7057a811dcf798d7d.tar.bz2 hercules-ff4d9ac980318119e4293de7057a811dcf798d7d.tar.xz hercules-ff4d9ac980318119e4293de7057a811dcf798d7d.zip |
Implementing Kenpachi's design of item_combo_db.txt
- Credits to Kenpachi and Masao for the db file edits.
- Credits to GreenBox for the parsing
- This commit might accidentally override a few item db entries, our db developers are expecting this and will work on the conflicting entries.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16393 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index e1ba324b1..6c15adce6 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -999,7 +999,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim if (!(battle_config.display_skill_fail&2)) sd->state.showdelay = 1; - + pc_setinventorydata(sd); pc_setequipindex(sd); @@ -8012,14 +8012,15 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos) run_script(id->equip_script,0,sd->bl.id,fake_nd->bl.id); if(itemdb_isspecial(sd->status.inventory[n].card[0])) ; //No cards - else - for(i=0;i<id->slot; i++) - { - if (!sd->status.inventory[n].card[i]) - continue; - data = itemdb_exists(sd->status.inventory[n].card[i]); - if (data && data->equip_script) - run_script(data->equip_script,0,sd->bl.id,fake_nd->bl.id); + else { + for( i = 0; i < id->slot; i++ ) { + if (!sd->status.inventory[n].card[i]) + continue; + if ( ( data = itemdb_exists(sd->status.inventory[n].card[i]) ) != NULL ) { + if( data->equip_script ) + run_script(data->equip_script,0,sd->bl.id,fake_nd->bl.id); + } + } } } return 0; @@ -8140,14 +8141,17 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) run_script(sd->inventory_data[n]->unequip_script,0,sd->bl.id,fake_nd->bl.id); if(itemdb_isspecial(sd->status.inventory[n].card[0])) ; //No cards - else - for(i=0;i<sd->inventory_data[n]->slot; i++) - { - if (!sd->status.inventory[n].card[i]) - continue; - data = itemdb_exists(sd->status.inventory[n].card[i]); - if (data && data->unequip_script) - run_script(data->unequip_script,0,sd->bl.id,fake_nd->bl.id); + else { + for( i = 0; i < sd->inventory_data[n]->slot; i++ ) { + if (!sd->status.inventory[n].card[i]) + continue; + + if ( ( data = itemdb_exists(sd->status.inventory[n].card[i]) ) != NULL ) { + if( data->unequip_script ) + run_script(data->unequip_script,0,sd->bl.id,fake_nd->bl.id); + } + + } } } |