summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-01-20 10:08:00 +0100
committerHaru <haru@dotalux.com>2020-02-09 23:46:56 +0100
commit38a504a04a2c864938ef3e105d0ce22332ff0b7a (patch)
tree1da723d240928039361e0c4f89e810ae2c93cc73 /src/map/script.c
parent1098b588625774ca2cf4e05527b00fd4d0187919 (diff)
downloadhercules-38a504a04a2c864938ef3e105d0ce22332ff0b7a.tar.gz
hercules-38a504a04a2c864938ef3e105d0ce22332ff0b7a.tar.bz2
hercules-38a504a04a2c864938ef3e105d0ce22332ff0b7a.tar.xz
hercules-38a504a04a2c864938ef3e105d0ce22332ff0b7a.zip
Added a new option flag to itemskill() script command, to be able to cast a skill without cast time.
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 470ad9408..acf9fb9ff 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11003,7 +11003,7 @@ static BUILDIN(itemskill)
sd->skillitem=id;
sd->skillitemlv=lv;
- /// itemskill_conditions_checked/itemskill_no_conditions abuse prevention.
+ /// itemskill_conditions_checked/itemskill_no_conditions/itemskill_no_casttime abuse prevention.
/// Unset in unit_skilluse_id()/unit_skilluse_pos() if skill was not aborted while target selection.
sd->itemskill_id = id;
sd->itemskill_lv = lv;
@@ -11012,6 +11012,7 @@ static BUILDIN(itemskill)
sd->state.itemskill_conditions_checked = 0; /// Skill casting items will check the conditions prior to the target selection in AEGIS. Thus we need a flag to prevent checking them twice.
sd->state.itemskill_no_conditions = ((flag & ISF_IGNORECONDITIONS) == ISF_IGNORECONDITIONS) ? 1 : 0; /// Unset in unit_skilluse_id()/unit_skilluse_pos() if skill was not aborted while target selection.
+ sd->state.itemskill_no_casttime = ((flag & ISF_INSTANTCAST) == ISF_INSTANTCAST) ? 1 : 0; /// /// Unset in unit_skilluse_id()/unit_skilluse_pos() if skill was not aborted while target selection.
if (sd->state.itemskill_no_conditions == 0) {
if (skill->check_condition_castbegin(sd, id, lv) == 0 || skill->check_condition_castend(sd, id, lv) == 0)