Skip to content

Mage weapons follow their template's classes and two-handed flag - #80

Draft
XxFran10xX wants to merge 1 commit into
mainfrom
feat/gear-template-sync
Draft

XxFran10xX wants to merge 1 commit into
mainfrom
feat/gear-template-sync

Conversation

@XxFran10xX

@XxFran10xX XxFran10xX commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Status record

  • Reviewed: Fable 5.2 APPROVE at 6b47ac9 (one review covering all three PRs; a low-confidence minor finding left, see below)
  • Dev-tested at 6b47ac9: a wand crafted for "Mage" before the change came back requiring Evoker and two-handed after the restart, part of 18/18 bot checks; Dev log clean, no "Gear refresh failed"
  • Local tests: GearTemplateSyncTest and GearRefresherCoverageTest passed; CI build (tests + 100% coverage) green at 6b47ac9

Left alone from the review: isOutdated compares the final class tag while apply sets the original layer of a class stat history, so a weapon whose history added a class would rebuild on every touch. No Mage weapon can get there today (runes carry no classes and every template now lists classes).

Why

Mage is getting three weapon paths (ServerAssets PR): the staff, wand and blade templates list Arcanist, Evoker and Battlemage instead of Mage, and every Mage weapon becomes two-handed. A crafted mage weapon is rebuilt from its own data on refresh, so weapons players already hold would keep required-class: Mage and stay one-handed. Nobody could use them after the change.

What

  • GearTemplateSync: a weapon is outdated when its classes (as a set, ignoring case) or its two-handed flag differ from its MMOItems template. A refresh then copies only those two stats from the template. With a class stat history only its original layer changes; a template without classes or two-handed removes them.
  • GearRefresher treats that as one more reason to rebuild, and applies the sync while rewriting. Sockets, runes, part stats, name, skin and requirements are carried as before.
  • Same idea as AdvancedCrafting 2.9.0's required-class sync for crafted armour and weapons.

Not in this PR

No release, nothing on Main or Tutorial.

🤖 Generated with Claude Code

…efresh

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added the size:L 100-499 effective changed lines (tests excluded in mixed PRs). label Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 effective changed lines (tests excluded in mixed PRs).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant