ModernUO/Projects/Server.Tests
Kamron Batman 9af7dd555a
fix: LastMoved and stat-gain stamps stay absolute across restarts (#2729)
ReadAnchoredTime shifted Item.LastMoved, Item.DecayResetTime and
Mobile.LastStr/Int/DexGain forward by the downtime at load. The bytes
were stable from save to save, but the first save after every restart
rewrote one timestamp in nearly every item record and most mobile
records, which defeats any per-record backup or delta save.

- LastMoved and DecayResetTime are read as saved. The downtime credit
  is applied after load by Item.CreditDowntimeToDecay, which moves
  DecayResetTime only for items whose decay countdown was still running
  when the save started. Every other item keeps its bytes, and decay
  timing is unchanged.
- World.LoadedSaveStartTime exposes the loaded save's anchor so the
  credit can tell which countdowns were running.
- Stat-gain stamps are read raw. The cooldown is minutes long, so
  downtime counting toward it costs nothing.

No format change: these fields were already absolute ticks.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:27:12 -07:00
..
Fixtures test: run tile-dependent tests on synthetic terrain instead of client files (#2725) 2026-10-18 22:07:40 -07:00
Helpers test: fix shared state, CI-vacuous tests and harness duplication (#2722) 2026-10-18 20:11:33 -07:00
Terrain test: run tile-dependent tests on synthetic terrain instead of client files (#2725) 2026-10-18 22:07:40 -07:00
Tests fix: LastMoved and stat-gain stamps stay absolute across restarts (#2729) 2026-10-25 16:27:12 -07:00
Server.Tests.csproj test: run tile-dependent tests on synthetic terrain instead of client files (#2725) 2026-10-18 22:07:40 -07:00