summaryrefslogtreecommitdiff
path: root/src/map/vending.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/vending.c')
-rw-r--r--src/map/vending.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/vending.c b/src/map/vending.c
index 935971b16..0420d5288 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -42,7 +42,6 @@ void vending_closevending(struct map_session_data* sd)
void vending_vendinglistreq(struct map_session_data* sd, int id)
{
struct map_session_data* vsd;
-
nullpo_retv(sd);
if( (vsd = map_id2sd(id)) == NULL )
@@ -50,6 +49,12 @@ void vending_vendinglistreq(struct map_session_data* sd, int id)
if( vsd->vender_id == 0 )
return; // not vending
+ if ( !pc_can_give_items(pc_isGM(sd)) || !pc_can_give_items(pc_isGM(vsd)) ) //check if both GMs are allowed to trade
+ { // GM is not allowed to trade
+ clif_displaymessage(sd->fd, msg_txt(246));
+ return;
+ }
+
clif_vendinglist(sd, id, vsd->vending);
}