Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #207 from Cazzar/fix-gpose-with-mare-pairs
Browse files Browse the repository at this point in the history
Fix up applying scales applied via IPC when entering gpose
  • Loading branch information
StoiaCode authored Oct 17, 2023
2 parents 04e0084 + cdc0379 commit a81e74e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CustomizePlus/CustomizePlus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<Authors></Authors>
<Company></Company>
<Version>1.2.6.0</Version>
<Version>1.2.6.1</Version>
<Description>CustomizePlus</Description>
<Copyright></Copyright>
<PackageProjectUrl>https://github.com/XIV-Tools/CustomizePlus</PackageProjectUrl>
Expand Down
11 changes: 6 additions & 5 deletions CustomizePlus/Data/Profile/ProfileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Collections.Generic;
using System.Linq;
using CustomizePlus.Helpers;
using CustomizePlus.Services;
using Dalamud.Game.ClientState.Objects.Enums;

namespace CustomizePlus.Data.Profile
Expand Down Expand Up @@ -265,6 +266,7 @@ public void AddTemporaryProfile(nint characterAddress, CharacterProfile prof)
{
prof.Enabled = true;
prof.Address = characterAddress;

var key = TempLocalProfiles.Keys.FirstOrDefault(f => f.Address == characterAddress);
if (key != null)
{
Expand Down Expand Up @@ -382,12 +384,11 @@ public IEnumerable<CharacterProfile> GetProfilesByGameObject(Dalamud.Game.Client
}
}

var hasTempProfile = TempLocalProfiles.Any(f => obj.Address == f.Key.Address);
if (hasTempProfile)
var (tempCharacter, matchingProfile) = TempLocalProfiles.FirstOrDefault(f => obj.Address == f.Key.Address || (obj.ObjectIndex is >= 200 and < 300 && f.Value.AppliesTo(obj)));
if (matchingProfile != null)
{
var matchingProfile = TempLocalProfiles.First(f => obj.Address == f.Key.Address);
matchingProfile.Key.Processed = true;
output.Add(matchingProfile.Value);
tempCharacter.Processed = true;
output.Add(matchingProfile);
return output;
}

Expand Down

0 comments on commit a81e74e

Please sign in to comment.