ModernUO/Projects/UOContent/Items/Weapons
Kamron Batman 73f9688083
feat: adopt serialization generator v4 (field-side linkage, anchored timers) (#2586)
## Summary

Adopts ModernUO.Serialization 4.0.0 across the engine. Three commits, reviewable independently:

1. **Package + tool bump to 4.0.0** (`Server.csproj`, `UOContent.csproj`, `dotnet-tools.json`).
2. **Timers → `[DeserializeTimer]`** — the 8 drifting timers (BaseLight, TreasureMapChest, MarkContainer, FillableContainer, DeathRobe, DecayedCorpse, Corpse, BaseEscortable) now store their next tick as **anchored time**: server downtime no longer consumes the remaining delay, and idle-world saves are byte-stable. This changes their wire format, so each class bumps its serialization version with a `MigrateFrom` that replays the old delta-time read through the migration schema (the new `vN.json` files carry `@AnchoredTimer`; the old ones keep `@TimerDrift`, which the generator reads forever). The 2 wall-clock timers (Aquarium, FountainOfLife) keep their exact format via `wallClock: true` — no bump. Restart methods drop their `TimeSpan.MinValue` sentinel checks: v4 invokes them **only when a timer was actually running at save**.
3. **Linkage → field-side declarations** — 175 conversions across 25 files: `[SerializableFieldSaveFlag(order)]`/`[SerializableFieldDefault(order)]` become `[SaveFlag(nameof(...), nameof(...))]` on the field, and `[SerializableFieldChanged(order)]` becomes the `fieldChanged:` argument of `[SerializableField]`. **Wire-neutral: zero migration schemas changed.**

## Verification

- Solution builds with **0 errors, 0 warnings**; all three 4.0.0 packages verified indexed on nuget.org (no local feed needed).
- **835 + 708 tests green.**
- Generated output inspected: old-version content structs replay `ReadDeltaTime` (e.g. `V3Content.DecayTimerNext = reader.ReadDeltaTime()`), current versions write/read anchored time with the gated restart, and the wall-clock classes emit byte-identical `Write`/`ReadDateTime` framing.
- Schema tool run is committed (CI's `git diff --exit-code` schema check passes): exactly the 8 expected new `vN.json` files, nothing else touched.
- The conversion was scripted with a class-scoped resolver (order → same-class `[SerializableField(order)]`/`[SerializableProperty(order)]`); it planned 175/175 with zero ambiguities before applying.

## Notes

- New `MigrateFrom`s use the content structs' provided `XxxDelay` property, matching the pre-existing idiom in Corpse's and TreasureMapChest's older migrations.
- Follow-up candidate (separate PR, wire-neutral, any time): fold the ~150 eligible hand-written `[SerializableProperty]` setters (clamps, post-change side effects) down to `[SerializableField]` with `allowFieldChange`/`fieldChanged` hooks.
2026-08-22 17:54:02 -07:00
..
Abilities feat: Refactor Poison system, implement Darkglow & Parasitic effects (#2385) 2026-03-21 21:27:22 -07:00
Artifacts fix: Adds back razor/assistuo negotiations (#1089) 2022-06-25 01:47:45 -07:00
Axes fix: Special moves and various UOR+ bonuses (#2384) 2026-03-22 10:55:01 -07:00
Knives fix: Optimizes items to use default weights. (Part 4) (#2243) 2025-07-24 23:29:29 -07:00
Maces fix: Special moves and various UOR+ bonuses (#2384) 2026-03-22 10:55:01 -07:00
ML Weapons fix: Optimizes items to use default weights. (Part 4) (#2243) 2025-07-24 23:29:29 -07:00
PoleArms fix: Optimizes items to use default weights. (Part 2) (#2241) 2025-07-24 15:41:44 -07:00
Ranged refactor(archery): centralize SE ammo auto-recovery off PlayerMobile (#2496) 2026-06-21 23:22:55 -07:00
SE Weapons fix: Optimizes items to use default weights. (Part 4) (#2243) 2025-07-24 23:29:29 -07:00
SpearsAndForks fix: Special moves and various UOR+ bonuses (#2384) 2026-03-22 10:55:01 -07:00
Staves fix: Optimizes items to use default weights. (Part 4) (#2243) 2025-07-24 23:29:29 -07:00
Swords fix: Optimizes items to use default weights. (Part 2) (#2241) 2025-07-24 15:41:44 -07:00
Throwing feat(throwing): add remaining SA throwing artifacts (add-only) (#2516) 2026-07-03 08:50:16 -07:00
Wooden fix: Updates serialization to use v2.0 (#998) 2022-04-17 08:02:15 -07:00
BaseMeleeWeapon.cs feat: T2A defensive spells (#2378) 2026-03-22 11:18:34 -07:00
BaseWeapon.cs feat: adopt serialization generator v4 (field-side linkage, anchored timers) (#2586) 2026-08-22 17:54:02 -07:00
BaseWeapon.Migrations.cs refactor: Move legacy deserialization into the .Migrations.cs partials (#2575) 2026-08-13 18:43:53 -07:00
Fists.cs fix: Special moves and various UOR+ bonuses (#2384) 2026-03-22 10:55:01 -07:00
HitLower.cs fix(core): Adds Hashed & Hierarchical Timer Wheel (#655) 2021-07-11 22:42:06 -07:00
SlayerEntry.cs feat: Adds Pre-UOTD single click support for weapons, armor, wands, and clothing (#2053) 2025-01-13 17:04:24 -08:00
SlayerGroup.cs feat(throwing): add Ter Mur reptiles (Raptor + slith family) and their SA claws (#2515) 2026-07-02 23:58:29 -07:00
SlayerName.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
WeaponEnums.cs fix: Adds throwing weapons (#1107) 2022-07-01 17:03:27 -07:00