ModernUO/Projects/UOContent/Mobiles/Townfolk
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
..
Actor.cs fix: Removes scale speed by dex for monsters, fixes NPC movement/thinking speed (#1019) 2022-05-15 10:01:14 -07:00
Artist.cs fix: Removes scale speed by dex for monsters, fixes NPC movement/thinking speed (#1019) 2022-05-15 10:01:14 -07:00
Banker.cs fix: Fixes bank checks falling to the floor. (#972) 2022-03-26 21:06:46 -07:00
BaseEscortable.cs fix: Overhauls virtue system (#1376) 2023-07-19 21:43:47 -07:00
BrideGroom.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
EscortableMage.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
Gypsy.cs fix: Removes scale speed by dex for monsters, fixes NPC movement/thinking speed (#1019) 2022-05-15 10:01:14 -07:00
HarborMaster.cs fix: Removes scale speed by dex for monsters, fixes NPC movement/thinking speed (#1019) 2022-05-15 10:01:14 -07:00
Merchant.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
Messenger.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
Minter.cs Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Ninja.cs fix: Removes scale speed by dex for monsters, fixes NPC movement/thinking speed (#1019) 2022-05-15 10:01:14 -07:00
Noble.cs feat: Updates to .NET 6 (#843) 2021-11-13 13:38:01 -08:00
Peasant.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
Prisoner.cs Fixes brace style (#248) 2020-09-13 21:49:46 -07:00
Samurai.cs fix: Removes scale speed by dex for monsters, fixes NPC movement/thinking speed (#1019) 2022-05-15 10:01:14 -07:00
Sculptor.cs fix: Removes scale speed by dex for monsters, fixes NPC movement/thinking speed (#1019) 2022-05-15 10:01:14 -07:00
SeekerOfAdventure.cs fix: Removes scale speed by dex for monsters, fixes NPC movement/thinking speed (#1019) 2022-05-15 10:01:14 -07:00
TownCrier.cs fix: Update LabelTo, SendMessage, etc to Interpolated Strings (#1283) 2022-11-28 19:58:12 -08:00