Merge pull request #12 from Aether-Tools/dawntrail

Dawntrail update
This commit is contained in:
RisaDev
2024-07-11 14:16:05 +03:00
committed by GitHub
41 changed files with 112 additions and 76 deletions

View File

@@ -19,7 +19,7 @@ public sealed unsafe class CopyCharacter : EventWrapperPtr<Character, Character,
private readonly Task<Hook<Delegate>> _task; private readonly Task<Hook<Delegate>> _task;
public nint Address public nint Address
=> (nint)CharacterSetup.MemberFunctionPointers.CopyFromCharacter; => (nint)CharacterSetupContainer.MemberFunctionPointers.CopyFromCharacter;
public void Enable() public void Enable()
=> _task.Result.Enable(); => _task.Result.Enable();
@@ -33,9 +33,9 @@ public sealed unsafe class CopyCharacter : EventWrapperPtr<Character, Character,
public bool Finished public bool Finished
=> _task.IsCompletedSuccessfully; => _task.IsCompletedSuccessfully;
private delegate ulong Delegate(CharacterSetup* target, Character* source, uint unk); private delegate ulong Delegate(CharacterSetupContainer* target, Character* source, uint unk);
private ulong Detour(CharacterSetup* target, Character* source, uint unk) private ulong Detour(CharacterSetupContainer* target, Character* source, uint unk)
{ {
// TODO: update when CS updated. // TODO: update when CS updated.
var character = ((Character**)target)[1]; var character = ((Character**)target)[1];

View File

@@ -20,7 +20,7 @@ public class CutsceneService : IService, IDisposable
private readonly CharacterDestructor _characterDestructor; private readonly CharacterDestructor _characterDestructor;
private readonly short[] _copiedCharacters = Enumerable.Repeat((short)-1, CutsceneSlots).ToArray(); private readonly short[] _copiedCharacters = Enumerable.Repeat((short)-1, CutsceneSlots).ToArray();
public IEnumerable<KeyValuePair<int, Dalamud.Game.ClientState.Objects.Types.GameObject>> Actors public IEnumerable<KeyValuePair<int, Dalamud.Game.ClientState.Objects.Types.IGameObject>> Actors
=> Enumerable.Range(CutsceneStartIdx, CutsceneSlots) => Enumerable.Range(CutsceneStartIdx, CutsceneSlots)
.Where(i => _objects[i] != null) .Where(i => _objects[i] != null)
.Select(i => KeyValuePair.Create(i, this[i] ?? _objects[i]!)); .Select(i => KeyValuePair.Create(i, this[i] ?? _objects[i]!));
@@ -43,7 +43,7 @@ public class CutsceneService : IService, IDisposable
/// Does not check for valid input index. /// Does not check for valid input index.
/// Returns null if no connected actor is set or the actor does not exist anymore. /// Returns null if no connected actor is set or the actor does not exist anymore.
/// </summary> /// </summary>
public Dalamud.Game.ClientState.Objects.Types.GameObject? this[int idx] public Dalamud.Game.ClientState.Objects.Types.IGameObject? this[int idx]
{ {
get get
{ {
@@ -101,7 +101,7 @@ public class CutsceneService : IService, IDisposable
// A hack to deal with GPose actors leaving and thus losing the link, we just set the home world instead. // A hack to deal with GPose actors leaving and thus losing the link, we just set the home world instead.
// I do not think this breaks anything? // I do not think this breaks anything?
var address = (GameObject*)_objects.GetObjectAddress(i + CutsceneStartIdx); var address = (GameObject*)_objects.GetObjectAddress(i + CutsceneStartIdx);
if (address != null && address->GetObjectKind() is (byte)ObjectKind.Pc) if (address != null && address->GetObjectKind() is ObjectKind.Pc)
((Character*)address)->HomeWorld = character->HomeWorld; ((Character*)address)->HomeWorld = character->HomeWorld;
_copiedCharacters[i] = -1; _copiedCharacters[i] = -1;

View File

@@ -29,7 +29,7 @@ public unsafe class GameEventManager : IDisposable
interop.InitializeFromAttributes(this); interop.InitializeFromAttributes(this);
_copyCharacterHook = _copyCharacterHook =
interop.HookFromAddress<CopyCharacterDelegate>((nint)CharacterSetup.MemberFunctionPointers.CopyFromCharacter, CopyCharacterDetour); interop.HookFromAddress<CopyCharacterDelegate>((nint)CharacterSetupContainer.MemberFunctionPointers.CopyFromCharacter, CopyCharacterDetour);
_characterBaseCreateHook = _characterBaseCreateHook =
interop.HookFromAddress<CharacterBaseCreateDelegate>((nint)CharacterBase.MemberFunctionPointers.Create, CharacterBaseCreateDetour); interop.HookFromAddress<CharacterBaseCreateDelegate>((nint)CharacterBase.MemberFunctionPointers.Create, CharacterBaseCreateDetour);
_characterBaseDestructorHook = _characterBaseDestructorHook =
@@ -83,11 +83,11 @@ public unsafe class GameEventManager : IDisposable
#region Copy Character #region Copy Character
private delegate ulong CopyCharacterDelegate(CharacterSetup* target, GameObject* source, uint unk); private delegate ulong CopyCharacterDelegate(CharacterSetupContainer* target, GameObject* source, uint unk);
private readonly Hook<CopyCharacterDelegate> _copyCharacterHook; private readonly Hook<CopyCharacterDelegate> _copyCharacterHook;
private ulong CopyCharacterDetour(CharacterSetup* target, GameObject* source, uint unk) private ulong CopyCharacterDetour(CharacterSetupContainer* target, GameObject* source, uint unk)
{ {
// TODO: update when CS updated. // TODO: update when CS updated.
var character = ((Character**)target)[1]; var character = ((Character**)target)[1];

View File

@@ -16,7 +16,7 @@ public class ObjectManager(
IFramework framework, IFramework framework,
IClientState clientState, IClientState clientState,
IObjectTable objects, IObjectTable objects,
DalamudPluginInterface pi, IDalamudPluginInterface pi,
Logger log, Logger log,
ActorManager actors, ActorManager actors,
ITargetManager targets) ITargetManager targets)
@@ -218,13 +218,16 @@ public class ObjectManager(
} }
//c+ custom //c+ custom
[Obsolete("To be updated for DT")]
private unsafe bool AddLobbyCharacter() private unsafe bool AddLobbyCharacter()
{ {
return false;
/*
var agent = AgentLobby.Instance(); var agent = AgentLobby.Instance();
if (agent == null || agent->LobbyData.CharaSelectEntries.Size() == 0) if (agent == null || agent->LobbyData.CharaSelectEntries.LongCount() == 0)
return false; return false;
var chara = agent->LobbyData.CharaSelectEntries.Get((ulong)agent->SelectedCharacterIndex).Value; var chara = agent->LobbyData.CharaSelectEntries.Get((ulong)agent->SelectedCharacterContentId).Value;
if (chara == null) if (chara == null)
return false; return false;
@@ -235,6 +238,6 @@ public class ObjectManager(
HandleIdentifier(actors.CreatePlayer(new ByteString(chara->Name), chara->HomeWorldId), actor); HandleIdentifier(actors.CreatePlayer(new ByteString(chara->Name), chara->HomeWorldId), actor);
return true; return true;*/
} }
} }

View File

@@ -25,6 +25,8 @@ public partial class CustomizePlusIpc
[EzIPC("General.IsValid")] [EzIPC("General.IsValid")]
private bool IsValid() private bool IsValid()
{ {
return false;
return !IPCFailed && return !IPCFailed &&
!_hookingService.RenderHookFailed && !_hookingService.RenderHookFailed &&
!_hookingService.MovementHookFailed; !_hookingService.MovementHookFailed;

View File

@@ -30,7 +30,7 @@ public partial class CustomizePlusIpc
/// /!\ If no profile is set on specified character profile id will be equal to Guid.Empty /// /!\ If no profile is set on specified character profile id will be equal to Guid.Empty
/// </summary> /// </summary>
[EzIPCEvent("Profile.OnUpdate")] [EzIPCEvent("Profile.OnUpdate")]
private Action<Character, Guid> OnProfileUpdate; private Action<ICharacter, Guid> OnProfileUpdate;
/// <summary> /// <summary>
/// Retrieve list of all user profiles /// Retrieve list of all user profiles
@@ -125,8 +125,11 @@ public partial class CustomizePlusIpc
/// Get unique id of currently active profile for character. /// Get unique id of currently active profile for character.
/// </summary> /// </summary>
[EzIPC("Profile.GetActiveProfileIdOnCharacter")] [EzIPC("Profile.GetActiveProfileIdOnCharacter")]
private (int, Guid?) GetActiveProfileIdOnCharacter(Character character) private (int, Guid?) GetActiveProfileIdOnCharacter(ICharacter character)
{ {
//todo: temporary
return ((int)ErrorCode.UnknownError, null);
if (character == null) if (character == null)
return ((int)ErrorCode.InvalidCharacter, null); return ((int)ErrorCode.InvalidCharacter, null);
@@ -143,8 +146,11 @@ public partial class CustomizePlusIpc
/// Returns profile's unique id which can be used to manipulate it at a later date. /// Returns profile's unique id which can be used to manipulate it at a later date.
/// </summary> /// </summary>
[EzIPC("Profile.SetTemporaryProfileOnCharacter")] [EzIPC("Profile.SetTemporaryProfileOnCharacter")]
private (int, Guid?) SetTemporaryProfileOnCharacter(Character character, string profileJson) private (int, Guid?) SetTemporaryProfileOnCharacter(ICharacter character, string profileJson)
{ {
//todo: temporary
return ((int)ErrorCode.UnknownError, null);
//todo: do not allow to set temporary profile on reserved actors (examine, etc) //todo: do not allow to set temporary profile on reserved actors (examine, etc)
if (character == null) if (character == null)
return ((int)ErrorCode.InvalidCharacter, null); return ((int)ErrorCode.InvalidCharacter, null);
@@ -190,8 +196,11 @@ public partial class CustomizePlusIpc
/// Delete temporary profile currently active on character /// Delete temporary profile currently active on character
/// </summary> /// </summary>
[EzIPC("Profile.DeleteTemporaryProfileOnCharacter")] [EzIPC("Profile.DeleteTemporaryProfileOnCharacter")]
private int DeleteTemporaryProfileOnCharacter(Character character) private int DeleteTemporaryProfileOnCharacter(ICharacter character)
{ {
//todo: temporary
return (int)ErrorCode.UnknownError;
if (character == null) if (character == null)
return (int)ErrorCode.InvalidCharacter; return (int)ErrorCode.InvalidCharacter;
@@ -261,12 +270,15 @@ public partial class CustomizePlusIpc
//warn: intended limitation - ignores default profiles because why you would use default profile on your own character //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) private void OnArmatureChanged(ArmatureChanged.Type type, Armature armature, object? arg3)
{ {
//todo: temporary
return;
string currentPlayerName = _gameObjectService.GetCurrentPlayerName(); string currentPlayerName = _gameObjectService.GetCurrentPlayerName();
if (armature.ActorIdentifier.ToNameWithoutOwnerName() != currentPlayerName) if (armature.ActorIdentifier.ToNameWithoutOwnerName() != currentPlayerName)
return; return;
Character? localPlayerCharacter = (Character?)_gameObjectService.GetDalamudGameObjectFromActor(_gameObjectService.GetLocalPlayerActor()); ICharacter? localPlayerCharacter = (ICharacter?)_gameObjectService.GetDalamudGameObjectFromActor(_gameObjectService.GetLocalPlayerActor());
if (localPlayerCharacter == null) if (localPlayerCharacter == null)
return; return;
@@ -317,7 +329,7 @@ public partial class CustomizePlusIpc
} }
} }
private void OnProfileUpdateInternal(Character character, Profile? profile) private void OnProfileUpdateInternal(ICharacter character, Profile? profile)
{ {
if (character == null) if (character == null)
return; return;

View File

@@ -19,7 +19,7 @@ namespace CustomizePlus.Api;
/// </summary> /// </summary>
public partial class CustomizePlusIpc : IDisposable public partial class CustomizePlusIpc : IDisposable
{ {
private readonly DalamudPluginInterface _pluginInterface; private readonly IDalamudPluginInterface _pluginInterface;
private readonly Logger _logger; private readonly Logger _logger;
private readonly HookingService _hookingService; private readonly HookingService _hookingService;
private readonly ProfileManager _profileManager; private readonly ProfileManager _profileManager;
@@ -34,7 +34,7 @@ public partial class CustomizePlusIpc : IDisposable
public bool IPCFailed { get; private set; } public bool IPCFailed { get; private set; }
public CustomizePlusIpc( public CustomizePlusIpc(
DalamudPluginInterface pluginInterface, IDalamudPluginInterface pluginInterface,
Logger logger, Logger logger,
HookingService hookingService, HookingService hookingService,
ProfileManager profileManager, ProfileManager profileManager,

View File

@@ -5,6 +5,7 @@ using CustomizePlus.Core.Data;
using CustomizePlus.Templates.Data; using CustomizePlus.Templates.Data;
using FFXIVClientStructs.FFXIV.Client.Graphics.Scene; using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
using FFXIVClientStructs.Havok; using FFXIVClientStructs.Havok;
using FFXIVClientStructs.Havok.Common.Base.Math.QsTransform;
namespace CustomizePlus.Armatures.Data; namespace CustomizePlus.Armatures.Data;

View File

@@ -2,18 +2,15 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using Dalamud.Configuration; using Dalamud.Configuration;
using Dalamud.Interface.Internal.Notifications;
using Newtonsoft.Json; using Newtonsoft.Json;
using OtterGui.Classes; using OtterGui.Classes;
using OtterGui.Log;
using OtterGui.Widgets; using OtterGui.Widgets;
using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs;
using CustomizePlus.Core.Services; using CustomizePlus.Core.Services;
using CustomizePlus.Core.Data; using CustomizePlus.Core.Data;
using CustomizePlus.Configuration.Services; using CustomizePlus.Configuration.Services;
using CustomizePlus.Game.Services;
using CustomizePlus.UI.Windows; using CustomizePlus.UI.Windows;
using Dalamud.Plugin.Services; using Dalamud.Interface.ImGuiNotification;
namespace CustomizePlus.Configuration.Data; namespace CustomizePlus.Configuration.Data;

View File

@@ -1,5 +1,4 @@
using Dalamud.Interface.Internal.Notifications; using Newtonsoft.Json;
using Newtonsoft.Json;
using OtterGui.Classes; using OtterGui.Classes;
using OtterGui.Log; using OtterGui.Log;
using System; using System;
@@ -11,7 +10,7 @@ using CustomizePlus.Configuration.Helpers;
using CustomizePlus.Configuration.Data; using CustomizePlus.Configuration.Data;
using CustomizePlus.Core.Events; using CustomizePlus.Core.Events;
using CustomizePlus.Configuration.Data.Version3; using CustomizePlus.Configuration.Data.Version3;
using CustomizePlus.UI.Windows; using Dalamud.Interface.ImGuiNotification;
namespace CustomizePlus.Configuration.Services; namespace CustomizePlus.Configuration.Services;

View File

@@ -4,6 +4,7 @@ using System.Runtime.Serialization;
using CustomizePlus.Core.Extensions; using CustomizePlus.Core.Extensions;
using CustomizePlus.Game.Services.GPose.ExternalTools; using CustomizePlus.Game.Services.GPose.ExternalTools;
using FFXIVClientStructs.Havok; using FFXIVClientStructs.Havok;
using FFXIVClientStructs.Havok.Common.Base.Math.QsTransform;
namespace CustomizePlus.Core.Data; namespace CustomizePlus.Core.Data;

View File

@@ -1,4 +1,7 @@
using FFXIVClientStructs.Havok; using FFXIVClientStructs.Havok;
using FFXIVClientStructs.Havok.Common.Base.Math.QsTransform;
using FFXIVClientStructs.Havok.Common.Base.Math.Quaternion;
using FFXIVClientStructs.Havok.Common.Base.Math.Vector;
using System.Numerics; using System.Numerics;
namespace CustomizePlus.Core.Data; namespace CustomizePlus.Core.Data;
@@ -79,7 +82,7 @@ internal static class Constants
/// <summary> /// <summary>
/// Movement hook address, used for position offset and other changes which cannot be done in main hook /// Movement hook address, used for position offset and other changes which cannot be done in main hook
/// </summary> /// </summary>
public const string MovementHookAddress = "E8 ?? ?? ?? ?? EB 29 48 8B 5F 08"; public const string MovementHookAddress = "E8 ?? ?? ?? ?? 84 DB 74 45";
internal static class Colors internal static class Colors
{ {

View File

@@ -2,6 +2,8 @@
using System.Numerics; using System.Numerics;
using CustomizePlus.Core.Data; using CustomizePlus.Core.Data;
using FFXIVClientStructs.Havok; using FFXIVClientStructs.Havok;
using FFXIVClientStructs.Havok.Common.Base.Math.QsTransform;
using FFXIVClientStructs.Havok.Common.Base.Math.Vector;
//using FFXIVClientStructs.FFXIV.Client.Graphics; //using FFXIVClientStructs.FFXIV.Client.Graphics;

View File

@@ -2,6 +2,8 @@
using System.Numerics; using System.Numerics;
using CustomizePlus.Anamnesis.Data; using CustomizePlus.Anamnesis.Data;
using FFXIVClientStructs.Havok; using FFXIVClientStructs.Havok;
using FFXIVClientStructs.Havok.Common.Base.Math.Quaternion;
using FFXIVClientStructs.Havok.Common.Base.Math.Vector;
namespace CustomizePlus.Core.Extensions; namespace CustomizePlus.Core.Extensions;

View File

@@ -37,7 +37,7 @@ namespace CustomizePlus.Core;
public static class ServiceManagerBuilder public static class ServiceManagerBuilder
{ {
public static ServiceManager CreateProvider(DalamudPluginInterface pi, Logger logger) public static ServiceManager CreateProvider(IDalamudPluginInterface pi, Logger logger)
{ {
EventWrapperBase.ChangeLogger(logger); EventWrapperBase.ChangeLogger(logger);

View File

@@ -1,5 +1,4 @@
using Dalamud.Game.Command; using Dalamud.Game.Command;
using Dalamud.Interface.Internal.Notifications;
using Dalamud.Plugin.Services; using Dalamud.Plugin.Services;
using OtterGui.Classes; using OtterGui.Classes;
using System; using System;
@@ -13,6 +12,7 @@ using CustomizePlus.UI.Windows.MainWindow;
using static System.Windows.Forms.AxHost; using static System.Windows.Forms.AxHost;
using CustomizePlus.Profiles.Data; using CustomizePlus.Profiles.Data;
using CustomizePlus.Configuration.Data; using CustomizePlus.Configuration.Data;
using Dalamud.Interface.ImGuiNotification;
namespace CustomizePlus.Core.Services; namespace CustomizePlus.Core.Services;

View File

@@ -10,7 +10,7 @@ namespace CustomizePlus.Core.Services;
public class DalamudServices public class DalamudServices
{ {
public static void AddServices(ServiceManager services, DalamudPluginInterface pi) public static void AddServices(ServiceManager services, IDalamudPluginInterface pi)
{ {
services.AddExistingService(pi) services.AddExistingService(pi)
.AddExistingService(pi.UiBuilder) .AddExistingService(pi.UiBuilder)

View File

@@ -15,7 +15,7 @@ public class FilenameService
public readonly string TemplateDirectory; public readonly string TemplateDirectory;
public readonly string TemplateFileSystem; public readonly string TemplateFileSystem;
public FilenameService(DalamudPluginInterface pi) public FilenameService(IDalamudPluginInterface pi)
{ {
ConfigDirectory = pi.ConfigDirectory.FullName; ConfigDirectory = pi.ConfigDirectory.FullName;
ConfigFile = pi.ConfigFile.FullName; ConfigFile = pi.ConfigFile.FullName;

View File

@@ -27,7 +27,7 @@ public class HookingService : IDisposable
private Hook<RenderDelegate>? _renderManagerHook; private Hook<RenderDelegate>? _renderManagerHook;
private Hook<GameObjectMovementDelegate>? _gameObjectMovementHook; private Hook<GameObjectMovementDelegate>? _gameObjectMovementHook;
private delegate nint RenderDelegate(nint a1, nint a2, int a3, int a4); private delegate nint RenderDelegate(nint a1, nint a2, nint a3, int a4);
[UnmanagedFunctionPointer(CallingConvention.StdCall)] [UnmanagedFunctionPointer(CallingConvention.StdCall)]
private delegate void GameObjectMovementDelegate(nint gameObject); private delegate void GameObjectMovementDelegate(nint gameObject);
@@ -101,7 +101,7 @@ public class HookingService : IDisposable
} }
} }
private nint OnRender(nint a1, nint a2, int a3, int a4) private nint OnRender(nint a1, nint a2, nint a3, int a4)
{ {
if (_renderManagerHook == null) if (_renderManagerHook == null)
{ {

View File

@@ -22,14 +22,14 @@ public class SupportLogBuilderService
private readonly TemplateManager _templateManager; private readonly TemplateManager _templateManager;
private readonly ProfileManager _profileManager; private readonly ProfileManager _profileManager;
private readonly ArmatureManager _armatureManager; private readonly ArmatureManager _armatureManager;
private readonly DalamudPluginInterface _dalamudPluginInterface; private readonly IDalamudPluginInterface _dalamudPluginInterface;
public SupportLogBuilderService( public SupportLogBuilderService(
PluginConfiguration configuration, PluginConfiguration configuration,
TemplateManager templateManager, TemplateManager templateManager,
ProfileManager profileManager, ProfileManager profileManager,
ArmatureManager armatureManager, ArmatureManager armatureManager,
DalamudPluginInterface dalamudPluginInterface) IDalamudPluginInterface dalamudPluginInterface)
{ {
_configuration = configuration; _configuration = configuration;
_templateManager = templateManager; _templateManager = templateManager;
@@ -40,14 +40,16 @@ public class SupportLogBuilderService
public string BuildSupportLog() public string BuildSupportLog()
{ {
var sb = new StringBuilder(10240); var sb = new StringBuilder(102400); //it's fair to assume this will very often be quite large
sb.AppendLine("**Settings**"); sb.AppendLine("**Settings**");
sb.Append($"> **`Plugin Version: `** {Plugin.Version}\n"); sb.Append($"> **`Plugin Version: `** {Plugin.Version}\n");
sb.Append($"> **`Commit Hash: `** {ThisAssembly.Git.Commit}+{ThisAssembly.Git.Sha}\n"); sb.Append($"> **`Commit Hash: `** {ThisAssembly.Git.Commit}+{ThisAssembly.Git.Sha}\n");
sb.Append($"> **`Root editing: `** {_configuration.EditorConfiguration.RootPositionEditingEnabled}\n"); sb.Append($"> **`Plugin enabled: `** {_configuration.PluginEnabled}\n");
sb.AppendLine("**Settings -> Editor Settings**"); sb.AppendLine("**Settings -> Editor Settings**");
sb.Append($"> **`Limit to my creatures (editor): `** {_configuration.EditorConfiguration.LimitLookupToOwnedObjects}\n"); sb.Append($"> **`Limit to my creatures (editor): `** {_configuration.EditorConfiguration.LimitLookupToOwnedObjects}\n");
sb.Append($"> **`Preview character (editor): `** {_configuration.EditorConfiguration.PreviewCharacterName?.Incognify() ?? "Not set"}\n"); sb.Append($"> **`Preview character (editor): `** {_configuration.EditorConfiguration.PreviewCharacterName?.Incognify() ?? "Not set"}\n");
sb.Append($"> **`Set preview character on login: `** {_configuration.EditorConfiguration.SetPreviewToCurrentCharacterOnLogin}\n");
sb.Append($"> **`Root editing: `** {_configuration.EditorConfiguration.RootPositionEditingEnabled}\n");
sb.AppendLine("**Settings -> Profile application**"); sb.AppendLine("**Settings -> Profile application**");
sb.Append($"> **`Character window: `** {_configuration.ProfileApplicationSettings.ApplyInCharacterWindow}\n"); sb.Append($"> **`Character window: `** {_configuration.ProfileApplicationSettings.ApplyInCharacterWindow}\n");
sb.Append($"> **`Try On: `** {_configuration.ProfileApplicationSettings.ApplyInTryOn}\n"); sb.Append($"> **`Try On: `** {_configuration.ProfileApplicationSettings.ApplyInTryOn}\n");
@@ -63,6 +65,7 @@ public class SupportLogBuilderService
sb.Append($"> > **`{template.ToString(),-32}`**\n"); sb.Append($"> > **`{template.ToString(),-32}`**\n");
} }
sb.AppendLine("**Profiles**"); sb.AppendLine("**Profiles**");
sb.Append($"> **`Default profile: `** {_profileManager.DefaultProfile?.ToString() ?? "None"}\n");
sb.Append($"> **`Count: `** {_profileManager.Profiles.Count}\n"); sb.Append($"> **`Count: `** {_profileManager.Profiles.Count}\n");
foreach (var profile in _profileManager.Profiles) foreach (var profile in _profileManager.Profiles)
{ {

View File

@@ -93,4 +93,8 @@
<PropertyGroup Condition="'$(Configuration)'=='Release'"> <PropertyGroup Condition="'$(Configuration)'=='Release'">
<DefineConstants>INCOGNIFY_STRINGS</DefineConstants> <DefineConstants>INCOGNIFY_STRINGS</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<GitVersion>false</GitVersion>
</PropertyGroup>
</Project> </Project>

View File

@@ -6,7 +6,7 @@
"InternalName": "CustomizePlus", "InternalName": "CustomizePlus",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"AssemblyVersion": "2.0.0.0", "AssemblyVersion": "2.0.0.0",
"DalamudApiLevel": 9, "DalamudApiLevel": 10,
"Tags": [ "Tags": [
"Anamnesis", "Anamnesis",
"Customization", "Customization",

View File

@@ -56,9 +56,9 @@ public class GPoseService : IDisposable
GPoseState = clientState.IsGPosing ? GPoseState.Inside : GPoseState.Outside; GPoseState = clientState.IsGPosing ? GPoseState.Inside : GPoseState.Outside;
var uiModule = Framework.Instance()->GetUiModule(); var uiModule = Framework.Instance()->GetUIModule();
var enterGPoseAddress = (nint)uiModule->VTable->EnterGPose; var enterGPoseAddress = (nint)uiModule->VirtualTable->EnterGPose;
var exitGPoseAddress = (nint)uiModule->VTable->ExitGPose; var exitGPoseAddress = (nint)uiModule->VirtualTable->ExitGPose;
_enterGPoseHook = hooker.HookFromAddress<EnterGPoseDelegate>(enterGPoseAddress, EnteringGPoseDetour); _enterGPoseHook = hooker.HookFromAddress<EnterGPoseDelegate>(enterGPoseAddress, EnteringGPoseDetour);
_enterGPoseHook.Enable(); _enterGPoseHook.Enable();

View File

@@ -6,7 +6,7 @@ using Penumbra.GameData.Actors;
using Penumbra.GameData.Enums; using Penumbra.GameData.Enums;
using Penumbra.GameData.Interop; using Penumbra.GameData.Interop;
using ObjectManager = CustomizePlus.GameData.Services.ObjectManager; using ObjectManager = CustomizePlus.GameData.Services.ObjectManager;
using DalamudGameObject = Dalamud.Game.ClientState.Objects.Types.GameObject; using DalamudGameObject = Dalamud.Game.ClientState.Objects.Types.IGameObject;
using ECommons.Configuration; using ECommons.Configuration;
using System; using System;
using CustomizePlus.Configuration.Data; using CustomizePlus.Configuration.Data;

View File

@@ -36,7 +36,7 @@ public sealed class Plugin : IDalamudPlugin
public static readonly Logger Logger = new(); //for loggin in static classes/methods public static readonly Logger Logger = new(); //for loggin in static classes/methods
public Plugin(DalamudPluginInterface pluginInterface) public Plugin(IDalamudPluginInterface pluginInterface)
{ {
try try
{ {
@@ -52,7 +52,7 @@ public sealed class Plugin : IDalamudPlugin
_services.GetService<CPlusWindowSystem>(); _services.GetService<CPlusWindowSystem>();
_services.GetService<CommandService>(); _services.GetService<CommandService>();
Logger.Information($"Customize+ v{Version} ({ThisAssembly.Git.Commit}+{ThisAssembly.Git.Sha}) [FantasiaPlus] started"); Logger.Information($"Customize+ {Version} ({ThisAssembly.Git.Commit}+{ThisAssembly.Git.Sha}) [FantasiaPlus] started");
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@@ -6,10 +6,10 @@ using System.Text.RegularExpressions;
using System; using System;
using System.Linq; using System.Linq;
using OtterGui.Classes; using OtterGui.Classes;
using Dalamud.Interface.Internal.Notifications;
using CustomizePlus.Core.Services; using CustomizePlus.Core.Services;
using CustomizePlus.Profiles.Data; using CustomizePlus.Profiles.Data;
using CustomizePlus.Profiles.Events; using CustomizePlus.Profiles.Events;
using Dalamud.Interface.ImGuiNotification;
namespace CustomizePlus.Profiles; namespace CustomizePlus.Profiles;

View File

@@ -1,5 +1,4 @@
using Dalamud.Interface.Internal.Notifications; using OtterGui.Classes;
using OtterGui.Classes;
using OtterGui.Filesystem; using OtterGui.Filesystem;
using OtterGui.Log; using OtterGui.Log;
using System; using System;
@@ -10,6 +9,7 @@ using System.Text.RegularExpressions;
using CustomizePlus.Core.Services; using CustomizePlus.Core.Services;
using CustomizePlus.Templates.Events; using CustomizePlus.Templates.Events;
using CustomizePlus.Templates.Data; using CustomizePlus.Templates.Data;
using Dalamud.Interface.ImGuiNotification;
namespace CustomizePlus.Templates; namespace CustomizePlus.Templates;

View File

@@ -10,12 +10,12 @@ namespace CustomizePlus.UI;
public class CPlusWindowSystem : IDisposable public class CPlusWindowSystem : IDisposable
{ {
private readonly WindowSystem _windowSystem = new("Customize+"); private readonly WindowSystem _windowSystem = new("Customize+");
private readonly UiBuilder _uiBuilder; private readonly IUiBuilder _uiBuilder;
private readonly MainWindow _mainWindow; private readonly MainWindow _mainWindow;
private readonly PopupSystem _popupSystem; private readonly PopupSystem _popupSystem;
public CPlusWindowSystem( public CPlusWindowSystem(
UiBuilder uiBuilder, IUiBuilder uiBuilder,
MainWindow mainWindow, MainWindow mainWindow,
CPlusChangeLog changelog, CPlusChangeLog changelog,
PopupSystem popupSystem, PopupSystem popupSystem,

View File

@@ -21,6 +21,7 @@ public class CPlusChangeLog
Add2_0_4_0(Changelog); Add2_0_4_0(Changelog);
Add2_0_4_1(Changelog); Add2_0_4_1(Changelog);
Add2_0_4_4(Changelog); Add2_0_4_4(Changelog);
Add2_0_5_0(Changelog);
} }
private (int, ChangeLogDisplayType) ConfigData() private (int, ChangeLogDisplayType) ConfigData()
@@ -33,6 +34,18 @@ public class CPlusChangeLog
_config.Save(); _config.Save();
} }
private static void Add2_0_5_0(Changelog log)
=> log.NextVersion("Version 2.0.5.0")
.RegisterHighlight("Customize+ has been updated to support Dawntrail.")
.RegisterImportant("If you edited any facial bones it is possible that you will have to make adjustments to your edits.", 1)
.RegisterImportant("Known issues:", 1)
.RegisterImportant("Profiles are not applied on Character Select Screen.", 2)
.RegisterImportant("All new Dawntrail bones are placed into the \"Unknown\" category.", 2)
.RegisterImportant("IPC needs additional work and has been disabled for now. Expect issues if you decide to call it anyway.", 2)
.RegisterEntry("Added \"Copy Support Info to Clipboard\" button to Settings tab.")
.RegisterEntry("Renamed \"Default profile\" to \"Apply to all players and retainers\" to try and improve understanding of the function by the users. (2.0.4.5)")
.RegisterEntry("Improved UI behavior when \"Apply to all players and retainers\" is enabled. (2.0.4.5)");
private static void Add2_0_4_4(Changelog log) private static void Add2_0_4_4(Changelog log)
=> log.NextVersion("Version 2.0.4.4") => log.NextVersion("Version 2.0.4.4")
.RegisterHighlight("Added edit button to the template selector in the profile editor which allows to quickly begin editing associated template.") .RegisterHighlight("Added edit button to the template selector in the profile editor which allows to quickly begin editing associated template.")

View File

@@ -47,7 +47,7 @@ public class MainWindow : Window, IDisposable
private Action? _actionAfterTabSwitch = null; private Action? _actionAfterTabSwitch = null;
public MainWindow( public MainWindow(
DalamudPluginInterface pluginInterface, IDalamudPluginInterface pluginInterface,
SettingsTab settingsTab, SettingsTab settingsTab,
TemplatesTab templatesTab, TemplatesTab templatesTab,
ProfilesTab profilesTab, ProfilesTab profilesTab,
@@ -59,7 +59,7 @@ public class MainWindow : Window, IDisposable
PluginConfiguration configuration, PluginConfiguration configuration,
HookingService hookingService, HookingService hookingService,
TemplateEditorEvent templateEditorEvent TemplateEditorEvent templateEditorEvent
) : base($"Customize+ v{Plugin.Version}###CPlusMainWindow") ) : base($"Customize+ {Plugin.Version}###CPlusMainWindow")
{ {
_settingsTab = settingsTab; _settingsTab = settingsTab;
_templatesTab = templatesTab; _templatesTab = templatesTab;

View File

@@ -50,13 +50,13 @@ public class IPCTestTab //: IDisposable
private readonly Func<Guid, int> _disableProfileByUniqueIdIpcFunc; private readonly Func<Guid, int> _disableProfileByUniqueIdIpcFunc;
[EzIPC("Profile.GetActiveProfileIdOnCharacter")] [EzIPC("Profile.GetActiveProfileIdOnCharacter")]
private readonly Func<Character, (int, Guid?)> _getActiveProfileIdOnCharacterIpcFunc; private readonly Func<ICharacter, (int, Guid?)> _getActiveProfileIdOnCharacterIpcFunc;
[EzIPC("Profile.SetTemporaryProfileOnCharacter")] [EzIPC("Profile.SetTemporaryProfileOnCharacter")]
private readonly Func<Character, string, (int, Guid?)> _setTemporaryProfileOnCharacterIpcFunc; private readonly Func<ICharacter, string, (int, Guid?)> _setTemporaryProfileOnCharacterIpcFunc;
[EzIPC("Profile.DeleteTemporaryProfileOnCharacter")] [EzIPC("Profile.DeleteTemporaryProfileOnCharacter")]
private readonly Func<Character, int> _deleteTemporaryProfileOnCharacterIpcFunc; private readonly Func<ICharacter, int> _deleteTemporaryProfileOnCharacterIpcFunc;
[EzIPC("Profile.DeleteTemporaryProfileByUniqueId")] [EzIPC("Profile.DeleteTemporaryProfileByUniqueId")]
private readonly Func<Guid, int> _deleteTemporaryProfileByUniqueIdIpcFunc; private readonly Func<Guid, int> _deleteTemporaryProfileByUniqueIdIpcFunc;
@@ -80,7 +80,7 @@ public class IPCTestTab //: IDisposable
private string _targetProfileId = ""; private string _targetProfileId = "";
public IPCTestTab( public IPCTestTab(
DalamudPluginInterface pluginInterface, IDalamudPluginInterface pluginInterface,
IObjectTable objectTable, IObjectTable objectTable,
ProfileManager profileManager, ProfileManager profileManager,
PopupSystem popupSystem, PopupSystem popupSystem,
@@ -311,16 +311,16 @@ public class IPCTestTab //: IDisposable
} }
[EzIPCEvent("Profile.OnUpdate")] [EzIPCEvent("Profile.OnUpdate")]
private void OnProfileUpdate(Character Character, Guid ProfileUniqueId) private void OnProfileUpdate(ICharacter Character, Guid ProfileUniqueId)
{ {
_logger.Debug($"IPC Test Tab - OnProfileUpdate: Character: {Character.Name.ToString().Incognify()}, Profile ID: {(ProfileUniqueId != Guid.Empty ? ProfileUniqueId.ToString() : "no id")}"); _logger.Debug($"IPC Test Tab - OnProfileUpdate: Character: {Character.Name.ToString().Incognify()}, Profile ID: {(ProfileUniqueId != Guid.Empty ? ProfileUniqueId.ToString() : "no id")}");
} }
private Character? FindCharacterByAddress(nint address) private ICharacter? FindCharacterByAddress(nint address)
{ {
foreach (var obj in _objectTable) foreach (var obj in _objectTable)
if (obj.Address == address) if (obj.Address == address)
return (Character)obj; return (ICharacter)obj;
return null; return null;
} }

View File

@@ -55,7 +55,7 @@ public class StateMonitoringTab
if (showArmatures) if (showArmatures)
DrawArmatures(); DrawArmatures();
var showObjectManager = ImGui.CollapsingHeader($"Object manager ({_objectManager.Count})###objectmanager_header"); var showObjectManager = ImGui.CollapsingHeader($"Object manager ({_objectManager.Identifiers.Count})###objectmanager_header");
if (showObjectManager) if (showObjectManager)
DrawObjectManager(); DrawObjectManager();

View File

@@ -1,6 +1,4 @@
//using CustomizePlus.UI.Windows.Debug; using Dalamud.Interface;
using Dalamud.Interface;
using Dalamud.Interface.Internal.Notifications;
using Dalamud.Interface.Utility; using Dalamud.Interface.Utility;
using ImGuiNET; using ImGuiNET;
using OtterGui.Classes; using OtterGui.Classes;
@@ -15,6 +13,7 @@ using CustomizePlus.Profiles;
using CustomizePlus.Templates; using CustomizePlus.Templates;
using CustomizePlus.Core.Helpers; using CustomizePlus.Core.Helpers;
using CustomizePlus.Armatures.Services; using CustomizePlus.Armatures.Services;
using Dalamud.Interface.ImGuiNotification;
namespace CustomizePlus.UI.Windows.MainWindow.Tabs; namespace CustomizePlus.UI.Windows.MainWindow.Tabs;

View File

@@ -11,12 +11,9 @@ using System;
using System.Numerics; using System.Numerics;
using static CustomizePlus.UI.Windows.MainWindow.Tabs.Templates.TemplateFileSystemSelector; using static CustomizePlus.UI.Windows.MainWindow.Tabs.Templates.TemplateFileSystemSelector;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.Windows.Forms;
using System.Linq; using System.Linq;
using Dalamud.Interface.Internal.Notifications;
using Dalamud.Interface.ImGuiFileDialog; using Dalamud.Interface.ImGuiFileDialog;
using System.IO; using System.IO;
using System.Reflection;
using CustomizePlus.Templates; using CustomizePlus.Templates;
using CustomizePlus.Configuration.Data; using CustomizePlus.Configuration.Data;
using CustomizePlus.Profiles; using CustomizePlus.Profiles;
@@ -28,9 +25,8 @@ using CustomizePlus.Profiles.Events;
using CustomizePlus.Templates.Data; using CustomizePlus.Templates.Data;
using CustomizePlus.Configuration.Helpers; using CustomizePlus.Configuration.Helpers;
using CustomizePlus.Configuration.Data.Version3; using CustomizePlus.Configuration.Data.Version3;
using CustomizePlus.GameData.Data;
using static OtterGui.Classes.MessageService;
using CustomizePlus.Configuration.Data.Version2; using CustomizePlus.Configuration.Data.Version2;
using Dalamud.Interface.ImGuiNotification;
namespace CustomizePlus.UI.Windows.MainWindow.Tabs.Templates; namespace CustomizePlus.UI.Windows.MainWindow.Tabs.Templates;

View File

@@ -1,5 +1,4 @@
using Dalamud.Interface; using Dalamud.Interface;
using Dalamud.Interface.Internal.Notifications;
using ImGuiNET; using ImGuiNET;
using OtterGui; using OtterGui;
using OtterGui.Classes; using OtterGui.Classes;

View File

@@ -9,7 +9,7 @@
"TestingAssemblyVersion": "2.0.4.7", "TestingAssemblyVersion": "2.0.4.7",
"RepoUrl": "https://github.com/Aether-Tools/CustomizePlus", "RepoUrl": "https://github.com/Aether-Tools/CustomizePlus",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"DalamudApiLevel": 9, "DalamudApiLevel": 10,
"IsHide": "False", "IsHide": "False",
"IsTestingExclusive": "False", "IsTestingExclusive": "False",
"DownloadCount": 0, "DownloadCount": 0,