mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-14 04:34:19 +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
|
// @formatter:on
|
||||||
|
|
||||||
public ActorIdentifier CreatePermanent()
|
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)
|
public bool Equals(ActorIdentifier other)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -145,12 +145,14 @@ public sealed partial class IndividualCollections
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_assignments.Add( ( displayName, identifiers, collection ) );
|
for( var i = 0; i < identifiers.Length; ++i )
|
||||||
foreach( var identifier in identifiers )
|
|
||||||
{
|
{
|
||||||
_individuals.Add( identifier, collection );
|
identifiers[ i ] = identifiers[ i ].CreatePermanent();
|
||||||
|
_individuals.Add( identifiers[ i ], collection );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_assignments.Add( ( displayName, identifiers, collection ) );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue