summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAnnieRuru <jeankof@ymail.com>2018-06-18 08:46:01 +0800
committerAnnieRuru <jeankof@ymail.com>2018-06-18 08:46:01 +0800
commitcd87c2b239001596352b9bd5a4ae0c54b96d1e6d (patch)
tree2ea77bb845f6b2f3277316c5e58771d62acd318a /src
parentd2c0e453fc95b3f8ce9270e8290d15687e6e3235 (diff)
downloadhercules-cd87c2b239001596352b9bd5a4ae0c54b96d1e6d.tar.gz
hercules-cd87c2b239001596352b9bd5a4ae0c54b96d1e6d.tar.bz2
hercules-cd87c2b239001596352b9bd5a4ae0c54b96d1e6d.tar.xz
hercules-cd87c2b239001596352b9bd5a4ae0c54b96d1e6d.zip
Fix novending cause player gets stuck
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 6eacde897..1e6a291db 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -14137,6 +14137,19 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
// perform skill-specific checks (and actions)
switch( skill_id ) {
+ case MC_VENDING:
+ case ALL_BUYING_STORE:
+ if (map->list[sd->bl.m].flag.novending) {
+ clif->message(sd->fd, msg_sd(sd, 276)); // "You can't open a shop on this map"
+ clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
+ return 0;
+ }
+ if (map->getcell(sd->bl.m, &sd->bl, sd->bl.x, sd->bl.y, CELL_CHKNOVENDING)) {
+ clif->message(sd->fd, msg_sd(sd, 204)); // "You can't open a shop on this cell."
+ clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
+ return 0;
+ }
+ break;
case SO_SPELLFIST:
if(sd->skill_id_old != MG_FIREBOLT && sd->skill_id_old != MG_COLDBOLT && sd->skill_id_old != MG_LIGHTNINGBOLT){
clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);