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 #205 from Cazzar/fix-mcdf-import
Browse files Browse the repository at this point in the history
Allow scales to be loaded via MCDF files
  • Loading branch information
StoiaCode authored Oct 17, 2023
2 parents cb95168 + db4cceb commit eb38374
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CustomizePlus/Data/Profile/CharacterProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public CharacterProfile(CharacterProfile original) : this()

public string CharacterName { get; set; } = "Default";
public string ProfileName { get; set; } = "Profile";
public nint? Address { get; set; } = null;
public bool OwnedOnly { get; set; } = false;
public int ConfigVersion { get; set; } = Constants.ConfigurationVersion;
public bool Enabled { get; set; }
Expand All @@ -76,6 +77,8 @@ public CharacterProfile(CharacterProfile original) : this()
/// </summary>
public bool AppliesTo(Dalamud.Game.ClientState.Objects.Types.GameObject obj)
{
if (Address != null && obj.Address == Address) return true;

//PluginLog.Verbose($"Checking on {obj.ObjectIndex} for scale {ProfileName}");
if (obj.Name.TextValue.IsNullOrEmpty() && (obj.ObjectIndex == 200 || obj.ObjectIndex == 201))
{
Expand Down
2 changes: 2 additions & 0 deletions CustomizePlus/Data/Profile/ProfileManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ public void StopEditing(CharacterProfile prof)

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

0 comments on commit eb38374

Please sign in to comment.