Fix stale ground skill tick cache after mob respawn#3418
Merged
Conversation
Ground skill tick checks used DIFF_TICK32() even though timer ticks are int64. After long map-server uptime this could make an old per-target tick entry look like a future tick and skip the ground skill effect. Natural mob respawn reuses mob_data/unit_data, so clear skillunittick for the next life to avoid carrying per-target ground skill state across deaths. Fixes HerculesWS#3417.
Contributor
|
Thank you for your first contribution! |
hemagx
approved these changes
Jul 15, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This fixes a long-uptime ground skill issue where per-target ground skill tick entries could incorrectly suppress later skill effects.
Ground skill processing stores per-target tick entries in
unit_data.skillunittick. For skills withUF_NOOVERLAP, the stored entry is keyed byskill_id. Since natural mob respawn reusesmob_data/unit_data, old entries can survive into the next life.The tick comparison in
skill_unit_onplace_timer()usedDIFF_TICK32(), while timer ticks areint64. After long uptime, an old stored tick can wrap through the 32-bit comparison and be treated as if it were still in the future, causing the ground skill effect to be skipped.This PR:
DIFF_TICK()with anint64diff for ground skill tick checks;skillunittick[]when a mob is scheduled for natural respawn.Issues addressed: Fixes #3417