ModernUO/Projects/UOContent/Mobiles/Vendors
Kamron Batman 05b6ca9d5d
refactor: one master reference behind ControlMaster and SummonMaster (#2670)
## Summary

`BaseCreature` stored the pet owner (`ControlMaster`) and the summoner (`SummonMaster`) in two fields. Every flow that manages pets kept them in step by hand: summon, transfer, stable, claim, ball of summoning and GM obey. They now share one `_master` field, and the two properties read it through the Controlled and Summoned flags:

```csharp
ControlMaster => Controlled ? master : null
SummonMaster  => Controlled && !Summoned ? null : master
```

Every existing reader keeps its meaning:
- `ControlMaster` is still "the owner".
- `SummonMaster` is still "the summoner, controlled or not".

Blade spirits, energy vortexes, clones, undead minions and enraged creatures (a summon master without `Summoned`) never become visible through `ControlMaster`, so the ungated readers (ML notoriety, aggressor entries and similar) behave as before.

- Setting `SummonMaster` on a plain pet does nothing, instead of quietly replacing the owner.
- `SetControlMaster` now keeps both masters in step, so the hand-written `SummonMaster` copies are removed from ball of summoning, GM obey, pet transfer, auto-stable and claim, the animal trainer's stable and claim, and jail stabling.

## Serialization

BaseCreature moves to v24 with one serialized master (slot 15); the old `SummonMaster` slot is dropped.
- `MigrateFrom(V23Content)` resolves absent fields through the same default-value methods the live reader uses.
- A save that carried both masters (a summon traded before ownership followed transfers) resolves to the owner. Legacy pre-codegen streams follow the same rule.

Requires `ModernUO.Serialization.Generator` 4.2.0 (#2671). `UOContent.Tests` was still on 4.1.0 and is bumped to match.

## Test plan

- [x] `MasterShapes_RoundTrip`: controlled pet, controlled summon, energy vortex, enraged creature
- [x] `SummonMaster_OnPlainPet_KeepsTheOwner`: owner and follower counts unchanged
- [x] `LegacyV22Stream_DifferingMasters_OwnerWins`
- [x] `V23Stream_MigratesToOneMaster_AndDefaultsAbsentFields`: both master slots -> owner; flags past bit 32; absent fields take class defaults
- [x] UOContent.Tests (1168 passed, 2 skipped) and Server.Tests (907) green
2026-09-24 21:37:28 -07:00
..
Barkeeper refactor: fold hand-written serializable property setters into field hooks (#2587) 2026-08-22 18:20:39 -07:00
NPC refactor: one master reference behind ControlMaster and SummonMaster (#2670) 2026-09-24 21:37:28 -07:00
SBInfo fix: Fixes arbitrage by adjusting prices. (#1500) 2023-09-15 19:22:35 -07:00
AnimalBuy.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
BaseVendor.cs fix: sell Bushido and Ninjitsu books through Tokuno scribes (#2622) 2026-09-09 23:07:32 -07:00
BeverageBuy.cs fix: Consolidates Color/Center html (#1762) 2024-05-07 23:56:32 -07:00
GenericBuy.cs fix: Moves containers/bods/traps/etc to serialization generator (#2310) 2026-01-07 21:55:55 -08:00
GenericSell.cs chore(content): Updates to C# 9 syntax (#373) 2020-12-30 12:50:10 -08:00
PlayerVendor.cs fix: Fixes dirty-tracking gaps in generated content: setters, sub-object owners, BaseVendor (#2609) 2026-09-06 09:43:44 -07:00
PlayerVendorPlaceholder.cs fix: Codegens house/vendors (#1767) 2024-05-08 22:45:59 -07:00
PresetMapBuy.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
RentedVendor.cs feat: convert all delta-time serialization to anchored time (#2589) 2026-08-22 19:34:43 -07:00
VendorBackpack.cs fix: Optimizes items to use default weights. (Part 4) (#2243) 2025-07-24 23:29:29 -07:00
VendorInventory.cs feat: convert all delta-time serialization to anchored time (#2589) 2026-08-22 19:34:43 -07:00
VendorItem.cs fix: Fixes dirty-tracking gaps in generated content: setters, sub-object owners, BaseVendor (#2609) 2026-09-06 09:43:44 -07:00