summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c4
-rw-r--r--src/map/script.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 0981cdee9..ebba015a2 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5349,6 +5349,10 @@ static int pc_itemskill_clear(struct map_session_data *sd)
sd->autocast.type = AUTOCAST_NONE;
sd->autocast.skill_id = 0;
sd->autocast.skill_lv = 0;
+ sd->autocast.itemskill_conditions_checked = false;
+ sd->autocast.itemskill_check_conditions = false;
+ sd->autocast.itemskill_instant_cast = false;
+ sd->autocast.itemskill_cast_on_self = false;
sd->itemskill_id = 0;
sd->itemskill_lv = 0;
sd->state.itemskill_conditions_checked = 0;
diff --git a/src/map/script.c b/src/map/script.c
index 44cab8429..83c221e78 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11012,6 +11012,7 @@ static BUILDIN(itemskill)
int flag = script_hasdata(st, 4) ? script_getnum(st, 4) : ISF_NONE;
sd->state.itemskill_check_conditions = ((flag & ISF_CHECKCONDITIONS) == ISF_CHECKCONDITIONS) ? 1 : 0; // Unset in pc_itemskill_clear().
+ sd->autocast.itemskill_check_conditions = ((flag & ISF_CHECKCONDITIONS) == ISF_CHECKCONDITIONS);
if (sd->state.itemskill_check_conditions == 1) {
if (skill->check_condition_castbegin(sd, sd->skillitem, sd->skillitemlv) == 0
@@ -11021,10 +11022,13 @@ static BUILDIN(itemskill)
}
sd->state.itemskill_conditions_checked = 1; // Unset in pc_itemskill_clear().
+ sd->autocast.itemskill_conditions_checked = true;
}
sd->state.itemskill_no_casttime = ((flag & ISF_INSTANTCAST) == ISF_INSTANTCAST) ? 1 : 0; // Unset in pc_itemskill_clear().
sd->state.itemskill_castonself = ((flag & ISF_CASTONSELF) == ISF_CASTONSELF) ? 1 : 0; // Unset in pc_itemskill_clear().
+ sd->autocast.itemskill_instant_cast = ((flag & ISF_INSTANTCAST) == ISF_INSTANTCAST);
+ sd->autocast.itemskill_cast_on_self = ((flag & ISF_CASTONSELF) == ISF_CASTONSELF);
// itemskill_conditions_checked/itemskill_no_conditions/itemskill_no_casttime/itemskill_castonself abuse prevention. Unset in pc_itemskill_clear().
sd->itemskill_id = sd->skillitem;