mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-15 08:32:41 +00:00
Eight player_meta columns (combat_level, combat_xp, mining_skill, mining_xp, foraging_skill, foraging_xp, fishing_skill, fishing_xp). SkillState struct with HasSkills() marker mirrors PetState/HouseState shape. loadSkillState / upsertPlayerMetaSkillState / backfillPlayerMetaSkillState / skillStateFromAdvChar helpers. Dual-writes wired at every mutation site: consumables craft XP (both success and failure branches), events.go XP grant across all skills, arena death + session-complete combat XP. Backfill is idempotent (only fills rows where every skill column is still zero AND the legacy row has any non-zero value). CombatLevel/CombatXP are transitional — dropped at L5g after the DnD mass-backfill retires the legacy CombatLevel-derived fallback. Tests: TestPlayerMetaSkillStateBackfill_Idempotent, TestLoadSkillState_FallsBackToAdvCharacter, TestUpsertPlayerMetaSkillState_RoundTrip. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>