浏览代码

Fixed players without can_trade permission being able to sell items to NPC (#6511)

Daegaladh 3 年之前
父节点
当前提交
be4e648fad
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/map/pc.cpp

+ 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;