ModernUO/Projects/UOContent/Mobiles
Kamron Batman 26f784f45d
fix: Overhauls murder system (#1419)
## MAJOR CHANGE (API BREAKING)

Added a player murder system to facilitate reporting murders. This should make it easier to extend to create a bounty system or  other related game content. Player murders will be saved in a folder called _PlayerMurders_.

### Motivation

The motivation was two-fold, performance, and bug fixes.

First, murders are one of two systems that do a pre-world-save check on _every mobile in the game_ to decay kills and set their expiring murders. This is taxing since it freezes the world and makes world saves take longer. Every mobile has ShortTermMurders even though it is a player concept. And next, 90%+ of players are not murderers but had an ever increasing MurderElapse time that was being tracked against GameTime. These properties were also serialized unnecessarily for all mobs.

Second, when I tried to optimize/refactor the code, it was obvious that the system has bugs.

### Major API Changes
- [X] Created a player murder system and moved `ShortTermMurders`, `ShortTermElapse`, and `LongTermElapse` to the system.
- [X] Added convenience property `PlayerMobile.ShortTermMurders`.
- [X] Added convenience properties `PlayerMobile.ShortTermMurderExpiration` and `PlayerMobile.LongTermMurderExpiration`
- [X] Moved ReportMurdererGump.cs
- [X] Adds an `EventSink.PlayerDeleted` event.

### Notes
The system currently does not support NPCs. To support expiring murders on NPCs I highly recommend a different architecture for large servers (500k+ mobs including players). Specifically switching from looping through all MurderContext to a time-order link list.
2023-07-15 22:42:49 -07:00
..
Abilities fix: Fixes stabled, abilities targeting self, and unsummon memory leak (#1418) 2023-07-03 09:45:22 -07:00
AI fix: Removes run flag from NPC movement (#1357) 2023-03-02 10:58:17 -08:00
Animals fix: Codegens mutation core (#1370) 2023-03-11 17:33:31 -08:00
Familiars fix: Fixes random bias & Adds back champion arties for UOML (#1235) 2022-11-09 16:33:27 -08:00
Guards cleanup: Fixes bugs and cleans up code (#660) 2021-07-19 20:49:59 -07:00
Healers fix: Fixes random bias & Adds back champion arties for UOML (#1235) 2022-11-09 16:33:27 -08:00
Hireables feat: Adds hireables (#1393) 2023-04-16 20:24:14 -07:00
Monsters fix: Fixes leaking/errors caused by categorization (#1404) 2023-05-19 18:41:31 -07:00
Special fix: Adds summon pixies. Fixes other abilities (#1274) 2022-11-23 17:39:23 -08:00
Townfolk fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00
Vendors fix: Fixes stabled, abilities targeting self, and unsummon memory leak (#1418) 2023-07-03 09:45:22 -07:00
BaseCreature.cs fix: Fixes stabled, abilities targeting self, and unsummon memory leak (#1418) 2023-07-03 09:45:22 -07:00
ChampionTitleInfo.cs fix: NullReference in ChampionTileInfo (#1258) 2022-11-21 20:35:45 -08:00
NPCSpeeds.cs fix: Makes NPC active movement half think speed (#1256) 2022-11-20 20:05:43 -08:00
PlayerMobile.cs fix: Overhauls murder system (#1419) 2023-07-15 22:42:49 -07:00