diff options
author | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-03-27 18:43:31 +0000 |
---|---|---|
committer | ai4rei <ai4rei@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-03-27 18:43:31 +0000 |
commit | fd625485b8ab08aa9df7115d630076cb2ca6d9af (patch) | |
tree | 48bbfa255756163d6943a21968726bf309d354a7 /src/map/pc.c | |
parent | bf8bae03ea42ffb8684beb999ca1101e5f11fb48 (diff) | |
download | hercules-fd625485b8ab08aa9df7115d630076cb2ca6d9af.tar.gz hercules-fd625485b8ab08aa9df7115d630076cb2ca6d9af.tar.bz2 hercules-fd625485b8ab08aa9df7115d630076cb2ca6d9af.tar.xz hercules-fd625485b8ab08aa9df7115d630076cb2ca6d9af.zip |
* Added separate character state for vending (like for buyingstore), instead of vender_id != 0 (follow up to r14682, related r14713).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14762 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 396eb0ae5..aac8b45ec 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -3435,7 +3435,7 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount) if(sd->status.inventory[n].nameid <= 0 || sd->status.inventory[n].amount <= 0 || sd->status.inventory[n].amount < amount || - sd->state.trading || sd->vender_id != 0 || + sd->state.trading || sd->state.vending || !sd->inventory_data[n] //pc_delitem would fail on this case. ) return 0; @@ -3870,7 +3870,7 @@ int pc_putitemtocart(struct map_session_data *sd,int idx,int amount) item_data = &sd->status.inventory[idx]; - if( item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->vender_id ) + if( item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->state.vending ) return 1; if( pc_cart_additem(sd,item_data,amount) == 0 ) @@ -3910,7 +3910,7 @@ int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount) item_data=&sd->status.cart[idx]; - if(item_data->nameid==0 || amount < 1 || item_data->amount<amount || sd->vender_id ) + if(item_data->nameid==0 || amount < 1 || item_data->amount<amount || sd->state.vending ) return 1; if((flag = pc_additem(sd,item_data,amount)) == 0) return pc_cart_delitem(sd,idx,amount,0); @@ -7313,7 +7313,7 @@ int pc_checkitem(struct map_session_data *sd) nullpo_ret(sd); - if( sd->vender_id ) //Avoid reorganizing items when we are vending, as that leads to exploits (pointed out by End of Exam) + if( sd->state.vending ) //Avoid reorganizing items when we are vending, as that leads to exploits (pointed out by End of Exam) return 0; if( battle_config.item_check ) |