-
Notifications
You must be signed in to change notification settings - Fork 759
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up auto-cast related code #2657
Merged
MishimaHaruna
merged 21 commits into
HerculesWS:master
from
Kenpachi2k13:autocast_clean_up
Apr 5, 2020
Merged
Clean up auto-cast related code #2657
MishimaHaruna
merged 21 commits into
HerculesWS:master
from
Kenpachi2k13:autocast_clean_up
Apr 5, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kenpachi2k13
added
type:enhancement
Issue describes an enhancement or feature that should be implemented
status:code-review
Awaiting code review
component:mechanics:skills
Affecting the skills' game mechanics
labels
Mar 13, 2020
Kenpachi2k13
requested review from
4144,
MishimaHaruna,
hemagx,
skyleo and
Asheraf
March 13, 2020 06:06
4144
requested changes
Mar 14, 2020
…ocast.type instead
…tocast.type instead
… not used anymore
…autocast.itemskill_* instead
…check for auto-cast skills
…castbegin() function
…autocast.skill_id/_lv instead
First of all: In official servers, skill casting item are consumed immediately and thus IT_DELAYCONSUME should not be used for those items And additionally these code blocks are obsolete, because of the way how skill casting items work. * If the item won't check the skill's requirements, the code block to delete the item of type IT_DELAYCONSUME isn't even executed. * If the item does check the skill's requirements, the check is done prior to the skill casting which would be the same as using IT_USABLE.
Kenpachi2k13
force-pushed
the
autocast_clean_up
branch
from
March 14, 2020 21:35
5e42686
to
876cfa6
Compare
4144
approved these changes
Mar 14, 2020
MishimaHaruna
approved these changes
Apr 5, 2020
Closed
MishimaHaruna
added a commit
to MishimaHaruna/Hercules
that referenced
this pull request
Apr 6, 2021
This commit introduces various fixes to the Abracadabra / Improvise skill validation: - autocast code is moved to after homun/merc skill ranges so that when any of those are triggered, autocast data is not purged - abracadabra/improvise is no longer purged immediately after cast, by calling autocast_clear_current in the proper manner - the abracadabra/improvise skill requirement bypass that was removed in HerculesWS#2657 and related pull requests is re-implemented - the condition that would get the character stuck and unable to cast other skills until teleporting or relogging when rolling AL_WARP from abracadabra (i.e. because AL_WARP lands in clif_parse_UseSkillMap in 2 steps) is fixed, by not immediately clearing the data after the first one All credits for the fix go to Heka of Origins Related to HerculesWS#2859 Fixes HerculesWS#2823 Fixes HerculesWS#2824 Signed-off-by: Haru <[email protected]>
3 tasks
MishimaHaruna
added a commit
to MishimaHaruna/Hercules
that referenced
this pull request
Apr 6, 2021
This commit introduces various fixes to the Abracadabra / Improvise skill validation: - abracadabra/improvise is no longer purged immediately after cast, by calling autocast_clear_current in the proper manner - the abracadabra/improvise skill requirement bypass that was removed in HerculesWS#2657 and related pull requests is re-implemented - the condition that would get the character stuck and unable to cast other skills until teleporting or relogging when rolling AL_WARP from abracadabra (i.e. because AL_WARP lands in clif_parse_UseSkillMap in 2 steps) is fixed, by not immediately clearing the data after the first one All credits for the fix go to Heka of Origins Related to HerculesWS#2859 Fixes HerculesWS#2823 Fixes HerculesWS#2824 Signed-off-by: Haru <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component:mechanics:skills
Affecting the skills' game mechanics
status:code-review
Awaiting code review
type:enhancement
Issue describes an enhancement or feature that should be implemented
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Prelude
Changes Proposed
Currently the auto-cast related code is a mess.
map_session_data->state.autocast
which is used to temporarily flag a skill as auto-cast for skills cast bybAutoSpell*
bonuses or by Auto Shadow Spell. It's also (mis)used to prevent damage reflection from infinite looping.map_session_data->state.abra_flag
which isn't actually used. It's just set when casting Abracadabra or Improvised Song, but then never used for validation.map_session_data->skillitem
andmap_session_data->skillitemlv
which hold the auto-cast skill's ID and level.map_session_data->skillitem
is misused to validate auto-casting all over the code.itemskill()
script command related states and helper variables.------------------------------------------------------------------------------------------------------------------
I spent some days in getting into the subject and cleaned it up as far as possible.
pc_autocast_clear()
(formerpc_itemskill_clear()
) gets called.Closes #1211