Skip to content

Handle WKS mission score field rename#118

Draft
endfish wants to merge 1 commit into
PunishXIV:mainfrom
endfish:codex/handle-wks-mission-score-rename
Draft

Handle WKS mission score field rename#118
endfish wants to merge 1 commit into
PunishXIV:mainfrom
endfish:codex/handle-wks-mission-score-rename

Conversation

@endfish

@endfish endfish commented Jun 20, 2026

Copy link
Copy Markdown

Summary

  • Resolve WKS mission score through reflection so both ScoreUInt and Score field names are supported.
  • Keep existing WKS state collection behavior for mission id, rank, and collection counters.
  • Avoid a MissingFieldException from aborting WorldStateUpdater.Update() every framework tick when the active FFXIVClientStructs build exposes the score field as Score.

Root cause

On a CN Dalamud environment using FFXIVClientStructs.dll from XIVLauncherCN\addon\Hooks\15.0.2.1, WKSMissionModule.MissionState exposes these fields:

MissionUnitRowId
Score
Rank
CollectedTotal
CollectedIndividual

The current direct reference to CurrentMission.ScoreUInt throws continuously:

System.MissingFieldException: Field not found: 'MissionState.ScoreUInt'.
   at AutoHook.WorldStateUpdater.CollectWKSInfo()
   at AutoHook.WorldStateUpdater.Update()
   at AutoHook.Fishing.FishingManager.OnFrameworkUpdate(...)

Because this happens before later fishing update handling, the plugin can still start/cast in some paths but fails to reliably process bite/hook behavior.

Validation

  • Confirmed the reported ScoreUInt compile/runtime incompatibility against the local CN Dalamud FFXIVClientStructs.dll.
  • Ran dotnet build AutoHook.sln with DALAMUD_HOME pointed at XIVLauncherCN\addon\Hooks\15.0.2.1; the previous ScoreUInt error is gone.
  • Build is still blocked by an unrelated existing error on current main: AutoHook/Ui/SubTabAutoCast.cs(9,71): error CS0103: The name 'with' does not exist in the current context.

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.

1 participant