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

Commit a81e74e

Browse files
authored
Merge pull request #207 from Cazzar/fix-gpose-with-mare-pairs
Fix up applying scales applied via IPC when entering gpose
2 parents 04e0084 + cdc0379 commit a81e74e

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

CustomizePlus/CustomizePlus.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<Authors></Authors>
66
<Company></Company>
7-
<Version>1.2.6.0</Version>
7+
<Version>1.2.6.1</Version>
88
<Description>CustomizePlus</Description>
99
<Copyright></Copyright>
1010
<PackageProjectUrl>https://github.com/XIV-Tools/CustomizePlus</PackageProjectUrl>

CustomizePlus/Data/Profile/ProfileManager.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System.Collections.Generic;
66
using System.Linq;
77
using CustomizePlus.Helpers;
8+
using CustomizePlus.Services;
89
using Dalamud.Game.ClientState.Objects.Enums;
910

1011
namespace CustomizePlus.Data.Profile
@@ -265,6 +266,7 @@ public void AddTemporaryProfile(nint characterAddress, CharacterProfile prof)
265266
{
266267
prof.Enabled = true;
267268
prof.Address = characterAddress;
269+
268270
var key = TempLocalProfiles.Keys.FirstOrDefault(f => f.Address == characterAddress);
269271
if (key != null)
270272
{
@@ -382,12 +384,11 @@ public IEnumerable<CharacterProfile> GetProfilesByGameObject(Dalamud.Game.Client
382384
}
383385
}
384386

385-
var hasTempProfile = TempLocalProfiles.Any(f => obj.Address == f.Key.Address);
386-
if (hasTempProfile)
387+
var (tempCharacter, matchingProfile) = TempLocalProfiles.FirstOrDefault(f => obj.Address == f.Key.Address || (obj.ObjectIndex is >= 200 and < 300 && f.Value.AppliesTo(obj)));
388+
if (matchingProfile != null)
387389
{
388-
var matchingProfile = TempLocalProfiles.First(f => obj.Address == f.Key.Address);
389-
matchingProfile.Key.Processed = true;
390-
output.Add(matchingProfile.Value);
390+
tempCharacter.Processed = true;
391+
output.Add(matchingProfile);
391392
return output;
392393
}
393394

0 commit comments

Comments
 (0)