Commit graph

121 commits

Author SHA1 Message Date
Kamron Batman
51ecee6caa
fix: Overhauls champion titles & codegen champion system (#1430)
## MAJOR CHANGE

Added a champion title system to facilitate the existing champion titles. This should make it easier to extend or create other related game content. Champion titles will be saved in a folder called _ChampionTitles_.

### Motivation

The motivation to refactor was two-folder, but mostly related to performance in two ways.
First, every player had a ChampionTitleInfo object with an array of ChamptionTitleInfo. We want to eliminate the need for this information unless a player actually uses it. This should save a considerable amount of memory.

Second, to facilitate the atrophy mechanic, the champion titles would run atrophy post-world save, adding to the time that the server is frozen. Eliminating this post-world save side effect unlocks our ability to further optimize the world save process since there are no direct side effects.


### Bugs fixed

- [X] Fixed titles getting cut off on the paperdoll
- [X] Fixed champion title not displaying overhead (OPL)

### Screenshots
<img width="216" alt="image" src="https://github.com/modernuo/ModernUO/assets/3953314/8916f895-8d68-4fb0-892e-108a0c43be90">
2023-07-27 21:44:06 -07:00
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
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
Kamron Batman
35237ff7d1
fix: Fixes leaking/errors caused by categorization (#1404)
### Summary
- [X] Fixes 4 TormentedMinotaur created at `(0, 0, 0) [null]` when `[add` is used.
- [X] Fixes client crash from a bug in HouseRaffleStone when `[add` is used.

Recommend viewing with [_whitespace disabled_](https://github.com/modernuo/ModernUO/pull/1404/files?diff=split&w=1)
2023-05-19 18:41:31 -07:00
Kamron Batman
79c6f0375c
fix: Fixes doors as decorations & optimizes them (#1392) 2023-04-18 19:28:54 -07:00
Kamron Batman
cc6fee28d4
feat: Adds hireables (#1393) 2023-04-16 20:24:14 -07:00
Kamron Batman
127ca5e51e
fix: Fixes veteran rewards (#1374)
### Summary
- [X] Fixes a bug in wall banner East setter: [[ServerUO#5046]](https://github.com/ServUO/ServUO/pull/5046)
- [X] Eliminates the timer in tree stump.
- [X] Codegens the rewards
2023-03-12 17:28:51 -07:00
Kamron Batman
e797ec7f53
fix: Fixes special scrolls (#1373) 2023-03-12 13:47:12 -07:00
Kamron Batman
6fcd606947
fix: Codegens rares and solen items (#1371) 2023-03-11 19:25:48 -08:00
Kamron Batman
3514651c3c
fix: Codegens mutation core (#1370) 2023-03-11 17:33:31 -08:00
Kamron Batman
f8ab7cfdf8
fix: Optimizes timer in house raffle stone (#1369) 2023-03-11 12:37:40 -08:00
Kamron Batman
0645251ec7
fix: Fixes scales, heritage items, and codegens holiday items (#1365) 2023-03-07 22:38:35 -08:00
Kamron Batman
f1e8d4c6f7
fix: Codegens heritage items (#1364) 2023-03-07 21:29:13 -08:00
Kamron Batman
82b5fa6af3
fix: Codegens gifts (#1363) 2023-03-07 21:07:45 -08:00
Kamron Batman
551f6cca9d
fix: Codegens evil decor. Fixes trash items (#1362) 2023-03-06 19:28:58 -08:00
Kamron Batman
84b3e5cfdb
fix: Codegens BOD rewards. (#1361) 2023-03-06 19:01:14 -08:00
Kamron Batman
3097eb4fa7
fix: Fixes Dice Infinite loop and deserialization of some items (#1360)
### Summary
- Fixes deserialization issues with some items.
- Changes Utility.Dice to prevent long iteration by passing `(uint)-1`
2023-03-05 18:29:48 -08:00
Kamron Batman
9b6aa1deed
fix: Fixes missed codegen for potions (#1359) 2023-03-02 21:27:42 -08:00
Kamron Batman
0150e1a994
fix: Fixes broken chair (#1356) 2023-02-27 09:01:50 -08:00
Kamron Batman
8e3facc57b
fix: Codegens promo items (#1355) 2023-02-26 00:48:27 -08:00
Kamron Batman
bf6da39176
fix: Codegens tools (#1354) 2023-02-25 13:54:05 -08:00
Kamron Batman
d14e864c85
fix: Updates disguises and codegens tinkering items (#1353) 2023-02-25 12:01:06 -08:00
Kamron Batman
f2fdc0321c
fix: Localizes specialized books, codegens instruments (#1352) 2023-02-25 10:56:05 -08:00
Kamron Batman
42012538bc
fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
Kamron Batman
10b26741c7
fix: Codegens spellbooks (#1349) 2023-02-24 19:04:21 -08:00
Kamron Batman
8e49fb4da4
fix: Codegens scrolls (#1348) 2023-02-24 18:17:29 -08:00
Kamron Batman
8c4aaeeda6
fix: Codegens potions and fixes a few minor bugs (#1347) 2023-02-24 18:06:59 -08:00
Kamron Batman
33aa257344
fix: Fixes missing codegen for ShipWright (#1316) 2022-12-30 10:48:42 -08:00
Kamron Batman
40c6ed2cb7
fix: Adds codegen migration for Forest Ostard and Acid (#1315) 2022-12-30 09:43:52 -08:00
Arutosio
801f139568
fix: Changes on Vendor>NPC to use code generation (#1308) 2022-12-22 12:40:26 -08:00
Arutosio
75d8a5147c
fix: Changes on Vendors>NPC>Guildmasters to use code generation (#1307) 2022-12-21 20:35:18 -08:00
Arutosio
6eebf358da
fix: Changes on Animals to use code generation (#1306) 2022-12-20 23:31:44 -08:00
Arutosio
8a9c6dc882
fix: Changes on Monsters to use code generation (#1304) 2022-12-17 19:40:04 -08:00
Arutosio
b03e2efdd6
fix: Changes magic humanoid monsters to use code gen (#1301) 2022-12-13 16:13:38 -08:00
Arutosio
00b3a849b6
fix: Changes on Mele Humanoid Monsters to use code generation (#1300) 2022-12-13 14:33:05 -08:00
Kamron Batman
899c2e868d
fix: Codegens tools and magical skill items (#1299) 2022-12-07 20:46:41 -08:00
Kamron Batman
af29fa0243
fix: Codegens fishing pole (#1288) 2022-11-28 23:42:32 -08:00
Kamron Batman
0b4cd460de
fix: Codegens corpses (#1287) 2022-11-28 23:08:38 -08:00
Kamron Batman
930431a6c5
fix: Fixes resources, SOS messages, and codegens fishing (#1279) 2022-11-24 11:12:44 -08:00
Kamron Batman
b006501535
fix: Codegens blacksmith, camping, and carpenter skill items (#1278) 2022-11-24 00:57:23 -08:00
Kamron Batman
b75a8f72ec
fix: Codegens shields (#1273) 2022-11-23 16:42:17 -08:00
Kamron Batman
82637a77cd
fix: Codegens resources (#1272) 2022-11-23 13:45:32 -08:00
Kamron Batman
59ed0a5bb4
fix: Codegens quivers (#1271) 2022-11-23 13:37:39 -08:00
Kamron Batman
c546b2ec70
fix: Codegens potted plants (#1270) 2022-11-23 13:04:30 -08:00
Kamron Batman
80d7b49bcc
fix: Codegen new haven quest rewards (#1269) 2022-11-23 13:00:28 -08:00
Kamron Batman
58acfcabad
fix: Codegens teleporters (#1250) 2022-11-14 20:56:08 -08:00
Kamron Batman
5660f4636e
fix: Finishes code gen for misc items (#1248) 2022-11-13 23:10:13 -08:00
Kamron Batman
de39b1036f
fix: Fixes IDE modifying arcane circle migration. (#1226) 2022-11-02 22:20:52 -07:00
Kamron Batman
d0ba94aa83
fix: Fixes addons that do not give deeds (#1224) 2022-11-02 19:26:51 -07:00
Kamron Batman
39e6f62ec9
fix: Codegens more misc items (#1216) 2022-10-29 16:08:23 -07:00