mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Ensure permanent identifiers.
This commit is contained in:
parent
7bb5a1ebe3
commit
23919d8083
2 changed files with 6 additions and 4 deletions
|
|
@ -25,7 +25,7 @@ public readonly struct ActorIdentifier : IEquatable<ActorIdentifier>
|
|||
// @formatter:on
|
||||
|
||||
public ActorIdentifier CreatePermanent()
|
||||
=> new(Type, Kind, Index, DataId, PlayerName.IsEmpty ? PlayerName : PlayerName.Clone());
|
||||
=> new(Type, Kind, Index, DataId, PlayerName.IsEmpty || PlayerName.IsOwned ? PlayerName : PlayerName.Clone());
|
||||
|
||||
public bool Equals(ActorIdentifier other)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -145,12 +145,14 @@ public sealed partial class IndividualCollections
|
|||
return false;
|
||||
}
|
||||
|
||||
_assignments.Add( ( displayName, identifiers, collection ) );
|
||||
foreach( var identifier in identifiers )
|
||||
for( var i = 0; i < identifiers.Length; ++i )
|
||||
{
|
||||
_individuals.Add( identifier, collection );
|
||||
identifiers[ i ] = identifiers[ i ].CreatePermanent();
|
||||
_individuals.Add( identifiers[ i ], collection );
|
||||
}
|
||||
|
||||
_assignments.Add( ( displayName, identifiers, collection ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue