Repository navigation
fix(services): create salon hair for empty equipment slots - #42
Merged
Merged
Conversation
Treat missing hair as template 0 when checking whether a salon hairstyle needs replacement. Keep receipts authoritative and preserve existing certificate settlement and failure behavior. Co-Authored-By: Codex <[email protected]>
Coverage Report for CI Build 39989054425Warning No base build found for commit Coverage: 76.744%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A paid beauty-salon request for hair 24128 on a character with no Hair equipment skipped item creation, consumed Salon Certificate 30811, and returned hair 0. Compare the equipped template (0 for an empty slot) with the requested hairstyle so the existing economy bridge creates the missing hair item. Same-hair requests retain the existing item, and appearance receipts still report actual equipment to the owner and nearby players.
The original C# ApplyBeautySalon has the same null guard. This deliberately fixes that omission and documents the deviation. Settlement stays unchanged: hair-creation failure logs, applies the model, broadcasts actual hair, and consumes the certificate; certificate-consumption failure logs without rolling back the already broadcast appearance.
Validation:
cargo test -p aaemu-game --lib --locked beauty_salon -- --test-threads=2: 7 passed. Real economy/container operations cover absent/same/changed hair, no certificate, creation failure, consumption failure, owner/observer receipts and packet layout.cargo fmt -p aaemu-game -- --check: passed.cargo clippy -p aaemu-game --all-targets --locked -- -D warnings: passed.The shared live lane has not been updated or restarted. Paid apply/re-entry live verification remains for the orchestrator after an explicitly scheduled safe game-server update. Full workspace checks were intentionally left to CI under the task's focused-validation constraint.