ModernUO/Projects/UOContent/Items
Kamron Batman 9c7cb5d778
fix: Fixes dupe property copying. Adds IgnoreDupe (#1811)
## Summary

### Changes
- Adds `[IgnoreDupe]` and `[SerializedIgnoreDupe]`
- Updates all _known_ classes that need the attribute. Some might be missing, please helps us find them!
- Adds `Item.Dupe()` command and encapsulates `CopyProperties` and `OnAfterDuped`. This is also overridable.
- Updates Dupe command to use the new logic.
- Fixes duping multiple kinds of objects that used to be outright broken.

### Bug Fixes
- Fixes issue with durability after duping
- Fixes issue with hue after duping

> [!Note]
> **Developer Note**
> Customizing how duping an item works now requires two steps:
> 1. Add `[IgnoreDupe]` or `[SerializedIgnoreDupe]` to the property/field
> 2. Add custom logic in an `OnAfterDuped` override
>
> When do you need to do this?
> *When the property being copied is not a primitive, and you need to manually deep-clone the contents of the property such as with Lists, Dictionaries, or sub classes.*
2024-06-02 15:04:54 -07:00
..
Addons fix: Optimizes gump relay info (Prep for Static Gumps) (#1698) 2024-03-07 20:54:53 -08:00
Aquarium fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Armor fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Body Parts feat: Adds SerializedCommandProperty (#1249) 2022-11-14 18:24:33 -08:00
Books fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Bulletin Boards fix: Fixes thread guard and cleans up incoming packet reader (#1641) 2023-12-19 17:04:09 -08:00
Champion Artifacts fix: Fixes random bias & Adds back champion arties for UOML (#1235) 2022-11-09 16:33:27 -08:00
Clothing fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Construction fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Containers fix: Fixes issue with cached static gump strings. Fixes bad gump colors (#1771) 2024-05-10 22:44:16 -07:00
Decoration Artifacts fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
Deeds fix: Consolidates Color/Center html (#1762) 2024-05-07 23:56:32 -07:00
Facial Formats UO Content (#201) 2020-08-27 18:30:38 -07:00
Farming fix: Fixes crafter deserialize, cleans up bandages, and codegens misc items (#1350) 2023-02-25 00:54:12 -08:00
Food fix: Moves many EventSinks out of core. (#1783) 2024-05-21 10:02:30 -07:00
Games fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Gems fix: Codegens gems (#1059) 2022-06-13 17:38:46 -07:00
Guilds fix: Cleans up FixHtml (#1757) 2024-05-03 21:24:31 -07:00
Jewels fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Lights feat: Adds SerializedCommandProperty (#1249) 2022-11-14 18:24:33 -08:00
Maps fix: Consolidates Color/Center html (#1762) 2024-05-07 23:56:32 -07:00
Minor Artifacts fix: Fixes serious stacking issue (#1225) 2022-11-02 22:18:44 -07:00
Misc fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
New Haven Quest Rewards fix: Codegen new haven quest rewards (#1269) 2022-11-23 13:00:28 -08:00
PlantsFlowers/Potted fix: Codegens potted plants (#1270) 2022-11-23 13:04:30 -08:00
Quivers fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Resources fix: Consolidates commodity interface for reagents. (#1709) 2024-03-21 11:31:14 -07:00
Shields feat: Adds leather/metal food, fixes weapons/armors with wrong materials (#1718) 2024-04-04 19:43:02 -07:00
Skill Items fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Special fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Suits fix: Adds command help, webpage, and fixes issues with other commands (#1669) 2024-02-10 00:19:19 -08:00
Talismans fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Traps fix: Changes Map.Sector.Mobiles to link list & Fixes various related crash bugs (#1553) 2023-10-29 22:42:46 -07:00
TreasureChests fix: Updates serialization to use v2.0 (#998) 2022-04-17 08:02:15 -07:00
Wands feat: Adds leather/metal food, fixes weapons/armors with wrong materials (#1718) 2024-04-04 19:43:02 -07:00
Weapons fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00