summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
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 )