diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-03-11 21:04:42 +0100 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-03-14 22:35:08 +0100 |
commit | 735b763ed55c8cf9aca3ddeb6b469ce43896bf7d (patch) | |
tree | d53cf784994c07d39cb6262132ae9aa1bc5eb2d3 | |
parent | 80e505df06aab94b74210cc2f0e0651d6b6feb5f (diff) | |
download | hercules-735b763ed55c8cf9aca3ddeb6b469ce43896bf7d.tar.gz hercules-735b763ed55c8cf9aca3ddeb6b469ce43896bf7d.tar.bz2 hercules-735b763ed55c8cf9aca3ddeb6b469ce43896bf7d.tar.xz hercules-735b763ed55c8cf9aca3ddeb6b469ce43896bf7d.zip |
Add map_session_data->autocast.itemskill_* assignments
-rw-r--r-- | src/map/pc.c | 4 | ||||
-rw-r--r-- | src/map/script.c | 4 |
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; |