Skip to content
Permalink
Browse files
Fixed players without can_trade permission being able to sell items t…
…o NPC (#6511)
  • Loading branch information
Daegaladh committed Jan 13, 2022
1 parent 0d8118c commit be4e648fad7db3cf1d28880110dd62d7f1765cf6
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/map/pc.cpp
@@ -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;

0 comments on commit be4e648

Please sign in to comment.