Skip to content
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

Temporary status effects granted by overlapping ground skills are being terminated incorrectly/prematurely #8183

Open
Victor214 opened this issue Mar 23, 2024 · 0 comments
Labels
type:bug Issue that is a bug within rAthena

Comments

@Victor214
Copy link

rAthena Hash

34711b5

Client Date

2018-06-20

Server Mode

Renewal

Result

Problem Description

There are two different issues being caused by this specific bug:

  1. When using two identical ground skills which overlap and grant status effects, casting the second ground skill doesn't renew the status effect. When the first (old) status effect and ground skill ends, the status effect is cleared entirely, even though you're still inside the most-recently casted ground skill.
  2. When using two identical ground skills which overlap and grant status effects, stepping out of the overlap area onto the adjacent regular skill area makes the effect end.

How to Reproduce / Video Proof

Investigation

Based on my investigation, this happens because:

  • We're currently tracking statuses based solely on their existence (and not their source):
    skill.cpp (skill_unit_onplace)
    image
  • We're currently only tracking (and interrupting) skills based on their skill id's, and not their unit group ids.
    skill.cpp (skill_unit_move_sub)
    image
    skill.cpp (skill_unit_onleft)
    image
    image

Proposed Solution

  • Tracking not only the skill_id during skill_unit_move and skill_unit_move_sub, but also the related group_id of the skill unit group attached to a given skill.
  • Using the tracked group_id to check whether a status effect belongs or not to a given group_id
  • Example for Fog of Wall (this fixes it):

skill.cpp (skill_unit_move_sub)
image
skill.cpp (skill_unit_move)
image
skill.cpp (skill_unit_onleft)
image
skill.cpp (skill_unit_onplace)
image

Conclusion

  • These unexpected behaviours have a common pattern and are all caused by a lack of tracking skill unit groups and status conditions together.
  • I'm unsure whether the proposed solution is optimal or not. If it isn't, I'd appreciate to be corrected and pointed in more optimal ways.
  • I'm willing to make a pull request fixing these issues for these skills (and any other which is further discovered) if this approach is proven to be valid.

Relevant Log Output

No response

Expected Result

See description.

How to Reproduce

See description.

Official Information

N/A

Modifications that may affect results

Tested on most recent hash of rathena as of now, no modifications.

@Victor214 Victor214 added the type:bug Issue that is a bug within rAthena label Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Issue that is a bug within rAthena
Projects
None yet
Development

No branches or pull requests

1 participant