summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2019-05-05 23:23:05 +0200
committerGitHub <noreply@github.com>2019-05-05 23:23:05 +0200
commitb1970eac663b641b93e30ec24f2b3d8ee02ce8f6 (patch)
treef363d01b6181e4cfcdad109dc6d56873a73eaa15 /src/map/pc.c
parentaa79da0e801a536b22911d47fd12df351c36214e (diff)
parentb8ce5e9e1352abc45b08f92eb50890f202b1b230 (diff)
downloadhercules-b1970eac663b641b93e30ec24f2b3d8ee02ce8f6.tar.gz
hercules-b1970eac663b641b93e30ec24f2b3d8ee02ce8f6.tar.bz2
hercules-b1970eac663b641b93e30ec24f2b3d8ee02ce8f6.tar.xz
hercules-b1970eac663b641b93e30ec24f2b3d8ee02ce8f6.zip
Merge pull request #2432 from 4144/updatepackets
Update packets up to 2019-05-02
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 140cf7ac1..5416fbec2 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4854,7 +4854,7 @@ static 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->state.vending ||
+ sd->state.trading || sd->state.vending || sd->state.prevend ||
!sd->inventory_data[n] //pc->delitem would fail on this case.
)
return 0;
@@ -5472,7 +5472,7 @@ static 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->state.vending )
+ if (item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->state.vending || sd->state.prevend)
return 1;
if( (flag = pc->cart_additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0 )
@@ -5519,10 +5519,10 @@ static 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->state.vending )
+ if (item_data->nameid == 0 || amount < 1 || item_data->amount < amount || sd->state.vending || sd->state.prevend)
return 1;
- if((flag = pc->additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0)
+ if ((flag = pc->additem(sd,item_data,amount,LOG_TYPE_NONE)) == 0)
return pc->cart_delitem(sd,idx,amount,0,LOG_TYPE_NONE);
return flag;
@@ -12356,7 +12356,7 @@ static bool pc_expandInventory(struct map_session_data *sd, int adjustSize)
clif->inventoryExpandResult(sd, EXPAND_INVENTORY_RESULT_MAX_SIZE);
return false;
}
- if (pc_isdead(sd) || sd->state.vending || sd->state.buyingstore || sd->chat_id != 0 || sd->state.trading || sd->state.storage_flag || sd->state.prevend) {
+ if (pc_isdead(sd) || sd->state.vending || sd->state.prevend || sd->state.buyingstore || sd->chat_id != 0 || sd->state.trading || sd->state.storage_flag || sd->state.prevend) {
clif->inventoryExpandResult(sd, EXPAND_INVENTORY_RESULT_OTHER_WORK);
return false;
}