summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-07-19 01:57:38 +0300
committerAndrei Karas <akaras@inbox.ru>2016-07-19 02:32:01 +0300
commit895341723c0c601c798e22c0a53f0aaaa73e08d1 (patch)
treeab62be821a89665710102301c8bf77d39e6f4aee /src/map/skill.c
parentbcb344ea0b3a994f88eb58f7fc55970fd2f9ed83 (diff)
downloadhercules-895341723c0c601c798e22c0a53f0aaaa73e08d1.tar.gz
hercules-895341723c0c601c798e22c0a53f0aaaa73e08d1.tar.bz2
hercules-895341723c0c601c798e22c0a53f0aaaa73e08d1.tar.xz
hercules-895341723c0c601c798e22c0a53f0aaaa73e08d1.zip
Add skill atributes for allow moving while casting skill.
New SkillInfo attributes: FreeCastReduced - allow move while casting with slowdown FreeCastNormal - allow move while casting with normal speed
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 1527d31b2..a7ed0b8f2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4916,12 +4916,11 @@ int skill_castend_id(int tid, int64 tick, int id, intptr_t data) {
return 0;
}
- if( sd && ud->skilltimer != INVALID_TIMER && (pc->checkskill(sd,SA_FREECAST) > 0 || ud->skill_id == LG_EXEEDBREAK) )
+ if (sd && ud->skilltimer != INVALID_TIMER && (pc->checkskill(sd, SA_FREECAST) > 0 || ud->skill_id == LG_EXEEDBREAK || (skill->get_inf2(ud->skill_id) & INF2_FREE_CAST_REDUCED) != 0))
{// restore original walk speed
ud->skilltimer = INVALID_TIMER;
status_calc_bl(&sd->bl, SCB_SPEED|SCB_ASPD);
}
-
ud->skilltimer = INVALID_TIMER;
}
@@ -9946,7 +9945,7 @@ int skill_castend_pos(int tid, int64 tick, int id, intptr_t data)
return 0;
}
- if( sd && ud->skilltimer != INVALID_TIMER && ( pc->checkskill(sd,SA_FREECAST) > 0 || ud->skill_id == LG_EXEEDBREAK ) )
+ if (sd && ud->skilltimer != INVALID_TIMER && (pc->checkskill(sd, SA_FREECAST) > 0 || ud->skill_id == LG_EXEEDBREAK || (skill->get_inf2(ud->skill_id) & INF2_FREE_CAST_REDUCED) != 0))
{// restore original walk speed
ud->skilltimer = INVALID_TIMER;
status_calc_bl(&sd->bl, SCB_SPEED|SCB_ASPD);
@@ -19204,6 +19203,18 @@ void skill_validate_skillinfo(struct config_setting_t *conf, struct s_skill_db *
} else {
sk->inf2 &= ~INF2_CHORUS_SKILL;
}
+ } else if (strcmpi(type, "FreeCastNormal") == 0) {
+ if (on) {
+ sk->inf2 |= INF2_FREE_CAST_NORMAL;
+ } else {
+ sk->inf2 &= ~INF2_FREE_CAST_NORMAL;
+ }
+ } else if (strcmpi(type, "FreeCastReduced") == 0) {
+ if (on) {
+ sk->inf2 |= INF2_FREE_CAST_REDUCED;
+ } else {
+ sk->inf2 &= ~INF2_FREE_CAST_REDUCED;
+ }
} else if (strcmpi(type, "None") != 0) {
skilldb_invalid_error(type, config_setting_name(t), sk->nameid);
}