fix: Removes side effect of setting skill mod when changing Owner (#1101)

## Breaking Change!
Setting `mod.Owner` will no longer update a skill mod.
**Please stick to the API and use `mobile.AddSkillMod(mod)` for all situations, including equipping.**


## Fixes
- [X] Fixes memory leak in factions.
- [X] Changes `List<SkillMod>` to `HashSet<SkillMod>`.
- [X] Eliminates skill mods adding/removing twice.
This commit is contained in:
Kamron Batman 2022-06-30 12:07:08 -07:00 • committed by GitHub
parent 414ef8d8d6
commit cb474712f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 80 additions and 109 deletions

View file

@ -21,7 +21,7 @@ namespace Server;
public partial class MobileMod
{
[DirtyTrackingEntity]
public virtual Mobile Owner { get; set; }
public Mobile Owner { get; set; }
public MobileMod(Mobile owner) => Owner = owner;
}