Jack
6745cf2075
feat: Adds Mobile.Murderer virtual property, consolidates kill-threshold checks ( #2355 )
...
## Summary
- Adds `public virtual bool Murderer => Kills >= 5` property to `Mobile`, replacing ~30 scattered `Kills >= 5` / `Kills < 5` magic-number checks across the codebase
- `BaseCreature` overrides `Murderer` to also return `true` when `AlwaysMurderer` is set
- Updates `Corpse` serialization to v15, storing `_murderer` as a `bool` field (migrated from `int Kills >= 5` in earlier versions)
2026-03-06 08:36:41 -08:00
Kamron Batman
ee2cd1d18d
feat: Adds new decay system and SkipSerialization ( #2311 )
...
## Summary
- Replaces scan-based decay checking during world saves with an event-driven timer wheel scheduler
- Removes virtual property checks from serialization hot path, achieving 6-8x faster world saves
## Changes
### DecayScheduler (new):
- Timer wheel with 12 HashSet buckets (5-min intervals) + PriorityQueue for active processing
- O(1) register/unregister vs O(n) scan of all items
- Auto start/stop when items exist/empty
- Configurable tick interval with jitter to prevent system synchronization
### Item.cs:
- Added ScheduledDecayTime computed property
- Added UpdateDecayRegistration() called from SetLastMoved(), property setters, AddItem()/RemoveItem()
- Hooks in Visible, Movable, Spawner setters and Delete()
### World.cs:
- Removed _decayQueue, EnqueueForDecay(), ProcessDecay()
- ItemPersistence.Serialize() now tight loop without virtual calls
## Performance
| Metric | Before | After | Improvement |
|---------------|------------|-----------|-------------|
| Items (230K) | 245K ticks | 34K ticks | 8x faster |
| Mobiles (43K) | 56K ticks | 6K ticks | 9x faster |
| Total | 302K ticks | 40K ticks | 7.5x faster |
## Configuration
decay.maxItemsPerTick = 250 # Items processed per tick
decay.tickInterval = 256ms # Base processing interval
decay.bucketInterval = 5min # Timer wheel bucket size
decay.jitterMaxMs = 25 # ±25ms tick jitter
2026-01-08 11:43:51 -08:00
Kamron Batman
39e6f62ec9
fix: Codegens more misc items ( #1216 )
2022-10-29 16:08:23 -07:00
Kamron Batman
212ce8bc24
fix: Codegens more misc items ( #1214 )
2022-10-29 00:43:30 -07:00
Kamron Batman
fb915992dd
fix(core): Adds Hashed & Hierarchical Timer Wheel ( #655 )
...
- Removes TimerPriority
- Removes TimerThread
- Adds a [Hashed & Hierarchical Timer Wheel](http://www.cs.columbia.edu/~nahum/w6998/papers/ton97-timing-wheels.pdf )
2021-07-11 22:42:06 -07:00
Kamron Batman
8149620b0c
Fixes brace style ( #248 )
2020-09-13 21:49:46 -07:00
Kamron Batman
ad3775c4d7
Formats UO Content ( #201 )
2020-08-27 18:30:38 -07:00
Kamron Batman
8ec166bcd0
Adds assemblies config, fixes crash bugs. ( #134 )
2020-05-09 12:55:56 -07:00