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

Allow scales to be loaded via MCDF files #205

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading