summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2018-07-01 18:44:06 +0200
committerGitHub <noreply@github.com>2018-07-01 18:44:06 +0200
commita9b22af50cb5af61486adb810a6724fb3d9f02ee (patch)
tree017615bafe523f6740d767d83009e810811b5ee6
parente32fe0d37340cc46f493cfcfa349a0faef752cf2 (diff)
parentcd87c2b239001596352b9bd5a4ae0c54b96d1e6d (diff)
downloadhercules-a9b22af50cb5af61486adb810a6724fb3d9f02ee.tar.gz
hercules-a9b22af50cb5af61486adb810a6724fb3d9f02ee.tar.bz2
hercules-a9b22af50cb5af61486adb810a6724fb3d9f02ee.tar.xz
hercules-a9b22af50cb5af61486adb810a6724fb3d9f02ee.zip
Merge pull request #2091 from AnnieRuru/46-novending
Fix novending cause player gets stuck
-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 f437ce66c..b03b49bb6 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);