Can boot into the UI
This commit is contained in:
@@ -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];
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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];
|
||||||
|
|||||||
@@ -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;*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,7 +125,7 @@ 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)
|
||||||
{
|
{
|
||||||
if (character == null)
|
if (character == null)
|
||||||
return ((int)ErrorCode.InvalidCharacter, null);
|
return ((int)ErrorCode.InvalidCharacter, null);
|
||||||
@@ -143,7 +143,7 @@ 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: 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)
|
||||||
@@ -190,7 +190,7 @@ 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)
|
||||||
{
|
{
|
||||||
if (character == null)
|
if (character == null)
|
||||||
return (int)ErrorCode.InvalidCharacter;
|
return (int)ErrorCode.InvalidCharacter;
|
||||||
@@ -266,7 +266,7 @@ public partial class CustomizePlusIpc
|
|||||||
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 +317,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;
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ public class HookingService : IDisposable
|
|||||||
ReloadHooks();
|
ReloadHooks();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete("To be updated for Dawntrail")]
|
||||||
public void ReloadHooks()
|
public void ReloadHooks()
|
||||||
{
|
{
|
||||||
RenderHookFailed = false;
|
RenderHookFailed = false;
|
||||||
@@ -64,7 +65,7 @@ public class HookingService : IDisposable
|
|||||||
{
|
{
|
||||||
if (_configuration.PluginEnabled)
|
if (_configuration.PluginEnabled)
|
||||||
{
|
{
|
||||||
if (_renderManagerHook == null)
|
/*if (_renderManagerHook == null)
|
||||||
{
|
{
|
||||||
var renderAddress = _sigScanner.ScanText(Constants.RenderHookAddress);
|
var renderAddress = _sigScanner.ScanText(Constants.RenderHookAddress);
|
||||||
_renderManagerHook = _hooker.HookFromAddress<RenderDelegate>(renderAddress, OnRender);
|
_renderManagerHook = _hooker.HookFromAddress<RenderDelegate>(renderAddress, OnRender);
|
||||||
@@ -83,7 +84,7 @@ public class HookingService : IDisposable
|
|||||||
_renderManagerHook.Enable();
|
_renderManagerHook.Enable();
|
||||||
|
|
||||||
_logger.Debug("Hooking movement functions");
|
_logger.Debug("Hooking movement functions");
|
||||||
_gameObjectMovementHook.Enable();
|
_gameObjectMovementHook.Enable();*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
@@ -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();
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
@@ -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,13 @@ 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.")
|
||||||
|
.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.")
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Submodule submodules/ECommons updated: fe8ed96b9e...677e28c069
Submodule submodules/OtterGui updated: e95c0f04ed...c2738e1d42
Submodule submodules/Penumbra.Api updated: f1e4e520da...43b0b47f2d
Submodule submodules/Penumbra.GameData updated: 6aeae34633...066637abe0
Submodule submodules/Penumbra.String updated: caa58c5c92...f04abbabed
Reference in New Issue
Block a user