Improve IPC OnArmatureChanged check

This commit is contained in:
RisaDev
2024-10-16 23:07:50 +03:00
parent 2ca4f6a431
commit c1c0fead8d

View File

@@ -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());