Skip to content

fix: ownership, reach and logic slips in a few item interactions - #2779

Open
uostones wants to merge 12 commits into
modernuo:mainfrom
uostones:fix/item-checks
Open

uostones wants to merge 12 commits into
modernuo:mainfrom
uostones:fix/item-checks

Conversation

@uostones

Copy link
Copy Markdown
Contributor

Eight small fixes, each with a regression test.

Wheat sheaf (Cooking.cs). The sheaf's target callback did not re-check the sheaf, so one that another mobile had taken (or that was moved into someone else's possession) after the double-click still filled the mill and was consumed. The callback now refuses a sheaf that another mobile holds. A sheaf on the ground or in a container still works as before.

Dawn's Music Gear (DawnsMusicGear.cs). The Contains check was inverted: a new track was added but reported as "already in the musicbox" and the gear was kept, while a duplicate track consumed the gear. The check is now the right way round, so adding a track consumes the gear.

Dawn's Music Box (DawnsMusicBox.cs). HasAccess checked House.HasAccess (friends and the access list) instead of the box's secure level. The house already applies the secure level before the box is used, so this extra check could only narrow it: a box set to Guild or Anyone still refused guild members and visitors with "That is not accessible." It now uses HasSecureAccess(m, _level).

Powder of Translocation (PowderOfTranslocation.cs). The range check was against the powder only, so any item in sight could be charged at any range, including items carried by other players. The item to charge must now be in the user's backpack.

Weapon engraving tool (WeaponEngravingTool.cs). Any weapon in sight could be engraved or wiped at any range. The target must now be within 3 tiles, not held by another player, movable and not locked down, checked again when the gump is answered (cliloc 1072310).

Banner facing gump (Banner.cs). Closing the facing gump (right-click or any unknown button) still placed the banner, as if South had been chosen, and consumed the deed. Only the East and South buttons place it now.

Cow milking (Cow.cs). TryMilk sent the "too far" and "escapes" messages but fell through, so the milk was still granted. Both rejections now return false.

Cast-from-book request (Spellbook.cs). CastSpellRequest used the spellbook named in the packet whenever it held the spell, with no check that the caster carries it, so a modified client, or a spellbook gump still open after the book left the pack, can cast spells the character doesn't have, from any spellbook in the world (another player's, a vendor's). Skill, reagents and mana still apply, and the book's owner loses nothing. A book is now used only when worn or directly in the backpack (book.Parent == from || book.Parent == from.Backpack), otherwise the normal lookup runs. This matches OnDoubleClick (500207) and FindSpellbookInList.

uostones and others added 12 commits November 18, 2026 22:04
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

2 participants