Added character info and priority to Profile.GetList IPC, bump of major IPC version, IPCCharacterProfile cleanup, some fixes which should hopefully fix temporary profiles for minions

This commit is contained in:
RisaDev
2024-10-22 21:03:50 +03:00
parent 17e09a8d26
commit 9061138cf1
8 changed files with 101 additions and 27 deletions

View File

@@ -563,12 +563,19 @@ public unsafe sealed class ArmatureManager : IDisposable
profile!.Armatures.ForEach(x => x.IsPendingProfileRebind = true);
}
/// <summary>
/// Warn: should not be used for temporary profiles as this limits search for Type = Owned to things owned by local player.
/// </summary>
private IEnumerable<Armature> GetArmaturesForCharacter(ActorIdentifier actorIdentifier)
{
foreach (var kvPair in Armatures)
{
(var armatureActorIdentifier, _) = _gameObjectService.GetTrueActorForSpecialTypeActor(kvPair.Key);
//warn: side-effect: for Type = Owned will ignore owner.
//This isn't a particularly huge issue as this is only used for profile rebinding, but this probably should be handled better later.
/*if (actorIdentifier.IsValid && armatureActorIdentifier.MatchesIgnoringOwnership(actorIdentifier))
yield return kvPair.Value;*/
if (actorIdentifier.IsValid && armatureActorIdentifier.MatchesIgnoringOwnership(actorIdentifier) &&
(armatureActorIdentifier.Type != IdentifierType.Owned || armatureActorIdentifier.IsOwnedByLocalPlayer()))
yield return kvPair.Value;