Fix cursed mask bug (#33014)

* One line fix

* Removed redundant using

* Allocation improvement
This commit is contained in:
FN
2024-11-08 09:59:05 +07:00
committed by GitHub
parent 261c18f764
commit 012855475e

View File

@@ -51,7 +51,8 @@ public sealed class CursedMaskSystem : SharedCursedMaskSystem
}
var npcFaction = EnsureComp<NpcFactionMemberComponent>(wearer);
ent.Comp.OldFactions = npcFaction.Factions;
ent.Comp.OldFactions.Clear();
ent.Comp.OldFactions.UnionWith(npcFaction.Factions);
_npcFaction.ClearFactions((wearer, npcFaction), false);
_npcFaction.AddFaction((wearer, npcFaction), ent.Comp.CursedMaskFaction);