ModernUO/Projects/Server
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
..
Buffers fix: Fixes string interpolation in value string builder (#1339) 2023-02-13 23:09:50 -08:00
Client fix: Fixes string interpolation in value string builder (#1339) 2023-02-13 23:09:50 -08:00
Collections feat: Adds .NET 7 & Arm64 support (#1229) 2022-11-06 09:59:11 -08:00
Comparers fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Configuration fix: Makes logging more consistent (#1246) 2022-11-13 00:36:23 -08:00
ContextMenus fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Diagnostics fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Events fix: Overhauls murder system (#1419) 2023-07-15 22:42:49 -07:00
Exceptions fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
GarbageCollection fix: Adds Gen2 callback for each STArrayPool (#971) 2022-03-26 13:57:42 -07:00
Geometry fix: Fixes Point2D ctor (#1340) 2023-02-13 23:28:23 -08:00
Gumps fix: Removes scoped for gump AppendTo (#1405) 2023-05-21 00:46:25 -07:00
Items fix: Updates messages with clilocs (#1381) 2023-03-26 00:54:09 -07:00
Json fix: Drastically simplifies regions (#1400) 2023-05-19 16:39:40 -07:00
Localization fix: Fixes string interpolation in value string builder (#1339) 2023-02-13 23:09:50 -08:00
Logging fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Maps fix: Do not double fetch root parent (#1333) 2023-02-05 12:09:08 -08:00
Menus fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Migrations fix: Adds name support for all mods (#1128) 2022-10-15 10:46:31 -07:00
Mobiles fix: Overhauls murder system (#1419) 2023-07-15 22:42:49 -07:00
Network fix: Fixes fastwalk (#1377) 2023-03-20 21:12:33 -07:00
PropertyList fix: Fixes localization corner cases with OPL (#1050) 2022-06-12 21:17:42 -07:00
Random feat: Adds weighted values (#1265) 2022-11-22 19:53:20 -08:00
Regions fix: Drastically simplifies regions (#1400) 2023-05-19 16:39:40 -07:00
Serialization fix: Fixes stabled, abilities targeting self, and unsummon memory leak (#1418) 2023-07-03 09:45:22 -07:00
Targeting Adds hue support to StaticTile (#1321) 2023-01-21 11:19:11 -08:00
Text fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
TileMatrix Adds hue support to StaticTile (#1321) 2023-01-21 11:19:11 -08:00
Timer fix: Makes logging more consistent (#1246) 2022-11-13 00:36:23 -08:00
TimeZones fix: Fixes timezone issue (#1388) 2023-05-19 16:40:06 -07:00
Utilities fix: Fixes GetAllSharedAccounts and other list conversions in AdminGump (#1422) 2023-07-08 15:20:00 -07:00
World fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00
AssemblyHandler.cs chore: Code Cleanup (#1239) 2022-11-10 22:49:25 -08:00
Attributes.cs feat: Adds SerializedCommandProperty (#1249) 2022-11-14 18:24:33 -08:00
CityInfo.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Commands.cs fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
Effects.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
EventLoopTasks.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
ExpansionInfo.cs chore: Update from .NET 7 preview to release. (#1234) 2022-11-08 09:46:48 -08:00
Guild.cs fix: Cleans up create guild gump (#1326) 2023-01-31 23:51:01 -08:00
HuePicker.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
IAccount.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
IEntity.cs fix: Adds AfterSerialize support. Removes BeforeSerialize support. (#1208) 2022-10-27 23:27:22 -07:00
Interfaces.cs fix: Fixes casting by sending ParalyzeFlag to client while animating (#1397) 2023-04-27 23:12:07 -07:00
KeywordList.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Main.cs fix: Fixes tick count calculcations (#1366) 2023-03-09 21:00:17 -08:00
MessageType.cs fix: Moves the rest of the Incoming packets (#1338) 2023-02-10 22:59:36 -08:00
MultiData.cs fix: Fixes loading map and static files (#1177) 2022-09-29 16:02:41 -07:00
MUO.ico Adds MUO Logo (#52) 2019-09-12 13:13:13 -07:00
Party.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Poison.cs fix: Adds ISpanParsable and fixes command conditionals (#1241) 2022-11-12 00:26:02 -08:00
Prompt.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
Race.cs fix: Fixes TryParse for Race (#1244) 2022-11-12 00:31:25 -08:00
Sector.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
SecureTrade.cs fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00
Serial.cs fix: Adds ISpanParsable and fixes command conditionals (#1241) 2022-11-12 00:26:02 -08:00
Server.csproj feat: Adds GUID support for codegen (#1251) 2022-11-14 21:25:51 -08:00
Skills.cs feat: Moves skills to json file (#1411) 2023-06-16 05:55:55 -07:00
TileData.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
TileList.cs Adds hue support to StaticTile (#1321) 2023-01-21 11:19:11 -08:00
VirtueInfo.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00