fix(quest): stabilize mission order display and improve hunt mission update mapping#4204
Merged
Henrybk merged 1 commit intoOpenKore:masterfrom Apr 1, 2026
Merged
Conversation
Improve quest mission ordering and robustly handle server hunt updates. Commands.pm: sort mission entries by mission_index (fallback to 9999) then by numeric mobID so missions display in intended order. Network/Receive.pm: ignore mission updates for unknown quests early, and add a fallback mapping for servers that send updates keyed only by hunt_id — derive a mission_index from hunt_id and match against existing missions (allowing off-by-one), with safety checks to avoid applying updates to non-existent missions. These changes prevent incorrect ordering and missed/incorrect mission updates from varied server implementations.
Henrybk
approved these changes
Apr 1, 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.
Motivation
0/xfor some slots on certain servers when update packets used identifiers that did not directly match stored mission keys.quest listmission order could appear inconsistent due to hash key iteration order, causing confusion versus in-client ordering.Changes
src/Network/Receive.pm
quest_update_mission_huntto skip processing when the quest is not present inquestList.hunt_iddirect match,mob_iddirect match, and cross-lookup).mission_index = hunt_id - (questID * 1000)mission_indexandmission_index - 1to handle index variance.mission_idcan be resolved, preventing writes to invalid mission entries.src/Commands.pm
quest listmission rendering to sort missions by:mission_index(ascending, default fallback9999)mobID) as deterministic tie-breakerImpact
0/x.Testing