Skip to content

Commit

Permalink
Fixed players without can_trade permission being able to sell items t…
Browse files Browse the repository at this point in the history
…o NPC (#6511)
  • Loading branch information
Daegaladh committed Jan 13, 2022
1 parent 0d8118c commit be4e648
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/map/pc.cpp
Expand Up @@ -942,6 +942,9 @@ bool pc_can_sell_item(struct map_session_data *sd, struct item *item, enum npc_s
if (sd == NULL || item == NULL)
return false;

if (!pc_can_give_items(sd))
return false;

if (item->equip > 0 || item->amount < 0)
return false;

Expand Down

0 comments on commit be4e648

Please sign in to comment.