From c1c0fead8d9e2a521506c2d54f45671866af26a9 Mon Sep 17 00:00:00 2001 From: RisaDev <151885272+RisaDev@users.noreply.github.com> Date: Wed, 16 Oct 2024 23:07:50 +0300 Subject: [PATCH] Improve IPC OnArmatureChanged check --- CustomizePlus/Api/CustomizePlusIpc.Profile.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CustomizePlus/Api/CustomizePlusIpc.Profile.cs b/CustomizePlus/Api/CustomizePlusIpc.Profile.cs index 221bbf6..439150e 100644 --- a/CustomizePlus/Api/CustomizePlusIpc.Profile.cs +++ b/CustomizePlus/Api/CustomizePlusIpc.Profile.cs @@ -261,12 +261,10 @@ public partial class CustomizePlusIpc //warn: intended limitation - ignores default profiles because why you would use default profile on your own character private void OnArmatureChanged(ArmatureChanged.Type type, Armature armature, object? arg3) { - string currentPlayerName = _gameObjectService.GetCurrentPlayerName(); - - if (armature.ActorIdentifier.ToNameWithoutOwnerName() != currentPlayerName) + if (!armature.ActorIdentifier.CompareIgnoringOwnership(_gameObjectService.GetCurrentPlayerActorIdentifier())) return; - if (armature.ActorIdentifier.HomeWorld == WorldId.AnyWorld) //Cutscene/GPose actors + if (armature.ActorIdentifier.HomeWorld == WorldId.AnyWorld) //Only Cutscene/GPose actors have world set to AnyWorld return; ICharacter? localPlayerCharacter = (ICharacter?)_gameObjectService.GetDalamudGameObjectFromActor(_gameObjectService.GetLocalPlayerActor());