ModernUO/Projects/Server
Kamron Batman f77dd91811
fix: Overhauls virtue system (#1376)
## MAJOR CHANGE (API BREAKING)

Moved the virtues to it's own system _VirtueSystem_. This should make it easier to extend or remove the virtue system. Virtues will be saved to a new folder called _Virtues_.

### Motivation

The motivation was also two-fold, performance/stability, and to fix bugs.

First, virtues is the second system (first is murders), that has a pre-world-save check on _every mobile in the game_ to atrophy virtue stats. This is taxing since it freexes the world and makes world saves take longer. Every mobile had Gain/Loss dates for each virtue, whether they needed them or not. Most players don't even use the virtue system, so this will increase performance considerably.

Second, when I tried to optimize/refactor the code, I found several bugs that needed to be fixed.

### Major API Changes

- [X] The properties on players related to virtues are gone. Use `pm.GetVirtues()?.<PropertyName>` instead.
- [X] Virtues were removed from non-player Mobiles.
- [X] `pm.JusticeProtectors` was removed. Use `JusticeVirtue.GetProtector()` or `JusticeVirtue.GetProtected()` instead.

### Screenshots

<img width="221" alt="Props-1" src="https://github.com/modernuo/ModernUO/assets/3953314/5c09cb83-b8d5-44a2-b899-a7ed7cd736ac">
<img width="220" alt="props-2" src="https://github.com/modernuo/ModernUO/assets/3953314/aeade4d3-8df0-47bd-955a-a864d0946cf7">
2023-07-19 21:43:47 -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 virtue system (#1376) 2023-07-19 21:43:47 -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 virtue system (#1376) 2023-07-19 21:43:47 -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