From da523d9fcd0cef2c379c0f232e6af98ef6f23b01 Mon Sep 17 00:00:00 2001 From: Aleos Date: Thu, 30 Apr 2020 11:12:54 -0400 Subject: [PATCH] Stop vending when an invalid list is received (#4868) * Fixes #4778. * Vending will now be stopped if an invalid list is received. Thanks to @blipblopblip! --- src/map/vending.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/map/vending.cpp b/src/map/vending.cpp index f2232be490..7f41d5f69a 100755 --- a/src/map/vending.cpp +++ b/src/map/vending.cpp @@ -350,8 +350,11 @@ int8 vending_openvending(struct map_session_data* sd, const char* message, const i++; // item successfully added } - if( i != j ) - clif_displaymessage (sd->fd, msg_txt(sd,266)); //"Some of your items cannot be vended and were removed from the shop." + if (i != j) { + clif_displaymessage(sd->fd, msg_txt(sd, 266)); //"Some of your items cannot be vended and were removed from the shop." + clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0); // custom reply packet + return 5; + } if( i == 0 ) { // no valid item found clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0); // custom reply packet