Skip to content

fix(quest): stabilize mission order display and improve hunt mission update mapping#4204

Merged
Henrybk merged 1 commit intoOpenKore:masterfrom
boscv:monstersQuestList
Apr 1, 2026
Merged

fix(quest): stabilize mission order display and improve hunt mission update mapping#4204
Henrybk merged 1 commit intoOpenKore:masterfrom
boscv:monstersQuestList

Conversation

@boscv
Copy link
Copy Markdown
Contributor

@boscv boscv commented Apr 1, 2026

Motivation

  • Quest mission progress could remain at 0/x for some slots on certain servers when update packets used identifiers that did not directly match stored mission keys.
  • quest list mission order could appear inconsistent due to hash key iteration order, causing confusion versus in-client ordering.

Changes

  • src/Network/Receive.pm

    • Added a guard in quest_update_mission_hunt to skip processing when the quest is not present in questList.
    • Preserved existing mission resolution paths (hunt_id direct match, mob_id direct match, and cross-lookup).
    • Added a fallback resolver that maps by derived mission index when direct identifier matching fails:
      • mission_index = hunt_id - (questID * 1000)
      • accepts both mission_index and mission_index - 1 to handle index variance.
    • Added a final guard to skip updates when no valid mission_id can be resolved, preventing writes to invalid mission entries.
  • src/Commands.pm

    • Updated quest list mission rendering to sort missions by:
      1. mission_index (ascending, default fallback 9999)
      2. mission key (mobID) as deterministic tie-breaker
    • This keeps mission display order stable and aligned with packet/client intent.

Impact

  • Reduces cases where only some mission slots update while others remain at 0/x.
  • Makes quest mission display deterministic and less confusing.
  • Keeps behavior backward-compatible by applying fallback logic only when standard matching fails.

Testing

  • Validation performed through code-path review and targeted local quest flow checks.

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 Henrybk merged commit 69eed58 into OpenKore:master Apr 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants