diff --git a/CustomizePlus.GameData/Hooks/Objects/CopyCharacter.cs b/CustomizePlus.GameData/Hooks/Objects/CopyCharacter.cs index e82ae82..6b11f92 100644 --- a/CustomizePlus.GameData/Hooks/Objects/CopyCharacter.cs +++ b/CustomizePlus.GameData/Hooks/Objects/CopyCharacter.cs @@ -19,7 +19,7 @@ public sealed unsafe class CopyCharacter : EventWrapperPtr> _task; public nint Address - => (nint)CharacterSetup.MemberFunctionPointers.CopyFromCharacter; + => (nint)CharacterSetupContainer.MemberFunctionPointers.CopyFromCharacter; public void Enable() => _task.Result.Enable(); @@ -33,9 +33,9 @@ public sealed unsafe class CopyCharacter : EventWrapperPtr _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. var character = ((Character**)target)[1]; diff --git a/CustomizePlus.GameData/Services/CutsceneService.cs b/CustomizePlus.GameData/Services/CutsceneService.cs index 3fb34cf..eb97e46 100644 --- a/CustomizePlus.GameData/Services/CutsceneService.cs +++ b/CustomizePlus.GameData/Services/CutsceneService.cs @@ -20,7 +20,7 @@ public class CutsceneService : IService, IDisposable private readonly CharacterDestructor _characterDestructor; private readonly short[] _copiedCharacters = Enumerable.Repeat((short)-1, CutsceneSlots).ToArray(); - public IEnumerable> Actors + public IEnumerable> Actors => Enumerable.Range(CutsceneStartIdx, CutsceneSlots) .Where(i => _objects[i] != null) .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. /// Returns null if no connected actor is set or the actor does not exist anymore. /// - public Dalamud.Game.ClientState.Objects.Types.GameObject? this[int idx] + public Dalamud.Game.ClientState.Objects.Types.IGameObject? this[int idx] { 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. // I do not think this breaks anything? 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; _copiedCharacters[i] = -1; diff --git a/CustomizePlus.GameData/Services/GameEventManager.cs b/CustomizePlus.GameData/Services/GameEventManager.cs index b5ebef1..0ff9e40 100644 --- a/CustomizePlus.GameData/Services/GameEventManager.cs +++ b/CustomizePlus.GameData/Services/GameEventManager.cs @@ -29,7 +29,7 @@ public unsafe class GameEventManager : IDisposable interop.InitializeFromAttributes(this); _copyCharacterHook = - interop.HookFromAddress((nint)CharacterSetup.MemberFunctionPointers.CopyFromCharacter, CopyCharacterDetour); + interop.HookFromAddress((nint)CharacterSetupContainer.MemberFunctionPointers.CopyFromCharacter, CopyCharacterDetour); _characterBaseCreateHook = interop.HookFromAddress((nint)CharacterBase.MemberFunctionPointers.Create, CharacterBaseCreateDetour); _characterBaseDestructorHook = @@ -83,11 +83,11 @@ public unsafe class GameEventManager : IDisposable #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 _copyCharacterHook; - private ulong CopyCharacterDetour(CharacterSetup* target, GameObject* source, uint unk) + private ulong CopyCharacterDetour(CharacterSetupContainer* target, GameObject* source, uint unk) { // TODO: update when CS updated. var character = ((Character**)target)[1]; diff --git a/CustomizePlus.GameData/Services/ObjectManager.cs b/CustomizePlus.GameData/Services/ObjectManager.cs index 63edade..714c657 100644 --- a/CustomizePlus.GameData/Services/ObjectManager.cs +++ b/CustomizePlus.GameData/Services/ObjectManager.cs @@ -16,7 +16,7 @@ public class ObjectManager( IFramework framework, IClientState clientState, IObjectTable objects, - DalamudPluginInterface pi, + IDalamudPluginInterface pi, Logger log, ActorManager actors, ITargetManager targets) @@ -218,13 +218,16 @@ public class ObjectManager( } //c+ custom + [Obsolete("To be updated for DT")] private unsafe bool AddLobbyCharacter() { + return false; + /* var agent = AgentLobby.Instance(); - if (agent == null || agent->LobbyData.CharaSelectEntries.Size() == 0) + if (agent == null || agent->LobbyData.CharaSelectEntries.LongCount() == 0) 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) return false; @@ -235,6 +238,6 @@ public class ObjectManager( HandleIdentifier(actors.CreatePlayer(new ByteString(chara->Name), chara->HomeWorldId), actor); - return true; + return true;*/ } } diff --git a/CustomizePlus/Api/CustomizePlusIpc.General.cs b/CustomizePlus/Api/CustomizePlusIpc.General.cs index 7e027d0..41fb97e 100644 --- a/CustomizePlus/Api/CustomizePlusIpc.General.cs +++ b/CustomizePlus/Api/CustomizePlusIpc.General.cs @@ -25,6 +25,8 @@ public partial class CustomizePlusIpc [EzIPC("General.IsValid")] private bool IsValid() { + return false; + return !IPCFailed && !_hookingService.RenderHookFailed && !_hookingService.MovementHookFailed; diff --git a/CustomizePlus/Api/CustomizePlusIpc.Profile.cs b/CustomizePlus/Api/CustomizePlusIpc.Profile.cs index 261ea4a..b9174cb 100644 --- a/CustomizePlus/Api/CustomizePlusIpc.Profile.cs +++ b/CustomizePlus/Api/CustomizePlusIpc.Profile.cs @@ -30,7 +30,7 @@ public partial class CustomizePlusIpc /// /!\ If no profile is set on specified character profile id will be equal to Guid.Empty /// [EzIPCEvent("Profile.OnUpdate")] - private Action OnProfileUpdate; + private Action OnProfileUpdate; /// /// Retrieve list of all user profiles @@ -125,8 +125,11 @@ public partial class CustomizePlusIpc /// Get unique id of currently active profile for character. /// [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) 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. /// [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) if (character == null) return ((int)ErrorCode.InvalidCharacter, null); @@ -190,8 +196,11 @@ public partial class CustomizePlusIpc /// Delete temporary profile currently active on character /// [EzIPC("Profile.DeleteTemporaryProfileOnCharacter")] - private int DeleteTemporaryProfileOnCharacter(Character character) + private int DeleteTemporaryProfileOnCharacter(ICharacter character) { + //todo: temporary + return (int)ErrorCode.UnknownError; + if (character == null) 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 private void OnArmatureChanged(ArmatureChanged.Type type, Armature armature, object? arg3) { + //todo: temporary + return; + string currentPlayerName = _gameObjectService.GetCurrentPlayerName(); if (armature.ActorIdentifier.ToNameWithoutOwnerName() != currentPlayerName) return; - Character? localPlayerCharacter = (Character?)_gameObjectService.GetDalamudGameObjectFromActor(_gameObjectService.GetLocalPlayerActor()); + ICharacter? localPlayerCharacter = (ICharacter?)_gameObjectService.GetDalamudGameObjectFromActor(_gameObjectService.GetLocalPlayerActor()); if (localPlayerCharacter == null) 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) return; diff --git a/CustomizePlus/Api/CustomizePlusIpc.cs b/CustomizePlus/Api/CustomizePlusIpc.cs index 82242e1..8d141f2 100644 --- a/CustomizePlus/Api/CustomizePlusIpc.cs +++ b/CustomizePlus/Api/CustomizePlusIpc.cs @@ -19,7 +19,7 @@ namespace CustomizePlus.Api; /// public partial class CustomizePlusIpc : IDisposable { - private readonly DalamudPluginInterface _pluginInterface; + private readonly IDalamudPluginInterface _pluginInterface; private readonly Logger _logger; private readonly HookingService _hookingService; private readonly ProfileManager _profileManager; @@ -34,7 +34,7 @@ public partial class CustomizePlusIpc : IDisposable public bool IPCFailed { get; private set; } public CustomizePlusIpc( - DalamudPluginInterface pluginInterface, + IDalamudPluginInterface pluginInterface, Logger logger, HookingService hookingService, ProfileManager profileManager, diff --git a/CustomizePlus/Armatures/Data/ModelBone.cs b/CustomizePlus/Armatures/Data/ModelBone.cs index d6b7140..bc696c0 100644 --- a/CustomizePlus/Armatures/Data/ModelBone.cs +++ b/CustomizePlus/Armatures/Data/ModelBone.cs @@ -5,6 +5,7 @@ using CustomizePlus.Core.Data; using CustomizePlus.Templates.Data; using FFXIVClientStructs.FFXIV.Client.Graphics.Scene; using FFXIVClientStructs.Havok; +using FFXIVClientStructs.Havok.Common.Base.Math.QsTransform; namespace CustomizePlus.Armatures.Data; diff --git a/CustomizePlus/Configuration/Data/PluginConfiguration.cs b/CustomizePlus/Configuration/Data/PluginConfiguration.cs index 6e0b8a4..9c57d0e 100644 --- a/CustomizePlus/Configuration/Data/PluginConfiguration.cs +++ b/CustomizePlus/Configuration/Data/PluginConfiguration.cs @@ -2,18 +2,15 @@ using System.Collections.Generic; using System.IO; using Dalamud.Configuration; -using Dalamud.Interface.Internal.Notifications; using Newtonsoft.Json; using OtterGui.Classes; -using OtterGui.Log; using OtterGui.Widgets; using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; using CustomizePlus.Core.Services; using CustomizePlus.Core.Data; using CustomizePlus.Configuration.Services; -using CustomizePlus.Game.Services; using CustomizePlus.UI.Windows; -using Dalamud.Plugin.Services; +using Dalamud.Interface.ImGuiNotification; namespace CustomizePlus.Configuration.Data; diff --git a/CustomizePlus/Configuration/Services/ConfigurationMigrator.cs b/CustomizePlus/Configuration/Services/ConfigurationMigrator.cs index dfa6210..f060b77 100644 --- a/CustomizePlus/Configuration/Services/ConfigurationMigrator.cs +++ b/CustomizePlus/Configuration/Services/ConfigurationMigrator.cs @@ -1,5 +1,4 @@ -using Dalamud.Interface.Internal.Notifications; -using Newtonsoft.Json; +using Newtonsoft.Json; using OtterGui.Classes; using OtterGui.Log; using System; @@ -11,7 +10,7 @@ using CustomizePlus.Configuration.Helpers; using CustomizePlus.Configuration.Data; using CustomizePlus.Core.Events; using CustomizePlus.Configuration.Data.Version3; -using CustomizePlus.UI.Windows; +using Dalamud.Interface.ImGuiNotification; namespace CustomizePlus.Configuration.Services; diff --git a/CustomizePlus/Core/Data/BoneTransform.cs b/CustomizePlus/Core/Data/BoneTransform.cs index 611e10a..d0e7686 100644 --- a/CustomizePlus/Core/Data/BoneTransform.cs +++ b/CustomizePlus/Core/Data/BoneTransform.cs @@ -4,6 +4,7 @@ using System.Runtime.Serialization; using CustomizePlus.Core.Extensions; using CustomizePlus.Game.Services.GPose.ExternalTools; using FFXIVClientStructs.Havok; +using FFXIVClientStructs.Havok.Common.Base.Math.QsTransform; namespace CustomizePlus.Core.Data; diff --git a/CustomizePlus/Core/Data/Constants.cs b/CustomizePlus/Core/Data/Constants.cs index 5d8051d..64feeab 100644 --- a/CustomizePlus/Core/Data/Constants.cs +++ b/CustomizePlus/Core/Data/Constants.cs @@ -1,4 +1,7 @@ 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; namespace CustomizePlus.Core.Data; @@ -79,7 +82,7 @@ internal static class Constants /// /// Movement hook address, used for position offset and other changes which cannot be done in main hook /// - public const string MovementHookAddress = "E8 ?? ?? ?? ?? EB 29 48 8B 5F 08"; + public const string MovementHookAddress = "E8 ?? ?? ?? ?? 84 DB 74 45"; internal static class Colors { diff --git a/CustomizePlus/Core/Extensions/TransformExtensions.cs b/CustomizePlus/Core/Extensions/TransformExtensions.cs index c88c0f8..ddccc7d 100644 --- a/CustomizePlus/Core/Extensions/TransformExtensions.cs +++ b/CustomizePlus/Core/Extensions/TransformExtensions.cs @@ -2,6 +2,8 @@ using System.Numerics; using CustomizePlus.Core.Data; using FFXIVClientStructs.Havok; +using FFXIVClientStructs.Havok.Common.Base.Math.QsTransform; +using FFXIVClientStructs.Havok.Common.Base.Math.Vector; //using FFXIVClientStructs.FFXIV.Client.Graphics; diff --git a/CustomizePlus/Core/Extensions/VectorExtensions.cs b/CustomizePlus/Core/Extensions/VectorExtensions.cs index 44ead5f..e30faf8 100644 --- a/CustomizePlus/Core/Extensions/VectorExtensions.cs +++ b/CustomizePlus/Core/Extensions/VectorExtensions.cs @@ -2,6 +2,8 @@ using System.Numerics; using CustomizePlus.Anamnesis.Data; using FFXIVClientStructs.Havok; +using FFXIVClientStructs.Havok.Common.Base.Math.Quaternion; +using FFXIVClientStructs.Havok.Common.Base.Math.Vector; namespace CustomizePlus.Core.Extensions; diff --git a/CustomizePlus/Core/ServiceManagerBuilder.cs b/CustomizePlus/Core/ServiceManagerBuilder.cs index a3b87b6..8414e5b 100644 --- a/CustomizePlus/Core/ServiceManagerBuilder.cs +++ b/CustomizePlus/Core/ServiceManagerBuilder.cs @@ -37,7 +37,7 @@ namespace CustomizePlus.Core; public static class ServiceManagerBuilder { - public static ServiceManager CreateProvider(DalamudPluginInterface pi, Logger logger) + public static ServiceManager CreateProvider(IDalamudPluginInterface pi, Logger logger) { EventWrapperBase.ChangeLogger(logger); diff --git a/CustomizePlus/Core/Services/CommandService.cs b/CustomizePlus/Core/Services/CommandService.cs index 8caf576..246d413 100644 --- a/CustomizePlus/Core/Services/CommandService.cs +++ b/CustomizePlus/Core/Services/CommandService.cs @@ -1,5 +1,4 @@ using Dalamud.Game.Command; -using Dalamud.Interface.Internal.Notifications; using Dalamud.Plugin.Services; using OtterGui.Classes; using System; @@ -13,6 +12,7 @@ using CustomizePlus.UI.Windows.MainWindow; using static System.Windows.Forms.AxHost; using CustomizePlus.Profiles.Data; using CustomizePlus.Configuration.Data; +using Dalamud.Interface.ImGuiNotification; namespace CustomizePlus.Core.Services; diff --git a/CustomizePlus/Core/Services/DalamudServices.cs b/CustomizePlus/Core/Services/DalamudServices.cs index ba97e6f..308b9ea 100644 --- a/CustomizePlus/Core/Services/DalamudServices.cs +++ b/CustomizePlus/Core/Services/DalamudServices.cs @@ -10,7 +10,7 @@ namespace CustomizePlus.Core.Services; public class DalamudServices { - public static void AddServices(ServiceManager services, DalamudPluginInterface pi) + public static void AddServices(ServiceManager services, IDalamudPluginInterface pi) { services.AddExistingService(pi) .AddExistingService(pi.UiBuilder) diff --git a/CustomizePlus/Core/Services/FilenameService.cs b/CustomizePlus/Core/Services/FilenameService.cs index 37b59e5..aa6428d 100644 --- a/CustomizePlus/Core/Services/FilenameService.cs +++ b/CustomizePlus/Core/Services/FilenameService.cs @@ -15,7 +15,7 @@ public class FilenameService public readonly string TemplateDirectory; public readonly string TemplateFileSystem; - public FilenameService(DalamudPluginInterface pi) + public FilenameService(IDalamudPluginInterface pi) { ConfigDirectory = pi.ConfigDirectory.FullName; ConfigFile = pi.ConfigFile.FullName; diff --git a/CustomizePlus/Core/Services/HookingService.cs b/CustomizePlus/Core/Services/HookingService.cs index 7264bde..5945f07 100644 --- a/CustomizePlus/Core/Services/HookingService.cs +++ b/CustomizePlus/Core/Services/HookingService.cs @@ -27,7 +27,7 @@ public class HookingService : IDisposable private Hook? _renderManagerHook; private Hook? _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)] 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) { diff --git a/CustomizePlus/Core/Services/SupportLogBuilderService.cs b/CustomizePlus/Core/Services/SupportLogBuilderService.cs index 5dc84a0..10ee729 100644 --- a/CustomizePlus/Core/Services/SupportLogBuilderService.cs +++ b/CustomizePlus/Core/Services/SupportLogBuilderService.cs @@ -22,14 +22,14 @@ public class SupportLogBuilderService private readonly TemplateManager _templateManager; private readonly ProfileManager _profileManager; private readonly ArmatureManager _armatureManager; - private readonly DalamudPluginInterface _dalamudPluginInterface; + private readonly IDalamudPluginInterface _dalamudPluginInterface; public SupportLogBuilderService( PluginConfiguration configuration, TemplateManager templateManager, ProfileManager profileManager, ArmatureManager armatureManager, - DalamudPluginInterface dalamudPluginInterface) + IDalamudPluginInterface dalamudPluginInterface) { _configuration = configuration; _templateManager = templateManager; @@ -40,14 +40,16 @@ public class SupportLogBuilderService 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.Append($"> **`Plugin Version: `** {Plugin.Version}\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.Append($"> **`Limit to my creatures (editor): `** {_configuration.EditorConfiguration.LimitLookupToOwnedObjects}\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.Append($"> **`Character window: `** {_configuration.ProfileApplicationSettings.ApplyInCharacterWindow}\n"); sb.Append($"> **`Try On: `** {_configuration.ProfileApplicationSettings.ApplyInTryOn}\n"); @@ -63,6 +65,7 @@ public class SupportLogBuilderService sb.Append($"> > **`{template.ToString(),-32}`**\n"); } sb.AppendLine("**Profiles**"); + sb.Append($"> **`Default profile: `** {_profileManager.DefaultProfile?.ToString() ?? "None"}\n"); sb.Append($"> **`Count: `** {_profileManager.Profiles.Count}\n"); foreach (var profile in _profileManager.Profiles) { diff --git a/CustomizePlus/CustomizePlus.csproj b/CustomizePlus/CustomizePlus.csproj index d6d9e28..25c95b3 100644 --- a/CustomizePlus/CustomizePlus.csproj +++ b/CustomizePlus/CustomizePlus.csproj @@ -93,4 +93,8 @@ INCOGNIFY_STRINGS + + + false + diff --git a/CustomizePlus/CustomizePlus.json b/CustomizePlus/CustomizePlus.json index e1c5abd..dd10549 100644 --- a/CustomizePlus/CustomizePlus.json +++ b/CustomizePlus/CustomizePlus.json @@ -6,7 +6,7 @@ "InternalName": "CustomizePlus", "ApplicableVersion": "any", "AssemblyVersion": "2.0.0.0", - "DalamudApiLevel": 9, + "DalamudApiLevel": 10, "Tags": [ "Anamnesis", "Customization", diff --git a/CustomizePlus/Game/Services/GPose/GPoseService.cs b/CustomizePlus/Game/Services/GPose/GPoseService.cs index 4f84aaf..7ee4929 100644 --- a/CustomizePlus/Game/Services/GPose/GPoseService.cs +++ b/CustomizePlus/Game/Services/GPose/GPoseService.cs @@ -56,9 +56,9 @@ public class GPoseService : IDisposable GPoseState = clientState.IsGPosing ? GPoseState.Inside : GPoseState.Outside; - var uiModule = Framework.Instance()->GetUiModule(); - var enterGPoseAddress = (nint)uiModule->VTable->EnterGPose; - var exitGPoseAddress = (nint)uiModule->VTable->ExitGPose; + var uiModule = Framework.Instance()->GetUIModule(); + var enterGPoseAddress = (nint)uiModule->VirtualTable->EnterGPose; + var exitGPoseAddress = (nint)uiModule->VirtualTable->ExitGPose; _enterGPoseHook = hooker.HookFromAddress(enterGPoseAddress, EnteringGPoseDetour); _enterGPoseHook.Enable(); diff --git a/CustomizePlus/Game/Services/GameObjectService.cs b/CustomizePlus/Game/Services/GameObjectService.cs index 7c45940..8e15ba5 100644 --- a/CustomizePlus/Game/Services/GameObjectService.cs +++ b/CustomizePlus/Game/Services/GameObjectService.cs @@ -6,7 +6,7 @@ using Penumbra.GameData.Actors; using Penumbra.GameData.Enums; using Penumbra.GameData.Interop; 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 System; using CustomizePlus.Configuration.Data; diff --git a/CustomizePlus/Plugin.cs b/CustomizePlus/Plugin.cs index 1240593..637cd61 100644 --- a/CustomizePlus/Plugin.cs +++ b/CustomizePlus/Plugin.cs @@ -36,7 +36,7 @@ public sealed class Plugin : IDalamudPlugin public static readonly Logger Logger = new(); //for loggin in static classes/methods - public Plugin(DalamudPluginInterface pluginInterface) + public Plugin(IDalamudPluginInterface pluginInterface) { try { @@ -52,7 +52,7 @@ public sealed class Plugin : IDalamudPlugin _services.GetService(); _services.GetService(); - 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) { diff --git a/CustomizePlus/Profiles/ProfileFileSystem.cs b/CustomizePlus/Profiles/ProfileFileSystem.cs index a87127e..fc2e10d 100644 --- a/CustomizePlus/Profiles/ProfileFileSystem.cs +++ b/CustomizePlus/Profiles/ProfileFileSystem.cs @@ -6,10 +6,10 @@ using System.Text.RegularExpressions; using System; using System.Linq; using OtterGui.Classes; -using Dalamud.Interface.Internal.Notifications; using CustomizePlus.Core.Services; using CustomizePlus.Profiles.Data; using CustomizePlus.Profiles.Events; +using Dalamud.Interface.ImGuiNotification; namespace CustomizePlus.Profiles; diff --git a/CustomizePlus/Templates/TemplateFileSystem.cs b/CustomizePlus/Templates/TemplateFileSystem.cs index aa994a5..b4e927e 100644 --- a/CustomizePlus/Templates/TemplateFileSystem.cs +++ b/CustomizePlus/Templates/TemplateFileSystem.cs @@ -1,5 +1,4 @@ -using Dalamud.Interface.Internal.Notifications; -using OtterGui.Classes; +using OtterGui.Classes; using OtterGui.Filesystem; using OtterGui.Log; using System; @@ -10,6 +9,7 @@ using System.Text.RegularExpressions; using CustomizePlus.Core.Services; using CustomizePlus.Templates.Events; using CustomizePlus.Templates.Data; +using Dalamud.Interface.ImGuiNotification; namespace CustomizePlus.Templates; diff --git a/CustomizePlus/UI/CPlusWindowSystem.cs b/CustomizePlus/UI/CPlusWindowSystem.cs index 5930bc2..bfbf28f 100644 --- a/CustomizePlus/UI/CPlusWindowSystem.cs +++ b/CustomizePlus/UI/CPlusWindowSystem.cs @@ -10,12 +10,12 @@ namespace CustomizePlus.UI; public class CPlusWindowSystem : IDisposable { private readonly WindowSystem _windowSystem = new("Customize+"); - private readonly UiBuilder _uiBuilder; + private readonly IUiBuilder _uiBuilder; private readonly MainWindow _mainWindow; private readonly PopupSystem _popupSystem; public CPlusWindowSystem( - UiBuilder uiBuilder, + IUiBuilder uiBuilder, MainWindow mainWindow, CPlusChangeLog changelog, PopupSystem popupSystem, diff --git a/CustomizePlus/UI/Windows/CPlusChangeLog.cs b/CustomizePlus/UI/Windows/CPlusChangeLog.cs index 20fba95..ed8ea4f 100644 --- a/CustomizePlus/UI/Windows/CPlusChangeLog.cs +++ b/CustomizePlus/UI/Windows/CPlusChangeLog.cs @@ -21,6 +21,7 @@ public class CPlusChangeLog Add2_0_4_0(Changelog); Add2_0_4_1(Changelog); Add2_0_4_4(Changelog); + Add2_0_5_0(Changelog); } private (int, ChangeLogDisplayType) ConfigData() @@ -33,6 +34,18 @@ public class CPlusChangeLog _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) => 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.") diff --git a/CustomizePlus/UI/Windows/MainWindow/MainWindow.cs b/CustomizePlus/UI/Windows/MainWindow/MainWindow.cs index 1d7f639..de5fcfb 100644 --- a/CustomizePlus/UI/Windows/MainWindow/MainWindow.cs +++ b/CustomizePlus/UI/Windows/MainWindow/MainWindow.cs @@ -47,7 +47,7 @@ public class MainWindow : Window, IDisposable private Action? _actionAfterTabSwitch = null; public MainWindow( - DalamudPluginInterface pluginInterface, + IDalamudPluginInterface pluginInterface, SettingsTab settingsTab, TemplatesTab templatesTab, ProfilesTab profilesTab, @@ -59,7 +59,7 @@ public class MainWindow : Window, IDisposable PluginConfiguration configuration, HookingService hookingService, TemplateEditorEvent templateEditorEvent - ) : base($"Customize+ v{Plugin.Version}###CPlusMainWindow") + ) : base($"Customize+ {Plugin.Version}###CPlusMainWindow") { _settingsTab = settingsTab; _templatesTab = templatesTab; diff --git a/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/IPCTestTab.cs b/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/IPCTestTab.cs index 709241e..ba0d248 100644 --- a/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/IPCTestTab.cs +++ b/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/IPCTestTab.cs @@ -50,13 +50,13 @@ public class IPCTestTab //: IDisposable private readonly Func _disableProfileByUniqueIdIpcFunc; [EzIPC("Profile.GetActiveProfileIdOnCharacter")] - private readonly Func _getActiveProfileIdOnCharacterIpcFunc; + private readonly Func _getActiveProfileIdOnCharacterIpcFunc; [EzIPC("Profile.SetTemporaryProfileOnCharacter")] - private readonly Func _setTemporaryProfileOnCharacterIpcFunc; + private readonly Func _setTemporaryProfileOnCharacterIpcFunc; [EzIPC("Profile.DeleteTemporaryProfileOnCharacter")] - private readonly Func _deleteTemporaryProfileOnCharacterIpcFunc; + private readonly Func _deleteTemporaryProfileOnCharacterIpcFunc; [EzIPC("Profile.DeleteTemporaryProfileByUniqueId")] private readonly Func _deleteTemporaryProfileByUniqueIdIpcFunc; @@ -80,7 +80,7 @@ public class IPCTestTab //: IDisposable private string _targetProfileId = ""; public IPCTestTab( - DalamudPluginInterface pluginInterface, + IDalamudPluginInterface pluginInterface, IObjectTable objectTable, ProfileManager profileManager, PopupSystem popupSystem, @@ -311,16 +311,16 @@ public class IPCTestTab //: IDisposable } [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")}"); } - private Character? FindCharacterByAddress(nint address) + private ICharacter? FindCharacterByAddress(nint address) { foreach (var obj in _objectTable) if (obj.Address == address) - return (Character)obj; + return (ICharacter)obj; return null; } diff --git a/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/StateMonitoringTab.cs b/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/StateMonitoringTab.cs index 631156d..9f74fda 100644 --- a/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/StateMonitoringTab.cs +++ b/CustomizePlus/UI/Windows/MainWindow/Tabs/Debug/StateMonitoringTab.cs @@ -55,7 +55,7 @@ public class StateMonitoringTab if (showArmatures) DrawArmatures(); - var showObjectManager = ImGui.CollapsingHeader($"Object manager ({_objectManager.Count})###objectmanager_header"); + var showObjectManager = ImGui.CollapsingHeader($"Object manager ({_objectManager.Identifiers.Count})###objectmanager_header"); if (showObjectManager) DrawObjectManager(); diff --git a/CustomizePlus/UI/Windows/MainWindow/Tabs/SettingsTab.cs b/CustomizePlus/UI/Windows/MainWindow/Tabs/SettingsTab.cs index d56b663..f8fa47e 100644 --- a/CustomizePlus/UI/Windows/MainWindow/Tabs/SettingsTab.cs +++ b/CustomizePlus/UI/Windows/MainWindow/Tabs/SettingsTab.cs @@ -1,6 +1,4 @@ -//using CustomizePlus.UI.Windows.Debug; -using Dalamud.Interface; -using Dalamud.Interface.Internal.Notifications; +using Dalamud.Interface; using Dalamud.Interface.Utility; using ImGuiNET; using OtterGui.Classes; @@ -15,6 +13,7 @@ using CustomizePlus.Profiles; using CustomizePlus.Templates; using CustomizePlus.Core.Helpers; using CustomizePlus.Armatures.Services; +using Dalamud.Interface.ImGuiNotification; namespace CustomizePlus.UI.Windows.MainWindow.Tabs; diff --git a/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplateFileSystemSelector.cs b/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplateFileSystemSelector.cs index 4ca4497..3496022 100644 --- a/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplateFileSystemSelector.cs +++ b/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplateFileSystemSelector.cs @@ -11,12 +11,9 @@ using System; using System.Numerics; using static CustomizePlus.UI.Windows.MainWindow.Tabs.Templates.TemplateFileSystemSelector; using Newtonsoft.Json; -using System.Windows.Forms; using System.Linq; -using Dalamud.Interface.Internal.Notifications; using Dalamud.Interface.ImGuiFileDialog; using System.IO; -using System.Reflection; using CustomizePlus.Templates; using CustomizePlus.Configuration.Data; using CustomizePlus.Profiles; @@ -28,9 +25,8 @@ using CustomizePlus.Profiles.Events; using CustomizePlus.Templates.Data; using CustomizePlus.Configuration.Helpers; using CustomizePlus.Configuration.Data.Version3; -using CustomizePlus.GameData.Data; -using static OtterGui.Classes.MessageService; using CustomizePlus.Configuration.Data.Version2; +using Dalamud.Interface.ImGuiNotification; namespace CustomizePlus.UI.Windows.MainWindow.Tabs.Templates; diff --git a/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplatePanel.cs b/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplatePanel.cs index a6a7c89..dcb9ae2 100644 --- a/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplatePanel.cs +++ b/CustomizePlus/UI/Windows/MainWindow/Tabs/Templates/TemplatePanel.cs @@ -1,5 +1,4 @@ using Dalamud.Interface; -using Dalamud.Interface.Internal.Notifications; using ImGuiNET; using OtterGui; using OtterGui.Classes; diff --git a/repo.json b/repo.json index abc0aa8..47f47b0 100644 --- a/repo.json +++ b/repo.json @@ -9,7 +9,7 @@ "TestingAssemblyVersion": "2.0.4.7", "RepoUrl": "https://github.com/Aether-Tools/CustomizePlus", "ApplicableVersion": "any", - "DalamudApiLevel": 9, + "DalamudApiLevel": 10, "IsHide": "False", "IsTestingExclusive": "False", "DownloadCount": 0, diff --git a/submodules/ECommons b/submodules/ECommons index fe8ed96..bc06225 160000 --- a/submodules/ECommons +++ b/submodules/ECommons @@ -1 +1 @@ -Subproject commit fe8ed96b9ed80ae54d54c89d39410db2b5a935f8 +Subproject commit bc062259a8f9b31084a2cfd70a831b70bb1f31ad diff --git a/submodules/OtterGui b/submodules/OtterGui index e95c0f0..89b3b95 160000 --- a/submodules/OtterGui +++ b/submodules/OtterGui @@ -1 +1 @@ -Subproject commit e95c0f04edc7e85aea67498fd8bf495a7fe6d3c8 +Subproject commit 89b3b9513f9b4989045517a452ef971e24377203 diff --git a/submodules/Penumbra.Api b/submodules/Penumbra.Api index f1e4e52..f4c6144 160000 --- a/submodules/Penumbra.Api +++ b/submodules/Penumbra.Api @@ -1 +1 @@ -Subproject commit f1e4e520daaa8f23e5c8b71d55e5992b8f6768e2 +Subproject commit f4c6144ca2012b279e6d8aa52b2bef6cc2ba32d9 diff --git a/submodules/Penumbra.GameData b/submodules/Penumbra.GameData index 6aeae34..8ec296d 160000 --- a/submodules/Penumbra.GameData +++ b/submodules/Penumbra.GameData @@ -1 +1 @@ -Subproject commit 6aeae346332a255b7575ccfca554afb0f3cf1494 +Subproject commit 8ec296d1f8113ae2ba509527749cd3e8f54debbf diff --git a/submodules/Penumbra.String b/submodules/Penumbra.String index caa58c5..f04abba 160000 --- a/submodules/Penumbra.String +++ b/submodules/Penumbra.String @@ -1 +1 @@ -Subproject commit caa58c5c92710e69ce07b9d736ebe2d228cb4488 +Subproject commit f04abbabedf5e757c5cbb970f3e513fef23e53cf