ModernUO/Projects/Server/Mobiles
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
..
Mods fix: Updates schema generator to 2.6.4 (#1452) 2023-08-11 00:09:56 -07:00
AggressorInfo.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
BaseVendor.cs fix: Fixes client crash while selling items to NPC (#1296) 2022-12-05 20:16:31 -08:00
Body.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
IHasSteps.cs feat: Adds Stamina System to overhaul overweight. (#1465) 2023-09-16 17:52:54 -07:00
IMount.cs fix: Optimizes FindItemsByType by removing allocations. (#1515) 2023-09-28 19:36:45 -07:00
IVendor.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
Mobile.cs fix: Fixes dupe property copying. Adds IgnoreDupe (#1811) 2024-06-02 15:04:54 -07:00
Mobile.Migrations.cs fix: Overhauls virtue system (#1376) 2023-07-19 21:43:47 -07:00
Movement.cs fix: Codegens BaseMulti, Container, and VirtualCheck (#1624) 2023-12-02 10:00:02 -08:00
Notoriety.cs fix: Cleans up core code (#1187) 2022-10-10 21:47:08 -07:00
SimplePrompt.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00
SimpleTarget.cs chore: Updates copyright (#1448) 2023-08-09 09:09:26 -07:00