summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-09-21 21:15:31 +0200
committerHaru <haru@dotalux.com>2016-09-21 21:15:31 +0200
commit4c2beb2e5e6ca6f3c12e0f068f8416d76ae85d67 (patch)
tree80eb94bece5e97abf465f64fe429a73bf0a8cf04 /src/map
parent70085b2a067a4ce96a5b95154401211921197967 (diff)
downloadhercules-4c2beb2e5e6ca6f3c12e0f068f8416d76ae85d67.tar.gz
hercules-4c2beb2e5e6ca6f3c12e0f068f8416d76ae85d67.tar.bz2
hercules-4c2beb2e5e6ca6f3c12e0f068f8416d76ae85d67.tar.xz
hercules-4c2beb2e5e6ca6f3c12e0f068f8416d76ae85d67.zip
Fixed a wrong check in the SA_FREECAST handling code
- Don't skip the check for Free Cast's absence unless the cast skill's INF2_FREE_CAST_* flags aren't unset. - Follow-up to 19a06cae9a03ae7c390db18ca95b74bd6033dc4e - Fixes #1439 Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/unit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 978dd54b3..5364a9547 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1073,8 +1073,8 @@ int unit_can_move(struct block_list *bl)
// Prevent moving while casting
if (sd == NULL)
return 0; // Only players are affected by SA_FREECAST and similar
- if ((skill->get_inf2(ud->skill_id) & (INF2_FREE_CAST_REDUCED | INF2_FREE_CAST_NORMAL)) != 0) {
- // Skills with an explicit free cast setting always allow walking
+ if ((skill->get_inf2(ud->skill_id) & (INF2_FREE_CAST_REDUCED | INF2_FREE_CAST_NORMAL)) == 0) {
+ // Skills with an explicit free cast setting always allow walking regardless of SA_FREECAST
if ((skill->get_inf2(ud->skill_id) & INF2_GUILD_SKILL) != 0)
return 0; // SA_FREECAST doesn't affect guild skills
if (pc->checkskill(sd, SA_FREECAST) == 0)