Repository navigation
Mark the base class of a subclass and drop skill bindings the class lacks - #74
Conversation
…acks Picking a subclass replaces the base class, so the class window showed the base (e.g. Archer for a Ranger) as unselected. Players clicked it again and lost their subclass. The base class now says "Your class, via <subclass>" and warns that picking it removes the subclass. MMOCore gives every class every skill (unlisted ones locked) and keeps saved bindings, so a skill bound before a class file dropped it, or under another class, stayed on the skill bar. Applying a class now unbinds skills the class has not unlocked. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe class picker now identifies when choosing a base class removes the current subclass. Applying a class now removes bound skills that the class lacks or has not unlocked. ChangesClass management
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The picker now shows which class is the player's via a subclass and warns that picking the base class removes it. Class application also drops saved skill bindings the class lacks or has not unlocked. No concrete defect was established. The remaining uncertainty is the ordering of binding cleanup against missed-reward claims, which depends on MMOCore behaviour that could not be confirmed. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The class-selection changes preserve existing eligibility, payment and confirmation checks. The main risk is recovery: a failed class change can remove skill bindings without restoring them. The effect appears limited to the affected player, but the production unlock rules still need confirmation. Retained concerns
Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Comment |
Problem
A player on Main (carpiie, 2026-10-06) picked Ranger, reopened
/classand saw Archer unselected. Picking a subclass replaces the base class in MMOCore, and the class window only marks the exact current class. So they picked Archer again, which removed Ranger, then picked Ranger again, and went round in circles.They also had
ARROW_VOLLEYbound from before the class rework, when base Archer still had it. MMOCore gives every class every MythicLib skill (the ones the class file doesn't list are locked) and keeps saved bindings. So the old binding survived the rework and stayed on the skill bar as Archer, even though/skillssaid the class had no skills. Ranger is passives-only, so as Ranger F had nothing to cast, and it looked as if the subclass was broken.Changes
ClassPickService.subclassOf(character, base)returns the character's subclass when it belongs to that base.ClassServiceunbinds every bound skill the class has not unlocked. A skill counts as unlocked if the class file lists it (unlocked by default) or the player unlocked it. It usesPlayerData.hasUnlocked, not the level check, so a level that is briefly low on join can't drop real bindings.No class on Main lists a skill as locked by default (
unlocked-by-default: falseonly appears on skill slots), and no TFMC plugin binds skills itself. So the only bindings removed are leftovers like this one.Tests
ClassServiceTest.boundSkillsTheClassHasNotUnlockedAreUnboundWhenItIsApplied: re-applying the current class keeps the unlocked binding and drops a locked one and one the class no longer has. Switching class drops a binding the new class lacks.ClassPickTest.baseClassOfTheCurrentSubclassIsMarkedAndWarnsThatPickingItRemovesTheSubclassmvn verify(Windows): 1661 tests pass, and the changed classes have full line coverage. I excluded the tests that only fail on Windows (POSIX permissions, file locks, locale); Linux CI runs them.🤖 Generated with Claude Code