summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2020-05-04 14:25:04 +0200
committerGitHub <noreply@github.com>2020-05-04 14:25:04 +0200
commita126526feea0acbbc4cc8c591b8759093b144dd9 (patch)
treebeff524d797ea48c037f165d457f3e96746f95f5 /src/map/skill.c
parent43b9a6987c5fc22c15c817a7c364393b49fb5f36 (diff)
parentcd593de68b02d77766fcb3b7b2a869096ceb7183 (diff)
downloadhercules-a126526feea0acbbc4cc8c591b8759093b144dd9.tar.gz
hercules-a126526feea0acbbc4cc8c591b8759093b144dd9.tar.bz2
hercules-a126526feea0acbbc4cc8c591b8759093b144dd9.tar.xz
hercules-a126526feea0acbbc4cc8c591b8759093b144dd9.zip
Merge pull request #2188 from bWolfie/cell_noskill
Adds 'cell_noskill' which blocks skill usage.
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 0ead96472..caa1a0f29 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1026,6 +1026,9 @@ static int skillnotok(uint16 skill_id, struct map_session_data *sd)
if (pc_has_permission(sd, PC_PERM_SKILL_UNCONDITIONAL))
return 0; // can do any damn thing they want
+ if (map->getcell(sd->bl.m, &sd->bl, sd->bl.x, sd->bl.y, CELL_CHKNOSKILL))
+ return 1; // block usage on 'noskill' cells [Wolfie]
+
if (skill_id == AL_TELEPORT && sd->autocast.type == AUTOCAST_ITEM && sd->autocast.skill_lv > 2)
return 0; // Teleport level 3 and higher bypasses this check if cast by itemskill() script commands.